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


Please Help Members By Posting Answers For Below Questions

Explain what are the standard predefined macros?

654


difference between Low, Middle, High Level languages in c ?

1635


Describe dynamic data structure in c programming language?

607


How many bytes are occupied by near, far and huge pointers (dos)?

675


application attempts to perform an operation?

1496






how to find anagram without using string functions using only loops in c programming

2719


What language is c written?

578


Is that possible to add pointers to each other?

905


What is function prototype?

611


What do you mean by c?

590


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2373


What are the main characteristics of c language describe the structure of ac program?

614


What is the significance of c program algorithms?

683


what is stack , heap ,code segment,and data segment

2224


Can we assign string to char pointer?

589