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

What is difference between && and & in c?

1105


What is atoi and atof in c?

1086


What is memcpy() function?

1118


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1230


Can one function call another?

1112


What is cohesion in c?

983


What is selection sort in c?

1090


Differentiate abs() function from fabs() function.

1013


What is the method to save data in stack data structure type?

1086


What is an lvalue?

1063


What is meant by 'bit masking'?

1390


What is hashing in c?

1165


Explain output of printf("Hello World"-'A'+'B'); ?

1494


Write a program to print factorial of given number without using recursion?

992


Why pointers are used?

1073