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

main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }

3 Answers  


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

3 Answers  


what is oop?

3 Answers  


main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4

2 Answers   HCL,


Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.

1 Answers   Samar State University,


Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


what is brs test reply me email me kashifabbas514@gmail.com

0 Answers  


what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }

6 Answers   CSC, IIIT,


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

4 Answers   Corporate Society, HCL,


struct Foo { char *pName; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName); } a. Your Name b. compile error c. Name d. Runtime error

3 Answers   HCL,


main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

5 Answers   HCL,


find A^B using Recursive function

2 Answers  


Categories