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
How can I dynamically allocate arrays?
What 'lex' does?
What is the total generic pointer type?
What is the basic structure of c?
Explain what are the advantages and disadvantages of a heap?
What are directives in c?
Where static variables are stored in c?
What is indirection in c?
Explain what are compound statements?
how to execute a program using if else condition and the output should enter number and the number is odd only...
What is c definition?
What is self-referential structure in c programming?
How can I remove the trailing spaces from a string?
write a program to display all prime numbers
Describe the header file and its usage in c programming?