a=0;
b=(a=0)?2:3;
a) What will be the value of b? why
b) If in 1st stmt a=0 is replaced by -1, b=?
c) If in second stmt a=0 is replaced by -1, b=?
Answer Posted / syamkumarm
a)3
because it is ternery operator its work like a if.. else..
in the comdition part a=0 i.e. the result of expression is
zero so it goes to else part i.s 3
b)b=3
c)b=2
Is This Answer Correct ? | 15 Yes | 3 No |
Post New Answer View All Answers
can we have joblib in a proc ?
What is sizeof in c?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
c program to compute AREA under integral
write an algorithm to display a square matrix.
What is the best way to store flag values in a program?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
What is a constant?
What is scope rule in c?
Which is an example of a structural homology?
Define VARIABLE?
Explain b+ tree?
Explain built-in function?
What is dynamic dispatch in c++?
Is c programming hard?