Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / simply rockz

in ternary operator a condition is required/// like..
<condition1>?<result1>:<result2>

b=(a=0)?2:3
so.. illegal use of ternary.../* "=" is an assignment operator*/

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we compile a program without main() function?

1076


What is console in c language?

1046


What are the types of data structures in c?

1082


What is the use of define in c?

1001


How the c program is executed?

1077


What does d mean?

1018


When was c language developed?

1141


how should functions be apportioned among source files?

1058


When should a type cast not be used?

1005


diff between exptected result and requirement?

1990


What are categories used for in c?

1035


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1651


What is pointer to pointer in c?

1060


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1898


What is header file definition?

1024