main()

{

main();

}



main() { main(); }..

Answer / susie

Answer :

Runtime error : Stack overflow.

Explanation:

main function calls itself again and again. Each time the
function is called its return address is stored in the call
stack. Since there is no condition to terminate the function
call, the call stack overflows at runtime. So it terminates
the program and results in an error.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Code Interview Questions

How will u find whether a linked list has a loop or not?

8 Answers   Microsoft,


main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }

1 Answers   TCS,


main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }

29 Answers   IBM, TCS, UGC NET, Wipro,


find A^B using Recursive function

2 Answers  


How to read a directory in a C program?

4 Answers  






main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 Answers  


How to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.

2 Answers  


How to access command-line arguments?

4 Answers  


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

2 Answers   HCL,


main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above

5 Answers   HCL,


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

0 Answers  


#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }

2 Answers  


Categories