+ 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 Antworten
+ 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