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 Jan 7, 2014 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 Jan 7, 2014 by rajesh Guru (39,140 points)

Related questions

0 votes
1 answer 21 views
0 votes
1 answer 64 views
64 views asked Jan 6, 2014 by sara Guru (24,570 points)
...