# Programmaing Languages and Technologies

Quiz by Айдана Шырманбай, updated more than 1 year ago Created by Айдана Шырманбай about 2 years ago
124
5

Olzhas

## Resource summary

### Question 1

Question
1. Specify the types of operator
• Logical, Bitwise, Arithmetic, Relational
• Mathematical, Bitwise, Arithmetic, Relational
• Assignment, Bitwise, Arithmetic, Relational
• Logical, Bitwise, Assignment, Relational

### Question 2

Question
2. Logical operators always evaluated from
• Left to right
• No difference
• Not sure
• Right to left

### Question 3

Question
3. When an equation uses more than one type of operator then the order of precedence has to be established with the different types of operators:
• Arithmetic, comparison, logical
• Comparison, logical, arithmetic
• Logical, arithmetic, comparison
• Arithmetic, logical, comparison

### Question 4

Question
4. Precedence for Logical Operators
• NOT, AND, OR
• OR, AND, NOT
• OR, NOT, AND
• AND, OR, NOT

### Question 5

Question
5. What is an array?
• An array is a series of elements of the different type placed in contiguous memory locations that can be individually referenced by adding an index to a unique.
• An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by multiplying an index to a unique identifier
• An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier
• An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a same identifier.

### Question 6

Question
6. When an array is partially initialized, the rest of its elements will automatically be set to zero
• False
• True
• Nothing
• All of them

### Question 7

Question
7. The whole array can be passed to a function. However, it can't be changed by the code in that function
• False
• All of them
• Nothing
• True

### Question 8

Question
8. What are the three steps in using a function?
• Definition, prototype, invocation
• Prototype, argument, signature
• Definition, invocation, argument

### Question 9

Question
9. write mpg() function prototype, that takes two type double arguments and returns a double
• Double mpg(double a, double b)
• Void mpg(){}
• Float mpg(int a){ float b = 1; return b;}
• Double mpg(int a, double b)

### Question 10

Question
10. What is data structure?
• is a group of data elements grouped together under one name
• is a group of data elements grouped together under two names.
• is a set of some elements grouped together under value
• is a group of data elements together with some name.

### Question 11

Question
11. The data elements in structure are also known as what?
• Members
• Data
• Objects
• None of the above

### Question 12

Question
12. What will be used when terminating a structure?
• Semicolon
• Colon
• Brackets
• Dot

### Question 13

Question
13. Which stream class is used to both read and write on files?
• Fstream
• Iostream
• Ofstream
• Ifstream

### Question 14

Question
14. Which stream class is only used to read files
• Ifstream
• Ofstream
• Iostream
• Fstream

### Question 15

Question
15. What is the difference between array and structure?
• Structure can include members of different data types
• No difference
• Only on their declaration
• Arrays can include only integers

### Question 16

Question
16. What is the output from the following program code?
• 10 10 10 10 10
• 11 11 11 11 11
• 10
• 0 1 2 3 4
• Error

### Question 17

Question
17. The OR (||) operator:
• Stops evaluation upon finding one condition to be true
• Has higher precedence that AND (&&) operator
• True if all conditions are true
• Associates from right to left

### Question 18

Question
18. Which of the following for headers is not valid for C++ code?
• for (integer i =0; j<10; i++);
• for (int i = 0; i<9; i++)
• for (int i = 0; i<8; i++)
• for (int i = 0; i<7; i++)
• all

### Question 19

Question
19. There might be functions with the same name, but different arguments. The function called is the one whose arguments match the invocation. What is this mean?
• Function overprocessing
• Argument type error
• Argument dispatch error

### Question 20

Question
20. Which of the following cannot be used to create a random numbers?
• structures
• float
• int
• none of the mentioned

### Question 21

Question
21. Please evaluate !(1 && !(0 || 1)).
• True
• False
• Unevaluatable
• Not sure

### Question 22

Question
22. What is the final value of x when the code int x; for(x=0; x<50; x++) {} is run?
• 10
• 50
• 0
• 51

### Question 23

Question
23. How many times is a do while loop guaranteed to loop?
• 0
• Infinitely
• 1
• Variable

### Question 24

Question
24. What is the output of the following code?
• value
• 77.5
• Float
• Variable

### Question 25

Question
25. Which of the following is a valid function call (assuming the function exists)?
• funct;
• funct x, y;
• funct();
• struct funct();

