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

What is meant by gets in c?

1182


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1976


All technical questions

1987


What is the advantage of an array over individual variables?

1235


What are pointers? What are stacks and queues?

1150


How can you invoke another program from within a C program?

1074


What is the explanation for cyclic nature of data types in c?

1211


In c programming language, how many parameters can be passed to a function ?

1110


How can I pad a string to a known length?

1032


Explain what is the difference between a free-standing and a hosted environment?

1184


Differentiate between the = symbol and == symbol?

1295


How can a string be converted to a number?

1020


Why is void main used?

1096


What is a nested formula?

1154


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

1950