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 / syamkumarm
a)3
because it is ternery operator its work like a if.. else..
in the comdition part a=0 i.e. the result of expression is
zero so it goes to else part i.s 3
b)b=3
c)b=2
Is This Answer Correct ? | 15 Yes | 3 No |
Post New Answer View All Answers
Explain what are the standard predefined macros?
difference between Low, Middle, High Level languages in c ?
Describe dynamic data structure in c programming language?
How many bytes are occupied by near, far and huge pointers (dos)?
application attempts to perform an operation?
how to find anagram without using string functions using only loops in c programming
What language is c written?
Is that possible to add pointers to each other?
What is function prototype?
What do you mean by c?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
What are the main characteristics of c language describe the structure of ac program?
What is the significance of c program algorithms?
what is stack , heap ,code segment,and data segment
Can we assign string to char pointer?