### Question 26

Question
26. Which of the following is a complete function?
• int funct();
• int funct(int x) {return x=x+1;}
• void funct[int] {cout&tl;<"Hello"}
• void funct{x} {cout<<"Hello"}

### Question 27

Question
27. Which of the following is required to avoid falling through from one case to the next?
• End;
• Break;
• Stop;
• A semicolon;

### Question 28

Question
28. Which of the following is the proper declaration of a pointer?
• int x;
• int &x;
• ptr x;
• int *x;

### Question 29

Question
29. Which of the following gives the memory address of integer variable a?
• *a;
• a;
• &a;

### Question 30

Question
30. Which of the following gives the memory address of a pointer a?
• a;
• *a;
• &a;

### Question 31

Question
31. Which of the following gives the value stored at the address pointed to by the pointer a?
• a;
• val(a);
• *a;
• &a;

### Question 32

Question
32. Which of the following gives the value stored at the address pointed to by the pointer ptr?
• ptr;
• val(ptr);
• *ptr;
• &ptr;

### Question 33

Question
33. Which of the following accesses a variable in structure b?
• b->var;
• b.var;
• b-var;
• b>var;

### Question 34

Question
34. Which of the following accesses a variable in structure mystruct?
• mystruct ->var;
• mystruct.var;
• mystruct -var;
• mystruct >var;

### Question 35

Question
35. Which of the following correctly accesses the seventh element stored in diana, an array with 100 elements?
• diana
• diana
• diana(7)
• diana;

### Question 36

Question
36. What is the correct way to write the condition y < x < z?
• ((y < x) && (x < z))
• ((y < x) || (x < z))
• ((y < x) & (x < z))
• ((y < x) AN (x < z))

### Question 37

Question
37. The value 132.54 can represented using which data type?
• Double
• Void
• Integer
• Bool

### Question 38

Question
38. In an assignment statement “ a=b; ” which of the following statement is true?
• The variable a and the variable b are equal.
• The value of b is assigned to variable a but the later changes on variable b will not effect the value of variable
• The value of variable a is assigned to variable b and the value of variable b is assigned to variable a.

### Question 39

Question
39. The difference between while structure and do structure for looping is
• In while statement the condition is tested at the end of first iteration
• In do structure the condition is tested at the beginning of first iteration
• The do structure decides whether to start the loop code or not whereas while statement decides whether to repeat the code or not
• In while structure condition is tested before executing statements inside loop whereas in do structure condition is tested before repeating the statements inside loop

### Question 40

Question
40. A function that calls itself for its processing is known as
• Inline Function
• Nested Function
• Recursive Function

### Question 41

Question
41. The keyword endl
• Ends the execution of program where it is written
• Ends the output in cout statement
• Ends the line in program. There can be no statements after endl
• Ends current line and starts a new line in cout statement

### Question 42

Question
42. Strings are character arrays. The last index of it contains the nullterminated character
• \n
• \t
• \0
• \1

### Question 43

Question
43. Variables inside parenthesis of functions declarations have _____ level access
• Local
• Global
• Module
• Universal

### Question 44

Question
44. Array indexing always starts with the number
• 0
• 1
• -1
• 10

### Question 45

Question
45. Which of the following accesses a variable in structure st1?
• st1->var;
• st1.var;
• st1-var;
• st1>var;

### Question 46

Question
46. Which looping process is best used when the number of iterations is known?
• For
• While
• Do-while
• Nothing

### Question 47

Question
47. If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending of the loop block?
• parentheses ( )
• braces { }
• brackets [ ]
• arrows < >

### Question 48

Question
• where a variable is stored.
• where a variable is defined.
• where a variable is declares.
• where a variable is print out.

### Question 49

Question
49. The set of instructions that a computer will follow is known as..
• program
• variable
• computer
• brackets

### Question 50

Question
50. cin >> number; is
• an output statement
• a colon
• a variable
• an input statement

### Question 51

Question
51. cout << "How many items would you want?\n"; is
• an output statement
• a colon
• a variable
• an input statement

### Question 52

Question
52. int number; is
• an output statement
• a variable declaration
• a variable
• an input statement

### Question 53

Question
53. If x is 0, what is the value of (!x == 0)?
• True
• False
• 2
• 15

