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
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
What is the symbol indicated the c-preprocessor?
What does the error 'Null Pointer Assignment' mean and what causes this error?
Do string constants represent numerical values?
What is the difference between exit() and _exit() function in c?
What is the meaning of typedef struct in c?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
Why & is used in c?
Differentiate between the expression “++a” and “a++”?
What is p in text message?
Differentiate between a structure and a union.
Wt are the Buses in C Language
What is an auto variable in c?
What are local variables c?