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
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
What is file in c preprocessor?
In which language linux is written?
What does & mean in scanf?
What is the code for 3 questions and answer check in VisualBasic.Net?
What is the difference between exit() and _exit() function in c?
What are different storage class specifiers in c?
Explain how can you tell whether a program was compiled using c versus c++?
Discuss the function of conditional operator, size of operator and comma operator with examples.
Why c is called a middle level language?
Is c is a middle level language?
What is meant by keywords in c?
What is meant by inheritance?
What are types of structure?
When should a type cast not be used?