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


x=2,y=6,z=6
x=y==z;
printf(%d",x)

Answers were Sorted based on User's Feedback



x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / preethi

y==z true
so, x=1

Is This Answer Correct ?    79 Yes 6 No

x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / guest

y==z checks if both are equal and returns TRUE or FLASE
(1 / 0). In this case y = z = 6, so it returns TRUE / 1. x
= 1.

Is This Answer Correct ?    27 Yes 0 No

x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / amit

since "=" has a low precedence over "==" .. thus "y==z" will
be evaluated first and the returned value will be stored in
x which will be printed subsequently...

In this case since y equals z, x = 1 will be printed

cheers

AD

Is This Answer Correct ?    15 Yes 0 No

x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / anand n

Ans:1


x=2,y=6,z=6//here x value is:2
x=y==z;//x=6 and y=6 so x is equal to y means its true,now
//x value is 1
printf(%d",x)

Is This Answer Correct ?    8 Yes 1 No

x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / vijoeyz

My apologies for the silly mistake. The value of x is 1 as
everyone has said.

Thanks,
Vijay Zanvar
http://faq.zanvar.in

Is This Answer Correct ?    7 Yes 2 No

x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / priya

answer: 1

Is This Answer Correct ?    3 Yes 0 No

x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / mahadevan

in C language this statement(x=y==z;)is declaration syntax Error

Is This Answer Correct ?    5 Yes 2 No

x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / suchita

here we can not use and conditional statement thats why we can
not say "this is a boolean eq" and thats why x print either 2 or
garbage value

Is This Answer Correct ?    7 Yes 5 No

x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / wasim

First of all the given syntax for printf statement is
wrong.it will not show any output but the syntax error

Is This Answer Correct ?    1 Yes 1 No

x=2,y=6,z=6 x=y==z; printf(%d",x) ..

Answer / manjunath kusagur

in memory first location hold value of x as 2....ofter
assigning x=y..x(6)<-y..value of x is overwritten because
memory location holds only one value at a time means now x
holds value as 6......

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

Tell me about low level programming languages.

0 Answers   Amdocs,


What is typedef example?

0 Answers  


Why main is used in c?

0 Answers  


write a program structure to find average of given number

1 Answers  


Which function in C can be used to append a string to another string?

0 Answers  


union { char ch[10]; short s; }test; test.s = 0xabcd; main() { printf("%d",ch[10]); }

3 Answers  


What is a static function in c?

0 Answers  


What is the difference between void main() and void main (void) give example programme?

0 Answers  


Predict the output or error(s) for the following: 25. main() { printf("%p",main); }

3 Answers   Google, ME,


Explain what is the best way to comment out a section of code that contains comments?

0 Answers  


Write a code to reverse string seperated by spaces i/p str=India is my country o/p str=aidnI si ym yrtnuoc After writing code, optimize the code

1 Answers  


Explain what’s a signal? Explain what do I use signals for?

0 Answers  


Categories