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 |
What is array in c++ pdf?
How would you use qsort() function to sort an array of structures?
Do the parentheses after the type name make a difference with new?
Explain the difference between abstract class and interface in c++?
Can we generate a C++ source code from the binary file?
Is there anything you can do in C++ that you cannot do in C?
Tell me what are static member functions?
What is c++ prototype?
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
Write any small program that will compile in "C" but not in "C++"?
What is function prototyping?
What is a storage class in C++