Question discussion

What will happen if the following declaration is used in C?int a, b, c = 10;

359444Medium DSSSB TGT Computer Science 0 replies 0 views
0
What will happen if the following declaration is used in C?
int a, b, c = 10;
  • AOnly c is initialized to 10; a and b are uninitialized.
  • BSyntax error due to missing initialization of a and b.
  • Ca, b, and c are all initialized to 10.
  • DRuntime error
Correct answer: A

Explanation

In "int a, b, c = 10;" only c is initialised. a and b are declared but uninitialised.

Discussion 0

Nobody has replied yet. Start the discussion!