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 / simply rockz
in ternary operator a condition is required/// like..
<condition1>?<result1>:<result2>
b=(a=0)?2:3
so.. illegal use of ternary.../* "=" is an assignment operator*/
| Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
Can we compile a program without main() function?
What is console in c language?
What are the types of data structures in c?
What is the use of define in c?
How the c program is executed?
What does d mean?
When was c language developed?
how should functions be apportioned among source files?
When should a type cast not be used?
diff between exptected result and requirement?
What are categories used for in c?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
What is pointer to pointer in c?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
What is header file definition?