what is the value of b
if a=5;
b=++a + ++a
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Answer / sasmita
Depending upon Compiler it will b 13 or 14.In Unix its 13.
Is This Answer Correct ? | 4 Yes | 8 No |
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 |
write a recursive program in'c'to find whether a given five digit number is a palindrome or not
main() { int a; a=++100; printf("%d",a); getch(); }
when to use : in c program?
What is the use of f in c?
Explain the red-black trees?
What is the function of multilevel pointer in c?
How can this be legal c?
What is "Hungarian Notation"?
Explain what does the function toupper() do?
What are pointers in C?
Explain what is wrong in this statement?
the number 138 is called well ordered number because the three digits in the number (1,3,8) increase from left to right (1<3<8). the number 365 is not well ordered coz 6 is larger than 5. write a program that wull find and display all possible three digit well ordered numbers. sample: 123,124,125,126,127,128,129,134 ,135,136,137,138,139,145,146,147 148 149,156.......789