71. 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;
i. extern int func;
ii. extern int func2(int,int);
iii. int func2(int,int);
iv. extern class foo;
72. 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;
}
#include <iostream>
using namespace std;
int main()
{
int i = 3;
int l = i / -2;
int k = i % -2;
cout << l << k;
return 0;
}
73. What does the following statement mean?
void a;
void a;
74. What is the value of the following 8-bit integer after all statements are executed?
int x = 1;
x = x << 7;
x = x >> 7;
int x = 1;
x = x << 7;
x = x >> 7;
75. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int num = 0x20 + 020 + 20;
cout << sizeof(num)<<'\n';
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int num = 0x20 + 020 + 20;
cout << sizeof(num)<<'\n';
return 0;
}
76. Which of the following will not return a value?
77. Suppose in a hypothetical machine, the size of char is 32 bits. What would sizeof(char) return?
78. Is bool a fundamental data type in C++?
79. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int a = 8;
cout << "ANDing integer 'a' with 'true' :" << (a && true);
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int a = 8;
cout << "ANDing integer 'a' with 'true' :" << (a && true);
return 0;
}
80. Which data type is used to represent the absence of parameters?
Read More Section(Variables and Data Types in C plus plus)
Each Section contains maximum 100 MCQs question on Variables and Data Types in C plus plus. To get more questions visit other sections.