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 getch c?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
What is mean by data types in c?
Does c have circular shift operators?
What are the disadvantages of a shell structure?
What do you mean by Recursion Function?
Explain logical errors? Compare with syntax errors.
given post order,in order construct the corresponding binary tree
What are global variables and explain how do you declare them?
What is the difference between new and malloc functions?
Why is it usually a bad idea to use gets()? Suggest a workaround.
What is an array in c?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
What is the difference between mpi and openmp?
What is break in c?