Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / ashfak yeafi

The answer is 14.
The increment operator has a higher priority than the arithmetic operator.
So the equation will be,
b=7+7=14

Is This Answer Correct ?    0 Yes 0 No

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

Answer / vinit kumar

answer would be 14

because value will be stored in cpu register..

b=7+6

last vale is 7 then it increases two times so 7*2=14

Is This Answer Correct ?    5 Yes 6 No

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

Answer / goldy ramnani

13
because 1stly a=5,
then compiler compile fromleft to right,
so ++a means a=6 then
++a a=6 now a=7,lastly 7+6=13

Is This Answer Correct ?    1 Yes 2 No

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

Answer / naga

Ans:13

Is This Answer Correct ?    0 Yes 1 No

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

Answer / pawan patil

it's very simple that value of b=13
because the actual value of a=5 then
b=++a + ++a
b=(6) + (++6)= 12
b= (6) + (7)=13
then b=13

Is This Answer Correct ?    0 Yes 2 No

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

Answer / sasmita

Depending upon Compiler it will b 13 or 14.In Unix its 13.

Is This Answer Correct ?    4 Yes 8 No

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

Answer / nitin jatpuriya

14

Is This Answer Correct ?    15 Yes 22 No

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

Answer / sas

cn u tl me detail how?14

Is This Answer Correct ?    3 Yes 10 No

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

Answer / pravesh

a=5
b=++a(6) + ++a(7)
b=13+1 when last addition is performed.
so, b=14

Is This Answer Correct ?    1 Yes 18 No

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

Answer / manikandans

12

Is This Answer Correct ?    5 Yes 23 No

Post New Answer

More C Interview Questions

Can we assign string to char pointer?

0 Answers  


Explain what are the standard predefined macros?

0 Answers  


What is the use of printf() and scanf() functions?

0 Answers  


1) int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain the explain the output

2 Answers  


Is c is a procedural language?

0 Answers  


9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?

4 Answers   L&T,


write c program to display output 10(10+20)+(10+20+30)+ ... n term

0 Answers   Hindustan Gum Chemicals,


What are the parts of c program?

0 Answers  


How does placing some code lines between the comment symbol help in debugging the code?

0 Answers  


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

0 Answers  


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

0 Answers  


Explain how do you print an address?

0 Answers  


Categories