C | Operators | Question 13

filter_none

edit
close

play_arrow

link
brightness_4
code

#include<stdio.h> 
int main(void
  int a = 1; 
  int b = 0; 
  b = a++ + a++; 
  printf("%d %d",a,b); 
  return 0; 
}

chevron_right


(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



My Personal Notes arrow_drop_up


Article Tags :
Practice Tags :


2


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.