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

How can I dynamically allocate arrays?

1162


What 'lex' does?

1228


What is the total generic pointer type?

1211


What is the basic structure of c?

1154


Explain what are the advantages and disadvantages of a heap?

1127


What are directives in c?

1023


Where static variables are stored in c?

1168


What is indirection in c?

1116


Explain what are compound statements?

1103


how to execute a program using if else condition and the output should enter number and the number is odd only...

2370


What is c definition?

1339


What is self-referential structure in c programming?

1280


How can I remove the trailing spaces from a string?

1119


write a program to display all prime numbers

2016


Describe the header file and its usage in c programming?

1105