C Programming - Command Line Arguments - Discussion
Discussion Forum : Command Line Arguments - Find Output of Program (Q.No. 19)
19.
What will be the output of the program (sample.c) given below if it is executed from the command line?
cmd> sample friday tuesday sunday
cmd> sample friday tuesday sunday
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%c", *++argv[2] );
return 0;
}
Discussion:
25 comments Page 3 of 3.
Yuva said:
1 decade ago
Thanks sushma sister
Dharmvir Kumar said:
1 decade ago
Thanks Sushma Jee.
KIRAN said:
1 decade ago
Thanks sushma.
Yugandhar said:
1 decade ago
Your explanation is gud, thank you.
Sundar said:
1 decade ago
@Sushma
Exactly. Thanks for your explanation.
Exactly. Thanks for your explanation.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers