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

What is the difference between class and object in c?

0 Answers  


main() { struct test { char c; int i; char m; } t1; printf("%d %d\n", sizeof(t1), sizeof(t1.c)); }

1 Answers   Vector, Vector India,


How do you list files in a directory?

0 Answers  


The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.

0 Answers   Microsoft,


6)What would be the output? main() { int u=1,v=3; pf("%d%d",u,v); funct1(&u,&v); pf("%d%d\n",u,v); } void funct1(int *pu, int *pv) { *pu=0; *pv=0; return; } a)1 3 1 3 b)1 3 1 1 c)1 3 0 0 d)1 1 1 1 e) 3 1 3 1

4 Answers  


Why Modern OS are interrupt driven?Give an example

3 Answers  


parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..

4 Answers  


What is the difference between a free-standing and a hosted environment?

0 Answers   Aspire,


write a program to concatenation the string using switch case?

0 Answers  


how to multiply two number taking input as a string (considering sum and carry )

2 Answers   Wipro,


how to find turn around time in operating system?

3 Answers  


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

0 Answers  


Categories