main(int argc, char *argv[])

{

(main && argc) ? main(argc-1, NULL) : return 0;

}

a. Runtime error.

b. Compile error. Illegal syntax

c. Gets into Infinite loop

d. None of the above

Answers were Sorted based on User's Feedback



main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; ..

Answer / guest

b) illegal syntax for using return

Is This Answer Correct ?    17 Yes 5 No

main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; ..

Answer / akshata

d. None of the above

Is This Answer Correct ?    3 Yes 4 No

main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; ..

Answer / viliami

The answer is 0

Is This Answer Correct ?    2 Yes 4 No

main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; ..

Answer / sushil

it will give a run time error since , return cannot be used
as it is used in ternary operator.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More C Code Interview Questions

#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }

3 Answers  


main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above

3 Answers   HCL,


main() { int *j; { int i=10; j=&i; } printf("%d",*j); }

9 Answers   HCL, Wipro,


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

0 Answers  


Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

1 Answers  






Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??

0 Answers   Home,


main() { int i=5,j=6,z; printf("%d",i+++j); }

2 Answers  


Write a procedure to implement highlight as a blinking operation

2 Answers  


&#8206;#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }

2 Answers  


#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

2 Answers  


main() { extern int i; i=20; printf("%d",i); }

1 Answers   Value Labs,


int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().

1 Answers  


Categories