### Question 54

Question
54. How to create array with n integers?
• int n; cin >> n; int a = new# int[n];
• int n; cin >> n; int& a; a = new int[n];
• int n; cin >> n; int* a; a = new int[n];
• int n; cin >> n; int a; a = new% int[n];

### Question 55

Question
55. Which class should be included to work with files?
• iostream
• string
• cmath
• fstream

### Question 56

Question
56. Which of the following is the output from the following C++ code?
• 15 14 13 12 11 10
• 15 14 13 12 11 10 9
• 9
• 15

### Question 57

Question
57. If originally x=0, y=1, and z=3, what is the value of x, y, and z after executing the following code ?
• x=0 y=3 z=3
• x=0 y=1 z=3
• x=3 y=3 z=3
• x=3 y=1 z=0

### Question 58

Question
58. What is the value of x after the following statements?
• 10
• 33
• 3
• 0

### Question 59

Question
59. What is the value of x after the following statements?
• 15
• 3
• 4
• 0

### Question 60

Question
60. Which of the following is the output from the following C++?
• 5
• 0
• 4
• 6

### Question 61

Question
61. Given the following code fragment, what is the final value of y?
• 8
• 2
• 4
• 3

### Question 62

Question
62. Which of the following is the output from the following C++ code
• 10
• 12
• 3
• 4

### Question 63

Question
64. Which of the following is the final value of y from the following C++ code
• 2
• 3
• 22
• 0

### Question 64

Question
63. Which of the following is the output from the following C++ code?
• 6
• 0
• 4
• 5

### Question 65

Question
65. Which of the following is the final value of ‘i’ from the following C++ code ?
• 5
• 4
• 0 1 2 3 4
• 0 1 2 3 4 5

### Question 66

Question
66. What is the value of x after the following code executes?
• 10
• 11
• 13
• 0

### Question 67

Question
67. Given the following code, what is the final value of i?
• 2
• 4
• 3
• 0

### Question 68

Question
68. What is the value of x after the following code executes?
• 10
• 11
• 13
• 0

### Question 69

Question
69. What is the output of the following code segment?
• 15
• 25
• 5
• 0

### Question 70

Question
70. What does the following code print to the screen?
• 7
• cout
• int
• world

### Question 71

Question
71. What is the value of x after the following statements?
• 15
• 10
• 5
• 25

### Question 72

Question
72. What is the value of x after the following statements?
• 25
• 4
• 5
• 1

### Question 73

Question
73. What is the value of x after the following code executes?
• 10
• 11
• 23
• 13

### Question 74

Question
74. Given the following code, what is the final value of i?
• 5
• 2
• 3
• 0

### Question 75

Question
75. Given the following code, what is the final value of i?
• 4
• 6
• 5
• 0

### Question 76

Question
76. Which of the following is the valid array declaration
• int num(5)
• int mycat
• Array. double marks
• Myarray.counter int

### Question 77

Question
77. What is the output of the following code?
• 7
• Value
• 1
• 6

### Question 78

Question
78. What is the value of x after the following statements ?
• 11
• 10
• 0
• 12

### Question 79

Question
79. What is the final output of the following code fragment ?
• 22
• 23
• 20
• 0

### Question 80

Question
80. Solve the following piece of code and choose the best answer?
• The function addition is called by passing the values
• The function addition is called by passing reference
• Both of above
• None of above

### Question 81

Question
81. If the type specifies of parameters of a function is followed by an ampersand &, that function call is…
• Pass by value
• Pass by reference

### Question 82

Question
82. Which of the following gives the memory address of a pointer pt1?
• *pt1;
• pt1;
• &pt1;

### Question 83

Question
83. What is the value of x after the following statement?
• 1.75
• 50
• 30
• 20

### Question 84

Question
84. What is the final value of x after the following fragment of codeexecutes ?
• Infinite loop
• Never
• 1
• 0

### Question 85

Question
85. What is the value of x after the following statement?
• 3.75
• 1.75
• 2
• 0

### Question 86

Question
86. What is the value of x after the following statements ?
• 7
• 10
• 3
• 33

### Question 87

Question
87. What is the value of x after the following statements?
• 70
• 30
• 3
• 33

### Question 88

Question
88. Given the following code fragment, what is the output
• 5
• That is all. Goodbye
• X is bigger than 5
• X

