+ 1

int b=5; int a=++b; printf("%d",a+b);

How to get this answer

18th Nov 2021, 8:42 AM
Chiran Sooryakumara
Chiran Sooryakumara - avatar
2 Answers
+ 6
int a=++b; //here pre-increment used, b increased to 6 and then assigned to a. So 6+6=12 is the answer
18th Nov 2021, 9:05 AM
AzhagesanăƒŸ(✿)
AzhagesanăƒŸ(✿) - avatar
+ 1
It is equal to int b=5; int b=b+1; int a=b; printf("%d",a+b);
18th Nov 2021, 11:19 PM
Seyed Mahmoud Khademiyan