int b=5; int a=++b; printf("%d",a+b); | Sololearn: Learn to code for FREE!

+1

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

How to get this answer

c

11/18/2021 8:42:08 AM

Chiran Sooryakumara

2 Answers

New Answer

+6

int a=++b; //here pre-increment used, b increased to 6 and then assigned to a. So 6+6=12 is the answer

+1

It is equal to int b=5; int b=b+1; int a=b; printf("%d",a+b);