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

What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1 Answers  


find a number whether it is even or odd without using any control structures and relational operators?

22 Answers   Microsoft, Shashank Private Limited,


What is that continue statement??

4 Answers  


Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;

2 Answers   Bosch,


What is the use of keyword VOLATILE in C?

1 Answers  


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

0 Answers  


Can the curly brackets { } be used to enclose a single line of code?

0 Answers  


Define the scope of static variables.

0 Answers  


for(;;) printf("C language") What is out put of above??

2 Answers   Practical Viva Questions,


how to find the sizof of any datatype using bit manipulations

3 Answers  


helllo sir , what is the main use of the pointer ,array ,and the structure with the example of a programe

2 Answers  


What is array of pointers to string?

0 Answers  


Categories