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 / vaibhav

b=3
becoz in ternay operator if statement is true then it
returns non zero vaqlue othervise it return 0 in that case
we initialize the value of a is 0 therefore it will exicute
a else part

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should the volatile modifier be used?

1237


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

4001


What's the best way of making my program efficient?

1154


provide an example of the Group by clause, when would you use this clause

2249


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

1473


What is the advantage of an array over individual variables?

1296


What is structure padding and packing in c?

1128


How many identifiers are there in c?

1087


What is the size of structure pointer in c?

1122


How many types of errors are there in c language? Explain

1029


explain what is fifo?

1135


Explain what is the benefit of using const for declaring constants?

1092


Explain why C language is procedural?

1277


When was c language developed?

1260


write a proram to reverse the string using switch case?

3009