what is the value of b
if a=5;
b=++a + ++a
Answer Posted / naresh
Not a very tough question. Important thing to note that in
any expression pre increment operator has a higher prority
than arithemetic operator as a result value of a is
increment is first two times then value of b is evaluated.
So b = 7*7 = 14.
in first ++a we get a=6
in next ++a we get a=7
and b=7+7=14
This question will result in same output for most of the
compilers, but some rare compiler may produce an entire
diffrenent parse tree resulting in an undefined result
| Is This Answer Correct ? | 28 Yes | 13 No |
Post New Answer View All Answers
Why header file is used in c?
Can you please explain the difference between strcpy() and memcpy() function?
Is null valid for pointers to functions?
What is string function c?
What does s c mean in text?
What do the functions atoi(), itoa() and gcvt() do?
How are pointers declared in c?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
What is an example of structure?
What is New modifiers?
What is actual argument?
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is extern storage class in c?
hi any body pls give me company name interview conduct "c" language only
Linked lists -- can you tell me how to check whether a linked list is circular?