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


given
unsigned int ui1=3,ui2=7;
what are the outputs of
a)ui1 & ui2
b)ui1 && ui2
c)ui1 | ui2
d)ui1 || ui2

i also need the justification for the answers
thank you

Answers were Sorted based on User's Feedback



given unsigned int ui1=3,ui2=7; what are the outputs of a)ui1 & ui2 b)ui1 && ui2 ..

Answer / swapna

a) 3
&:bitwise and operator

3-011
7-111
3&7-011->3
b)any positive value
&&-logical and
both numbers are are positive.so and operation results in
true-so any positive value
c)7
bitwise or
d)any positive value
logical or

Is This Answer Correct ?    3 Yes 0 No

given unsigned int ui1=3,ui2=7; what are the outputs of a)ui1 & ui2 b)ui1 && ui2 ..

Answer / subeetha

a) 3
&:bitwise and operator

3-011
7-111
3&7-011->3
b)1
&&:logical and
both numbers are non zero.So, operation Result is true
c)7
bitwise or
d)1
&&:logical Or
both numbers are non zero.So, operation Result is true

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

How can a struct in c++ differs from a struct in c?

0 Answers  


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

0 Answers  


What is std namespace in c++?

0 Answers  


What is c strings syntax?

0 Answers  


What does return 0 do in c++?

0 Answers  


pls help.. paper bills.. 1000, 500, 100, 50, 20, 10, 5, 1.. create a program that will count all the paper bills in the number being input.. example: enter a number: 3886 there is/are: 3 ->1000 1 ->500 3 ->100 1 ->50 1 ->20 1 ->10 1 ->5 1 ->1 example2: enter a number: 728 there is/are: 0 ->1000 1 ->500 2 ->100 0 ->50 1 ->20 0 ->10 1 ->5 3 ->1

4 Answers  


Is c++ an integer?

0 Answers  


What will the line of code below print out and why?

0 Answers  


What are pointer-to-members? Explain.

0 Answers   iNautix,


What are the main features of c++?

0 Answers  


Can you Mention some Application of C/C++?

0 Answers  


diff between pointer and reference in c++?

1 Answers  


Categories