C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

Write a C program to display number of arguments and their names?

0 votes
32 views
asked by smith Geek (15,340 points)

1 Answer

0 votes

#include<stdio.h>

#include<conio.h>

main(int argc, char *argv[])

{

Int x;

clrscr();

Printf(“\n Total number of arguments are %d \n ”, argc);

for(x=0; x<argc; x++)

Printf(“%s\t”, argv[x]);

getch();

return 0;

}

Output:

Total numbers of arguments are 4

C:\TC\C.EXE A B C

answered by rajesh Guru (39,140 points)

...