please explain me this question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

please explain me this question

What will be the output of the program (test.c) given below if it is executed from the command line? cmd> test Amphisoft E-Box #include<stdio.h> int main(int argc, char **argv){ printf("%c", **++argv); return 0; }

21st Dec 2020, 4:13 AM
yogesh
yogesh - avatar
1 Answer
+ 1
Basically it is asking you, what will be the output if you pass arguments to your C program, test.c, from the command line. The line which starts with cmd> is not part of the code. It is the line used in cmd for passing arguments to the main function of your program. Here the arguments being passed are Amphisoft and E-box and test is the name of the c program. that's how you pass arguments from the command line.
21st Dec 2020, 4:19 AM
Temporary