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 number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
Is c pass by value or reference?
What’s a signal? Explain what do I use signals for?
What is memcpy() function?
What are the usage of pointer in c?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
What is the best style for code layout in c?
What is integer constants?
write a program for the normal snake games find in most of the mobiles.
What is pointer to pointer in c?
Why array is used in c?
Can you explain the four storage classes in C?
which is an algorithm for sorting in a growing Lexicographic order
What the advantages of using Unions?