-
Notifications
You must be signed in to change notification settings - Fork 0
/
cs.txt
119 lines (103 loc) · 2.49 KB
/
cs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
7 4 6
Select the INCORRECT keyword in C++
asm
virtual
statics
float
3
String literal "abc" will be represented in the memory as _____
abc\0
abc/0
abc|0
abc_0
1
Which of the following header files contains the exit () function to terminate the current program in C++?
<string.h>
<process.h>
<iomanip.h>
<ctype.h>
2
In C++, exp() and pow() functions belong to ______
<math.h>
<ctype.h>
<stdio.h>
<string.h>
1
Which of the following function(s) is/are used for console input and output in C++?
put()
getline()
write()
All of these
4
In C++, isupper() and isalnum() functions belong to _____
<math.h>
<ctype.h>
<string.h>
<iomanip.h>
2
In c++, the functions write() and open() are defined in ______
<string.h>
<fstream.h>
<graphics.h>
<ctype.h>
2
The pointer which always stores the current active object address is _____
auto_ptr
this
p
None of these
2
Which of the following is a valid real constant in exponent form in C++?
172.E5
1.52E07
13,2E05
17.17E2.3
2
In C++, the header file required to use setpricision() is ______
<iostream.h>
<math.h>
<iomanip.h>
<utility.h>
3
In C++, if "A" is a character pointer, then the expression A++ will increment the pointer by _____ byte(s)
2
4
8
1
4
In C++, which of the statements is valid?
int &refs[10] ;
int a2[] = a ;
a + b = c ;
None of these
4
Which of the following statement is correct?
A reference has to be de-referenced to access a value.
A reference does not need to be de-referenced to access a value.
A reference has to be double de-referenced to access a value.
Whether a reference should be de-referenced or not depends on the type of the reference.
2
Which of the following is correct?
A reference is declared using * operator.
Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
A reference must always be initialized within classes.
A variable can have multiple references.
4
For the C++ statement: "int* p1, p2;", Which of the following is correct?
p1 and p2 both are pointers to int
p1 is a pointer to int
p2 is a pointer to int
Neither p1 nor p2 is a pointer to int
2
For the C++ statement "int *&r = p" (assuming that p is pointer to int), which of the following is true?
r is a pointer to p
r is a pointer to the memory location which p points to
r is a reference to p
r is a reference to the memory location which p points to
3
Which of the following C++ statements is wrong?
const int ci = 1024;
const int &rl = ci; (Assume ci is of type const int)
int &rl = ci; (Assume ci is of type const int)
None of these
3