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;

Answers were Sorted based on User's Feedback



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

Answer / manjunath a s

it will be in infinite loop because x=6 is an assignment
statement and it will be always true.

Is This Answer Correct ?    1 Yes 6 No

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

Answer / vikraman85

compile time err wil occur..
Have 2 use == opr..

Is This Answer Correct ?    3 Yes 11 No

Post New Answer

More C Interview Questions

Is double link list a linear data structure? If Yes, Why?If No, Why?

4 Answers  


the number 138 is called well ordered number because the three digits in the number (1,3,8) increase from left to right (1<3<8). the number 365 is not well ordered coz 6 is larger than 5. write a program that wull find and display all possible three digit well ordered numbers. sample: 123,124,125,126,127,128,129,134 ,135,136,137,138,139,145,146,147 148 149,156.......789

5 Answers  


how to swap 4 number without using temporary number?

2 Answers  


how to find greatet of 10 numbers without using array?

4 Answers  


what is the difference between structural,object based,object orientd programming languages?

1 Answers   PanTerra,


What is the difference between functions abs() and fabs()?

0 Answers  


Why cant I open a file by its explicit path?

0 Answers  


what are the stoge class in C and tel the scope and life time of it?

2 Answers   Tech Mahindra,


WHO WROTE C LANGUAGE?

4 Answers  


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

0 Answers  


What is return type in c?

0 Answers  


write a c program that prints all multiples of 3between 1 and 50.

5 Answers  


Categories