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

What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;

Answer Posted / piyush

its looks logically incorrect,but in c anc c++ if any such
incident occurs like if(x=6), this condition is always
treated as true

will give a warning ,but will execute this as considering
the if condition as true

ANSWER to this question is y=7

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use header files in c?

1084


Differentiate between static and dynamic modeling.

1142


How many types of sorting are there in c?

1062


What are directives in c?

980


Why we write conio h in c?

1046


hi send me sample aptitude papers of cts?

2170


How can a number be converted to a string?

1344


Explain the red-black trees?

1141


What are the advantages and disadvantages of a heap?

1218


What are disadvantages of C language.

1168


What does sizeof return c?

1076


What is a node in c?

985


What is output redirection?

1234


Why is c so popular?

1169


What is cohesion and coupling in c?

1040