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

What are types of structure?

1102


Sir i need notes for structure,functions,pointers in c language can you help me please

2393


What are the different data types in C?

1193


Tell me the use of bit field in c language?

1051


Why we use break in c?

988


Ow can I insert or delete a line (or record) in the middle of a file?

983


What is the purpose of realloc()?

1124


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

1259


Multiply an Integer Number by 2 Without Using Multiplication Operator

747


What is clrscr ()?

1096


Explain what header files do I need in order to define the standard library functions I use?

1157


Explain built-in function?

1122


Explain how do you view the path?

1146


What is difference between stdio h and conio h?

1355


In which header file is the null macro defined?

1332