What happens if the following program is executed in C and C++? \[\]int main(void) { \[\]int new = 1; \[\]printf("%d", new);\[\] }
In C, `new` is not a keyword, so the code runs successfully.
In C++, `new` is a reserved keyword, causing a compilation error.
Answer: D. Error in C++ and successful execution in C.
Reinforce your conceptual grasp with related questions from CUET-MCA 2021:
Take timed full-length mock tests with authentic question distributions, negative marking (+12/-3 in Math), and instant All India Rank calculation.
Start Free Mock Test Series →