C Programming - Command Line Arguments - Discussion

Discussion Forum : Command Line Arguments - Find Output of Program (Q.No. 1)
1.
What will be the output of the program (myprog.c) given below if it is executed from the command line?
cmd> myprog one two three
/* myprog.c */
#include<stdio.h>

int main(int argc, char **argv)
{
    printf("%c\n", **++argv);
    return 0;
}
myprog one two three
myprog one
o
two
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
26 comments Page 3 of 3.

Sravya said:   7 years ago
Good explanation @Cherry.

Ashok said:   1 decade ago
Seenu answer is correct.

GORIPARTHI. Udaya lakshmi said:   8 years ago
How the answer comes o?

Nikhil n said:   8 years ago
Perfect answer @Seenu.

Satya said:   1 decade ago
Senu answer is good.

Swapnil said:   9 years ago
Thanks @Cherry.


Post your comments here:

Your comments will be displayed after verification.