C Programming - Command Line Arguments - Discussion
Discussion Forum : Command Line Arguments - Find Output of Program (Q.No. 12)
12.
What will be the output of the program (sample.c) given below if it is executed from the command line?
cmd> sample Jan Feb Mar
cmd> sample Jan Feb Mar
/* sample.c */
#include<stdio.h>
#include<dos.h>
int main(int arc, char *arv[])
{
int i;
for(i=1; i<_argc; i++)
printf("%s ", _argv[i]);
return 0;
}
Discussion:
17 comments Page 2 of 2.
Sonam said:
1 decade ago
Good doubt apoorva ! even I have the same doubt can some one clear it ?
Khushi said:
1 decade ago
Please anyone explain this program in detail.
Opkuma said:
4 years ago
I didn't get it, please explain.
Lijina said:
1 decade ago
Please any one explain it clear.
Karthigeyan said:
1 decade ago
_arc, _arv are used as argc,argv
Rahul said:
8 years ago
Is ''arc'' and ''_argc'' same?
Shubh said:
5 years ago
Can someone explain it clearly?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers