what is the value of b
if a=5;
b=++a + ++a

Answer Posted / sagar

here in b=++a + ++a;
a
Initial Value 5
First Prefix 6
Second Prefix 7
Final Equation b = 7 + 7 = 14...
So,correct answer is 14....

if the equation was as below:
c=++a;//a==6
d=++a;//a=7
b=c+d;//b=6+7=13
then b==13...

Is This Answer Correct ?    97 Yes 29 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the header file and its usage in c programming?

622


What is extern c used for?

571


Explain what is the purpose of "extern" keyword in a function declaration?

623


What is s in c?

618


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

579






Differentiate between a structure and a union.

768


What is difference between main and void main?

630


What are the 4 types of organizational structures?

625


Wt are the Buses in C Language

2753


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

1587


How do I use void main?

633


difference between Low, Middle, High Level languages in c ?

1634


Why isnt any of this standardized in c?

638


Process by which one bit pattern in to another by bit wise operation is?

615


Do you know pointer in c?

593