### Question 89

Question
89. How many times is "Hi" printed to the screen ?
• 0
• 1
• 14
• 15

### Question 90

Question
90. How to read file and take first string?
• File should be created before running the code : “input.txt” .
• No need to create file before running the code, code will create it by itself.
• File should be created before running the code: “input.txt” .
• No need to create file before running the code, code will create it by itself .

### Question 91

Question
91. How to write to file?
• File should be created before running the code: “output.txt” .
• No need to create file before running the code, code will create it by itself .
• File should be created before running the code: “output.txt” .
• No need to create file before running the code, code will create it by itself

### Question 92

Question
92. There is given array with n elements, created as pointer. How to remove it correctly?
• delete a;
• delete[] a;
• remove[] a;
• remove a;

### Question 93

Question
93. How to write correct recursive function for making sum of n numbers?
• This
• This
• This
• This

### Question 94

Question
94. How to make several items in structure? Just think that you have “HOME”, and n items in it
• This
• This
• This
• This

### Question 95

Question
95. Find mistake of next cod ?
• No mistakes, it will just read from file and print first string in command line
• Mistake in opening file, should be: file.open(“input.txt”);
• It should write in other file; it can’t write directly to command line.
• It should read from read from file, when we want to write in command line.

### Question 96

Question
96. What will print in command line next code ?
• Read first string from file “input.txt”, and print it in command line.
• It will give an error, because, file should read in this way: file.open(“input.txt”);
• It won’t print anything.
• Read all lines and print it in new file.

### Question 97

Question
97. Which one will be correct function for ?
• This
• This
• This
• This

### Question 98

Question
98. There are given array “numbers” with 10 numbers. How to make sum of all numbers, which are located in odd indexes?
• This
• This
• This
• This

### Question 99

Question
99. There is given string named “str”. How to print in command line length of str?
• cout << str.count();
• cout << str.length;
• cout << str.lenth();
• cout >> str.lenth();

### Question 100

Question
100. How to implement array of chars with 10 elements?
• char* chs; chs = new char(10);
• char chs; chs = char;
• char chs;
• char chs[] = new char;

### Question 101

Question
101. How to implement array of integer numbers with n elements, and how to delete them correctly?
• int n; cin >> n; int* a; a = new% int[n]; delete[] a;
• int n; cin >> n; int& a; a = new int[n]; delete[] a;
• int n; cin >> n; int* a; a = new@ int[n]; delete[n] a;
• int n; cin >> n; int* a; a = new& int[n]; for(int i=0; i<n; i++) delete a;

### Question 102

Question
102. How to get whole string in one line (in command line)?
• string s; getline(cin, s);
• string s; getline(cout, s);
• string s; cin >> s;
• string s; cout << s;

### Question 103

Question
103. How to get whole string in one line (in file)?
• ifstream file; string s; getline(file, s);
• ifstream file; string s; getline(cin, s);
• ifstream file; string s; getline(cout, s);
• ifstream file; string s; file >> s;

### Question 104

Question
104. Why do we need library?
• To work with strings.
• To work with files.
• To work with mathematical functions.
• To work with our own libraries.

### Question 105

Question
105. Why do we need library <cmath>?
• To work with strings.
• To work with mathematical functions.
• To work with command line.
• To work with our own libraries.

### Question 106

Question
106. Where is the mistake of the code ?
• Variable “a” do not have any values.
• Library didn’t included.
• Library didn’t included.
• Library didn’t included

### Question 107

Question
107. What will be printed in the part of the cod?
• 1 4 7 10
• 0 3 6 9
• 3 6 9
• 9 6 3 0

### Question 108

Question
108. What will be printed in the part of the code?
• 0 8 16 24 32
• 2 10 18 26 34
• 6 12 20 28 36
• 4 10 18 26 34

### Question 109

Question
109. Which of the following is the proper keyword to allocate memory?
• new
• malloc
• create
• value

### Question 110

Question
110. Which of the following is the proper keyword to deallocate memory?
• free
• delete
• clear
• remove

### Question 111

Question
111. Assume if A = 10; and B = 15; with using bitwise OR operator Find A||B
• 10
• 15
• 61
• 13

### Question 112

Question
112. The notation of logical NOT operator in a C++ program is
• !
• :
• ;
• None of above

