Data Types
- What is the output of this program?
#include
using namespace std;
int main()
{
int p = 15;
if (p < 13) {
for (k = 0; k < 12; k++)
cout << k;
}
else {
cout << k;
}
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
In function 'int main()':
7:18: error: 'k' was not declared in this scope
11:21: error: 'k' was not declared in this scope
- Identify the incorrect statements.
int num = 23;
Statement (i): int *ptr = &(num + 2);
Statement (ii): int *ptr2 = #
Statement (iii): &&num = 50;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In statement (i) value is required as unary ‘&’ operand and in statement (iii) value is required as left operand.
- The operator used for dereferencing or indirection is ____
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
*
- It is guaranteed that a ____ has at least 8 bits and a ____ has at least 16 bits.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
char, short
- What is the range of the floating point numbers?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
-3.4E+38 to +3.4E+38