60 617
Assignments Done
97,8%
Successfully Done
In April 2018

Answer to Question #22563 in C# for vathsalya

Question #22563
Define a console application to display all the arguments passed to command line while running the application. The user can pass any number of arguments that should be displayed. Use length property of array and for-each loop. If there are no arguments in command line display message ‘No Arguments’
Expert's answer
#include <stdio.h>

int main(int argc, char* argv[])
{
if(argc == 1) printf("No Arguments\n");
else
{
int i;
for(i = 1; i < argc; i++)
printf("%s \n", argv[i]);
}
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions