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
Tell us bitwise shift operators?
Explain data types & how many data types supported by c?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
Which is best book for data structures in c?
What is an example of structure?
What is the value of h?
What is scope rule in c?
Is stack a keyword in c?
What is malloc calloc and realloc in c?
What do you mean by dynamic memory allocation in c? What functions are used?
What does sizeof return c?
Why double pointer is used in c?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
How can I trap or ignore keyboard interrupts like control-c?
Explain function?