Q. What happens if the following program is executed in C and C++?

Code:
#include <stdio.h> 
int main(void) 
{ 
	int new = 5;
	printf("%d", new); 
}
  • (A) Error in C and successful execution in C++
  • (B) Error in C++ and successful execution in C
  • (C) Error in both C and C++
  • (D) A successful run in both C and C++
πŸ’¬ Discuss
βœ… Correct Answer: (C) Error in both C and C++

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
389
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Babita
Publisher
πŸ“ˆ
80%
Success Rate