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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

When is dynamic checking necessary?

604


What information can an exception contain?

669


Can we define function inside main in c++?

558


What is the size of a vector?

582


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

614






What is the best book for c++ beginners?

579


Explain what happens when a pointer is deleted twice?

736


What is one dimensional array in c++?

584


What is a far pointer? where we use it?

619


Define a nested class. Explain how it can be useful.

639


Why is main an int?

531


Tell me what are static member functions?

616


Explain the concept of dynamic allocation of memory?

619


What is the benefit of c++?

604


What is the difference between the parameter to a template and the parameter to a function?

641