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
Why is c so popular?
how to construct a simulator keeping the logical boolean gates in c
Explain what is wrong with this program statement?
What is the general form of function in c?
What is the purpose of the preprocessor directive error?
What is a buffer in c?
Explain what is the use of a semicolon (;) at the end of every program statement?
Write a progarm to find the length of string using switch case?
Why do we use c for the speed of light?
Why use int main instead of void main?
Write a program to reverse a linked list in c.
What do you mean by c?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
What is indirection?
Explain how can I make sure that my program is the only one accessing a file?