GAT Subject
Engineering
Computer Science Civil Engineering Chemical Engineering Agricultural Engineering Mechanical Engineering Electronics and Communication
1. | Which of the following statements are correct about the program? | |
A. | It prints garbage values infinitely | |
B. | Runs infinitely without printing anything | |
C. | Error: main() cannot be called inside printf() | |
D. | No Error and print nothing | |
Answer: Option B | |
Explanation: | |
In printf("%p\n", main()); it calls the main() function and then it repeats infinetly, untill stack overflow. |
|
Tutorial Link: |