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 is sprintf unsafe?

1133


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

1311


What are structure members?

1149


What are actual arguments?

1160


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1654


How was c created?

1095


How does #define work?

1133


What is #line in c?

1077


How to compare array with pointer in c?

1170


Explain how do you view the path?

1224


Write a program to find the biggest number of three numbers in c?

1106


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

1229


What is a substring in c?

1087


Who developed c language and when?

1140


What are the features of c language?

1130