### Question 113

Question
113. Which of the following denote C++ looping statement?
• All of them
• for
• while
• do-while

### Question 114

Question
Cin in C++ program uses the operator
• >>
• <<
• >
• ||

### Question 115

Question
What is the minimum number of times a do loop would definitely get executed?
• 1
• inf
• 0
• None of the above

### Question 116

Question
The function named as exforsys declared as int exforsys(float x, double y) has return type as
• int
• char
• double
• string

### Question 117

Question
Which of the following is mandatory for all C++ program?
• main()
• void()
• system()
• None of the above

### Question 118

Question
Which of the following denote newline character in C++ program?
• “\n”
• end
• “/n”
• enl

### Question 119

Question
Which of the following is used to group a set of objects and functions under a name?
• namespace
• name
• namearea
• areaname

### Question 120

Question
What is the notation used to place block of statements in a looping structure in C++?
• { }
• [ ]
• ( )
• " "

### Question 121

Question
What is the notation used show the size of array?
• [ ]
• { }
• ( )
• " "

### Question 122

Question
How many values can be returned by a C++ function?
• 1
• Inf
• 0
• None of the above

### Question 123

Question
123. Which of the following is returned by the system if a C++ program completes successfully?
• 0
• 1
• -1
• Inf

### Question 124

Question
124. The variables that can be used only within the function in which it is declared is called as
• local
• global
• both of them
• none of them

### Question 125

Question
125. Comments in C++ program is written by using
• //
• --
• <!-->
• <>

### Question 126

Question
126. The array exforsys can be declared using pointers as
• * exforsys[ ]
• exforsys[ ]
• \$exforsys[ ]
• &amp;exforsys[ ]

### Question 127

Question
127. Default size of int in c++ (in bytes)
• 4
• 8
• 16
• 2

### Question 128

Question
128. Default size of double in c++ (in bytes)
• 16
• 8
• 4
• 2

### Question 129

Question
129. Default value of boolean
• false
• true

### Question 130

Question
130. If a function in C++ does not return a value then its return type is denoted as
• void
• int
• double
• bool

### Question 131

Question
131. A user defined header file is included by following statement in general.
• #include "file.h"
• #include <file.h>
• #include file.h
• #include <file>

### Question 132

Question
132. An inline function can execute faster than a normal function.
• True
• False

### Question 133

Question
133. What value must a destructor return?
• Destructors do not return a value.
• A pointer to the class.
• An object of the class.
• A status code determining whether the class was destructed correctly

### Question 134

Question
134. What character ends all strings?
• ‘\o’
• ‘\n’
• ‘’
• ‘.’

### Question 135

