C Programming - Command Line Arguments - Discussion

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

int main(int argc, char *argv[])
{
    printf("%c", *++argv[1]);
    return 0;
}
r
f
m
y
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
12 comments Page 2 of 2.

Vaishali said:   9 years ago
Is there any differences between **++argv and *++argv?
(1)

Sunaina said:   1 decade ago
Whats the difference between *++argv and **+argv?


Post your comments here:

Your comments will be displayed after verification.