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


Please Help Members By Posting Answers For Below Questions

What is getch c?

853


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

2858


What is mean by data types in c?

551


Does c have circular shift operators?

731


What are the disadvantages of a shell structure?

690






What do you mean by Recursion Function?

629


Explain logical errors? Compare with syntax errors.

624


given post order,in order construct the corresponding binary tree

2323


What are global variables and explain how do you declare them?

578


What is the difference between new and malloc functions?

578


Why is it usually a bad idea to use gets()? Suggest a workaround.

904


What is an array in c?

594


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

810


What is the difference between mpi and openmp?

736


What is break in c?

587