What will happen if the following declaration is used in C? int a, b, c = 10;
What will happen if the following declaration is used in C?
int a, b, c = 10;
Show answerHide answer
Correct answer: (A) Only c is initialized to 10; a and b are uninitialized.
Explanation
In int a, b, c = 10; the initialiser belongs only to c. a and b are declared but left uninitialised (garbage if local).