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
/* sample.c */
#include<stdio.h>

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

Preethi Ginimav said:   1 decade ago
@Sushma Thanks for explanation

Yuva said:   1 decade ago
Thanks sushma sister

Dharmvir Kumar said:   1 decade ago
Thanks Sushma Jee.

Amol said:   8 years ago
Thanks @Sushma.
(1)

KIRAN said:   1 decade ago
Thanks sushma.


Post your comments here:

Your comments will be displayed after verification.