what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}



what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); } ..

Answer / sreed

first command line argument

lets say..
exe for above prog is a.out

execute command
a.out arg1 arg2 arg3

then out put will be arg1

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Interview Questions

What is hashing in c?

1 Answers  


What is ponter?

1 Answers   TCS,


List out few of the applications that make use of Multilinked Structures?

2 Answers   Accenture,


How can you restore a redirected standard stream?

1 Answers  


What does calloc stand for?

1 Answers  


Which of the following is not a valid declaration for main ()? 1) int main() 2) int main(int argc, char *argv[]) 3) They both work

2 Answers  


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

1 Answers  


What is memcpy() function?

1 Answers  


i want to asked a question about c program the question is: create a c program that displays all prime numbers less than 500? using looping statement

5 Answers  


prototype of sine function.

2 Answers   Cadence,


Will Macros support multiple arguments ?

7 Answers   Oracle,


What is extern c used for?

1 Answers  


Categories