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
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
Once I have used freopen, how can I get the original stdout (or stdin) back?
Is int a keyword in c?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
write a proram to reverse the string using switch case?
Which is better pointer or array?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
What are file streams?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
Is it possible to have a function as a parameter in another function?
What are the characteristics of arrays in c?
Explain what is a const pointer?
What is meant by type casting?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
How #define works?