Google News
logo
CPP - Quiz(MCQ)
What if we define the below structure in C and C++?
A)
No error in both C and C++
B)
Error in both C and C++
C)
Error in C++ but not in C
D)
Error in C but not in C++

Correct Answer :   Error in C but not in C++


Explanation : The above definition will give an error in C but not in C++ as C does not allows the programmer to give any default values to any member of structure but C++ does allow.

Advertisement