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

what is the code of the output of print the 10 fibonacci number series

2 Answers  


main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }

1 Answers  


main() { printf("%d, %d", sizeof('c'), sizeof(100)); } a. 2, 2 b. 2, 100 c. 4, 100 d. 4, 4

18 Answers   HCL, IBM, Infosys, LG Soft, Satyam,


Write a C program to print look and say sequence? For example if u get the input as 1 then the sequence is 11 21 1211 111221 312211 12112221 .......(it counts the no. of 1s,2s etc which is in successive order) and this sequence is used in run-length encoding.

1 Answers  


main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”

5 Answers   HCL,






main() { show(); } void show() { printf("I'm the greatest"); }

2 Answers  


main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

1 Answers  


#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  


String copy logic in one line.

11 Answers   Microsoft, NetApp,


main() { printf("\nab"); printf("\bsi"); printf("\rha"); }

3 Answers  


Derive expression for converting RGB color parameters to HSV values

1 Answers  


How we print the table of 2 using for loop in c programing?

14 Answers   HCL, Wipro,


Categories