a) Unsigned integer of at least 64 bits b) Signed integer of at least 16 bits
View Question
Evaluate the following.
(false && true) || false || true
Evaluate the following. (false && true) || false || true a) 0 b) 1 c) false
View Question
What is the value of p in the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int p;
bool a = true;
bool b = false;
int x = 10;
int y = 5;
p = ((x | y) + (a + b));
cout << p;
return 0;
}
What is the value of p in the following C++ code? #include <iostream> ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int f(int p, int q)
{
if (p > q)
return p;
else
return q;
}
main()
{
int a = 5, b = 10;
int k;
bool x = true;
bool y = f(a, b);
k =((a * b) + (x + y));
cout << k;
}
What will be the output of the following C++ code? #include <iostream> ...
View QuestionWhich of the two operators ++ and — work for the bool data type in C++?
a) None b) ++ c) — d) ++ & — Answer: b Explanation: Due to the ...
View QuestionFor what values of the expression is an if-statement block not executed?
a) 0 and all negative values b) 0 and -1 c) 0 d) 0, all negative values, all positive ...
View QuestionWhich of the following statements are false?
a) bool can have two values and can be used to express logical expressions b) bool cannot be ...
View QuestionWhat happens when a null pointer is converted into bool?
a) an error is flagged b) bool value evaluates to true c) bool value evaluates to false d) the statement ...
View Question
What is the value of the bool?
bool is_int(789.54)
What is the value of the bool? bool is_int(789.54) a) True b) False c) 1 d) 2
View QuestionFind the odd one out.
a) std::vector<int> b) std::vector<short> c) std::vector<long> d) std::vector<bool> Answer: d Explanation: std::vector<bool> is ...
View Question