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
What is meant by gets in c?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
All technical questions
What is the advantage of an array over individual variables?
What are pointers? What are stacks and queues?
How can you invoke another program from within a C program?
What is the explanation for cyclic nature of data types in c?
In c programming language, how many parameters can be passed to a function ?
How can I pad a string to a known length?
Explain what is the difference between a free-standing and a hosted environment?
Differentiate between the = symbol and == symbol?
How can a string be converted to a number?
Why is void main used?
What is a nested formula?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a