Algorithmisation (40-80)

41. Thekeywordendl
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
42. Strings are character arrays. The last index of it contains the null-terminated character
\n
\t
\0
\1
43. Variables inside parenthesis of functions declarations have _____ level access
Local
Global
Module
Universal
 
44. Array indexing always starts with the number
0
1
-1
10
45. Which of the following accesses a variable in structure st1?
St1->var;
St1.var;
St1-var;
st1>var;
46. Which looping process is best used when the number of iterations is known?
For
While
Do-while
Nothing
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 <>
48. A memory address is…
Where a variable is stored.
Where a variable is defined.
Where a variable is declares.
Where a variable is print out.
49. The set of instructions that a computer will follow is known as..
Program
Variable
computer
Brackets
50. cin >> number; is
An output statement
A colon
A variable
An input statement
51. cout<< "How many items would you want?\n"; is
An output statement
A colon
A variable
An input statement
52. Int number; is
An output statement
A variable declaration
A variable
An input statement
53. If x is 0, what is the value of (!x == 0)?
True
False
2
15
54. How to create array with n integers?
Int n; cin>> n; int a
Int n; cin>> n; int& a; a
Int n; cin>> n; int* a; a
Int n; cin>> n; int a; a
55. Which class should be included to work with files?
Iostream
String
Cmath
Fstream
56. Which of the following is the output from the following C++
15 14 13 12 11 10
15 14 13 12 11 10 9
9
15
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
58. What is the value of x after the following statements int x, y, z; y=10 z=3 x = 3+y*z;
O 10
€¢ 33
O 3
O 0
59. What is the value of x after the following statements int x; x=15%4;
15
3
4
0
60. Which of the following is the output from the following C++ x=0; while(x<5) x++; cout<
5
0
4
6
61. Given the following code fragment, what is the final value of y
8
2
4
3
62. Which of the following is the output from the following C++
10
12
3
4
63. Which of the following is the output from the following C++code
6
0
4
5
64. Which of the following is the final value of y from the following C++ code
2
3
22
0
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
66. What is the value of x after the following code executes
10
11
13
0
{"name":"Algorithmisation (40-80)", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"41. Thekeywordendl, 42. Strings are character arrays. The last index of it contains the null-terminated character, 43. Variables inside parenthesis of functions declarations have _____ level access","img":"https://cdn.poll-maker.com/16-672598/61.jpg?sz=1200-00000000000946205300"}
Powered by: Quiz Maker