Page 1 of 1

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

Posted: Wed Jul 13, 2022 7:50 pm
by answerhappygod
#include <stdio.h>
int main(void)
{
int new = 5;
printf("%d", new);
}
a) Error in C and successful execution in C++
b) Error in both C and C++
c) Error in C++ and successful execution in C
d) A successful run in both C and C++