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 a floating point in c?

0 Answers  


What is the c value paradox and how is it explained?

0 Answers  


main() { int i; printf("%d",scanf"%d",&i))//if the input is 12 24 34 then wat will be the output }

2 Answers  


In the following code segment what will be the result of the function, value of x , value of y { unsigned int x=-1; int y; y = ~0; if(x == y) printf("same"); else printf("not same"); } a) same, MAXINT, -1 b) not same, MAXINT, -MAXINT c) same , MAXUNIT, -1 d) same, MAXUNIT, MAXUNIT e) not same, MAXINT, MAXUNIT

1 Answers   IBM,


What is the scope of static variable in c?

0 Answers  






write a program to print calender using for loop.

1 Answers   HCL, TCS,


what is mean by Garbage collection ? Please answer me. Advance thanks.

4 Answers   Excel,


main() { printf(5+"Vidyarthi Computers"); }

6 Answers  


second highest number in a given set of numbers

3 Answers   TCS,


What is formal argument?

0 Answers  


What is the best way to store flag values in a program?

0 Answers  


write a program to generate address labels using structures?

0 Answers   SJC,


Categories