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
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 |
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 |
Why c++ does not have finally?
Explain about profiling?
Where are setjmp and longjmp used in c++?
Explain 'this' pointer and what would happen if a pointer is deleted twice?
Write a program to calculate the BMI of a person using the formula BMI = weight/height2.
What is a dangling pointer?
When the design recommends static functions?
Can you sort a set c++?
What does flush do c++?
How to get the current position of the file pointer?
diff between pointer and reference in c++?
Describe the setting up of my member functions to avoid overriding by the derived class?