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


when will be evaluated as true/
if(x==x==x)
a) x=1;
b) x=0;
c) x=-1;
d) none

Answers were Sorted based on User's Feedback



when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none..

Answer / naveen

o/p is x=0;
as x==x it will give 1 as result;
then again x==1;
so it will be false if x!=1i.e it will be true for only if
x value is 1.
i.e x=1 only if xis 1 other wise it is 0

Is This Answer Correct ?    21 Yes 3 No

when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none..

Answer / singh

if block will be evaluated as true only if x=1.
because for first comparision x==x it returns 1.
then it again compares with x==x ie,x==1.
-it will return true only if x=1;

Is This Answer Correct ?    14 Yes 3 No

when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none..

Answer / vikram

if x=1,then x==x evaluates to 1;
again,1==x evaluates to 1 only if x=1,
if(1) means condition becomes true and the if block will be
executed,
thnx

Is This Answer Correct ?    7 Yes 0 No

when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none..

Answer / rukmanee

a: x=1;

Is This Answer Correct ?    3 Yes 1 No

when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none..

Answer / hussain reddy

x=1

Is This Answer Correct ?    2 Yes 1 No

when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none..

Answer / ramesh

none

Is This Answer Correct ?    1 Yes 2 No

when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none..

Answer / vignesh1988i

all the three cases possible as for as i know.......
x=1
x=0
x=-1

Is This Answer Correct ?    1 Yes 10 No

Post New Answer

More C Interview Questions

which of the following go out of the loopo if expn 2 becoming false a.while(expn 1){...if(expn 2)continue;} b.while(!expn 1){if(expn 2)continue;...} c.do{..if(expn 1)continue;..}while(expn 2); d.while(!expn 2){if(expn 1)continue;..}

4 Answers   TCS,


what is develop in c language

2 Answers  


#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }

1 Answers  


How the processor registers can be used in C ?

7 Answers   HP,


#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }

1 Answers  


What is array of structure in c programming?

0 Answers  


without using arithmatic operator solve which number is greater??????????

1 Answers   Accenture,


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

0 Answers  


what is d pitfalls of registers variables

3 Answers   TCS,


Is flag a keyword in c?

0 Answers  


What is wrong with this statement? Myname = 'robin';

0 Answers  


What are the 5 elements of structure?

0 Answers  


Categories