Variables And Data Types In C Plus Plus - Study Mode
[#91] Which of these expressions will return true if the input integer v is a power of two?
Correct Answer
(D) (v & (v – 1)) == 0
[#92] What will be the output of the following C++ code? #include <stdio.h>
int main()
{
char a = 'x0012'
printf("%d", a)
return 0
}
Correct Answer
(C) 10
[#93] Which of the given statements are false i. extern int func
ii. extern int func2(int,int)
iii. int func2(int,int)
iv. extern class foo
Correct Answer
(C) only iv
[#94] What will be the output of the following C++ code? #include <iostream>
using namespace std
int main()
{
int i = 3
int l = i / -2
int k = i % -2
cout << l << k
return 0
}
Correct Answer
(B) -1 1
[#95] What does the following statement mean? void a
Correct Answer
(D) flags an error