Question
135. Which of the following reads in a string named x with one hundred characters?
• cin.getline(x, 100, &#39;\n&#39;);
• cin.getline(100, x, &#39;\n&#39;);

### Question 136

Question
136. Which of the following functions compares two strings?
• strcmp();
• cmp();
• stringcompare();
• compare();

### Question 137

Question
137. Which of the following adds one string to the end of another?
• strcat();
• append();

### Question 138

Question
138. Which of the following correctly declares an array?
• int anarray;
• int anarray;
• anarray{10};
• array anarray;

### Question 139

Question
139. What is the index number of the last element of an array with 29 elements?
• 28
• 29
• 0
• 27

### Question 140

Question
140. Which of the following is a two-dimensional array?
• int anarray;
• array anarray;
• int array[20, 20];
• char array;

### Question 141

Question
141. Which of the following correctly accesses the seventh element stored in foo, an array with 100 elements?
• foo
• foo
• foo(6)
• foo

### Question 142

Question
142. Which of the following accesses a variable in structure b?
• b.var
• b-&gt;var
• b-var
• b&gt;var

### Question 143

Question
143. Which of the following accesses a variable in structure *b?
• b-&gt;var
• b.var
• b-var
• b&gt;var

### Question 144

Question
144. Which of the following is a properly defined struct?
• struct a_struct {int a;};
• struct a_struct {int a;}
• struct {int a;}
• struct a_struct int a;

### Question 145

Question
145. Which properly declares a variable of struct foo?
• foo var
• struct foo
• foo
• int foo

### Question 146

Question
146. Which of the following is the proper declaration of a pointer?
• int *x;
• int &amp;x;
• ptr x;
• int x;

### Question 147

Question
147. Which of the following gives the memory address of integer variable a?
• &amp;a;
• *a;
• a;

### Question 148

Question
148. Which of the following gives the value stored at the address pointed to by the pointer a?
• *a;
• &amp;a;
• a;
• val(a);

### Question 149

Question
149. Which of the following is the proper keyword to allocate memory?
• new
• malloc
• create
• value

### Question 150

Question
150. Which of the following is the proper keyword to deallocate memory?
• delete
• clear
• remove
• free

### Question 151

Question
151. What is the notation used to place block of statements in a looping structure in C++?
• { }
• [ ]
• ( )
• " "

### Question 152

Question
152. What is the notation used show the size of array?
• [ ]
• { }
• ( )
• " "

### Question 153

Question
153. How many values can be returned by a C++ function?
• 1
• Inf
• 0
• None of the above

### Question 154

Question
154. Which of the following is returned by the system if a C++ program completes successfully?
• 0
• 1
• -1
• Inf

### Question 155

Question
155. The variables that can be used only within the function in which it is declared is called as
• local
• global
• both of them
• none of them

### Question 156

Question
156. Comments in C++ program is written by using
• //
• --
• <!-->
• <>

### Question 157

Question
157. The array exforsys can be declared using pointers as
• * exforsys[ ]
• exforsys[ ]
• \$exforsys[ ]
• &amp;exforsys[ ]

### Question 158

Question
158. Default size of int in c++ (in bytes)
• 4
• 8
• 16
• 2

### Question 159

Question
159. Default size of double in c++ (in bytes)
• 16
• 8
• 4
• 2

### Question 160

Question
160. Default value of boolean
• false
• true

### Question 161

Question
161. If a function in C++ does not return a value then its return type is denoted as
• void
• int
• double
• bool

### Question 162

Question
162. A user defined header file is included by following statement in general.
• #include “file.h”
• #include <file.h>
• #include file.h
• #include <file>

### Question 163

Question
163. An inline function can execute faster than a normal function.
• True
• False

### Question 164

Question
164. What value must a destructor return?
• Destructors do not return a value.
• A pointer to the class.
• An object of the class.
• A status code determining whether the class was destructed correctly

### Question 165

Question
165. What character ends all strings?
• ‘\o’
• ‘\n’
• ‘’
• ‘.’

### Question 166

Question
166. Which of the following reads in a string named x with one hundred characters?
• cin.getline(x, 100, &#39;\n&#39;);
• cin.getline(100, x, &#39;\n&#39;);

### Question 167

Question
167. Which of the following functions compares two strings?
• strcmp();
• cmp();
• stringcompare();
• compare();

### Question 168

Question
168. Which of the following adds one string to the end of another?
• strcat();
• append();

### Question 169

Question
169. Which of the following correctly declares an array?
• int anarray;
• int anarray;
• anarray{10};
• array anarray;

### Question 170

Question
170. What is the index number of the last element of an array with 29 elements?
• 28
• 29
• 0
• 27

### Question 171

Question
171. Which of the following is a two-dimensional array?
• int anarray;
• array anarray;
• int array[20, 20];
• char array;

### Question 172

Question
172. Which of the following correctly accesses the seventh element stored in foo, an array with 100 elements?
• foo
• foo
• foo(6)
• foo

### Question 173

Question
173. Which of the following accesses a variable in structure b?
• b.var
• b-&gt;var
• b-var
• b&gt;var

### Question 174

Question
174. Which of the following accesses a variable in structure *b?
• b-&gt;var
• b.var
• b-var
• b&gt;var

### Question 175

Question
175. Which of the following is a properly defined struct?
• struct a_struct {int a;};
• struct a_struct {int a;}
• struct {int a;}
• struct a_struct int a;

### Question 176

Question
176. Which properly declares a variable of struct foo?
• foo var
• struct foo
• foo
• int foo

### Question 177

Question
177. Which of the following is the proper declaration of a pointer?
• int *x;
• int &amp;x;
• ptr x;
• int x;

### Question 178

Question
178. Which of the following gives the memory address of integer variable a?
• &a;
• *a;
• a;

### Question 179

Question
179. Which of the following gives the value stored at the address pointed to by the pointer a?
• *a;
• &amp;a;
• a;
• val(a);

### Question 180

Question
180. Which of the following is the proper keyword to allocate memory?
• new
• malloc
• create
• value

### Question 181

Question
1. Use the following declaration and initialization to evaluate the Java expressions int a = 2, b = 3, c = 4, d = 5; cout &lt;&lt; ( b * a + c *d --);
• 26
• 24
• 22
• 28

### Question 182

Question
181. Use the following declaration and initialization to evaluate the Java expressions int a = 2, b = 3, c = 4, d = 5; cout &lt;&lt; (++d);
• 6
• 5
• 1
• 4

### Question 183

Question
182. Use the following declaration and initialization to evaluate the Java expressions int a = 2, b = 3, c = 4, d = 5; cout &lt;&lt; (c = d + c++);
• 9
• 10
• 8
• 4

### Question 184

Question
183. Use the following declaration and initialization to evaluate the Java expressions int a = 2, b = 3, c = 4, d = 5; cout &lt;&lt; (c = d + ++c);
• 10
• 9
• 4
• 8

### Question 185

Question
2. In a class definition, the special method provided to be called to create an instance of that class is known as a/an
• Constructor
• Destructor
• Object
• Compiler

### Question 186

Question
184. ……………….. are used to document a program and improve its readability.
• Keywords
• Control structures
• Blocks

### Question 187

Question
185. Members of a class specified as ……………….. are accessible only to methods of that class.
• private
• public
• protected
• none of them

### Question 188

Question
186. Use the following declaration and initialization to evaluate the Java expressions int a = 2, b = 3, c = 4, d = 5; cout &lt;&lt; ( --b * a + c *d --);
• 24
• 21
• 22
• 28

### Question 189

Question
187. Use the following declaration and initialization to evaluate the Java expressions int a = 2, b = 3, c = 4, d = 5; cout &lt;&lt; (a++);
• 2
• 1
• Syntax error
• 3

### Question 190

Question
188. Use the following declaration and initialization to evaluate the Java expressions int a = 2, b = 3, c = 4, d = 5; cout &lt;&lt; (c = c++);
• 4
• 5
• 8
• 2

### Question 191

Question
189. Identify, from among the following, the incorrect variable name
• 2ndName
• _theButton
• my2ndFont.
• CurrentWeatherStateofplanet

### Question 192

Question
190. An overloaded method consists of: i) The same method name with different types of parameters ii) The same method name with different number of parameters iii) The same method name and same number and type of parameters
• Both i and ii
• all of them
• none of them
• only i

### Question 193

Question
191. You read the following statement in a C++ program that compiles and executes. submarine.dive(depth); What can you say for sure?
• dive must be a method.
• depth must be an int
• submarine must be the name of a class
• submarine must be a method.

### Question 194

Question
192. What is the type and value of the following expression? - 4 + 1/2 + 2*-3 + 5.0
• double -5.0
• int -5
• double -4.5
• none of the above

### Question 195

Question
193. What is printed by the following statement? cout &lt;&lt; (“Hello,\nworld!”);
• Hello, world!
• Hello, \nworld!
• Hello, world
• “Hello, \nworld!”

### Question 196

Question
194. Which of the following variable declaration would NOT compile in a java program?
• int 1_var;
• int var_1;
• int var;
• int VAR;

### Question 197

Question
3. _________ is a paradigm based on the concepts of “object” that contains data and methods
• Object-oriented programming
• Object-based programming
• Data-oriented programming
• Method-oriented programming

### Question 198

Question
195. Two or more methods with same name in the same class with different arguments is called as
• Method overriding
• Method overridden
• none of the above

### Question 199

Question
196. Constructors are used to
• Initialize a newly create object.
• Free memory
• To create a subclass
• To build a user interface

### Question 200

Question
197. Syntax of loop for (declaration; condition; increment/decrement){}
• False
• True

### Similar

PRESUNSIONES Y SUPUESTOD DE LA PNL
Respiración en PNL
TENEMOS LA CLAVE DEL INCONSCIENTE pnl
Programación Neurolingüistica 2
Programación Neuro-Lingüística
¿Qué es Programación Neurolingüística?
Proyecto de vida
¿Qué es Programación Neurolingüística?
Precursores y Presuposiciones de la PNL
Programación Neurolingüistica