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 / ashwin kumar molugu
a)1st answer will be 3
in statement 1
b)if a=0 replaced with -1 its an error
in statement 2
c)if a=0 replaced with -1 2
answer is 2 becoz -1 is taken as true in c language
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
Can we declare variable anywhere in c?
Do you know what are bitwise shift operators in c programming?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
Which header file should you include if you are to develop a function which can accept variable number of arguments?
Is c is a middle level language?
Write a program to check armstrong number in c?
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
What library is sizeof in c?
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
How can I handle floating-point exceptions gracefully?
What is the best style for code layout in c?
Why we use conio h in c?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
How can I discover how many arguments a function was actually called with?
What is scope and lifetime of a variable in c?