C | Operators | Question 2
#include <stdio.h> int main() { Â Â Â int i = 1, 2, 3; Â Â Â Â Â Â printf("%d", i); Â Â Â Â Â Â return 0; }
(A) 1
(B) 3
(C) Garbage value
(D) Compile time error
Answer: (D)
Explanation: Comma acts as a separator here. The compiler creates an integer variable and initializes it with 1. The compiler fails to create integer variable 2 because 2 is not a valid identifier.
Quiz of this Question
Please Login to comment...