#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
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
Recommended Posts:
- Operators in C | Set 1 (Arithmetic Operators)
- Operators in C | Set 2 (Relational and Logical Operators)
- C | Operators | Question 1
- Python | Operators | Question 1
- Python | Operators | Question 2
- Python | Operators | Question 3
- Python | Operators | Question 4
- C | Operators | Question 3
- C | Operators | Question 4
- C | Operators | Question 5
- C | Operators | Question 6
- C | Operators | Question 7
- C | Operators | Question 8
- C | Operators | Question 9
- C | Operators | Question 10
- C | Operators | Question 11
- C | Operators | Question 12
- C | Operators | Question 13
- C | Operators | Question 27
- C | Operators | Question 15

