C | Operators | Question 13
#include<stdio.h> int main(void) { int a = 1; int b = 0; b = a++ + a++; printf("%d %d",a,b); return 0; } |
chevron_right
filter_none
(A) 3 6
(B) Compiler Dependent
(C) 3 4
(D) 3 3
Answer: (B)
Explanation: See https://www.geeksforgeeks.org/sequence-points-in-c-set-1/ for explanation.
Quiz of this Question
Recommended Posts:
- Operators in C | Set 2 (Relational and Logical Operators)
- C | Operators | Question 23
- C | Operators | Question 27
- C | Operators | Question 18
- C | Operators | Question 26
- C | Operators | Question 5
- C | Operators | Question 27
- C | Operators | Question 9
- C | Operators | Question 3
- C | Operators | Question 8
- C | Operators | Question 27
- C | Operators | Question 22
- C | Operators | Question 2
- C | Operators | Question 11
- C | Operators | Question 21



