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 do we use double in c++?
structure contains int, char, float how it behaves for big endian and little endian?
What is buffering in c++?
int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}
What is the difference between Char a[ ]=”string” and char *a=”String”
How do you link a C++ program to C functions?
What is the difference between method overloading and method overriding in c++?
What are shallow and deep copy?
Differences between private, protected and public and give examples.
Is it possible to write a c++ template to check for a function's existence?
What is an iterator class in c++?
What is the use of 'this' pointer?