Поможем написать учебную работу
Если у вас возникли сложности с курсовой, контрольной, дипломной, рефератом, отчетом по практике, научно-исследовательской и любой другой работой - мы готовы помочь.
Если у вас возникли сложности с курсовой, контрольной, дипломной, рефератом, отчетом по практике, научно-исследовательской и любой другой работой - мы готовы помочь.
Test of programming languages
1 For what operating system was originally created by the C language?
b) Unix +
2 Which of these languages are high-level languages?
a) C++
b) Си
c) C#
d) Java
e) Fortran
3 What do you call a tool that converts the source code into an executable file?
a) compiler
b) CPU
c) debugger+
d) compiler
e) optimizer
f) garbage
4 As a sequence of steps to solve the problem?
a) process
b) pseudo
c) block diagram+
d) program
e) code
f) algorithm
5 As a language, similar to the programming language?
a) process
b) pseudo +
c) block diagram
d) program
e) code
f) algorithm
6 Which of the following commands pseudo suitable for display?
a) goto
b) output
c) print
d) display
e) input
f) get
7 How many entry points can have a flow chart?
a) 1
b) 2
c) 3
d) 4
e) 5
f) any number of
8 How operands is a binary operator?
b) 2+
9 How operands is a unary operator?
a) 1
b) 2
c) 3
d) 4
e) 5
f) any number of
10 How to set a single-line comment in C?
a) /*…*/
b) {…}
c) (…)
d) //…
e) […]
f) <…>
11 How to set a multi-line comment in C?
a) /*…*/ +
12 Mark the correct identifikators.
b) _1 +
13 What is a qualifier for the number in octal calculation?
d) %d +
14 What is a qualifier for a real number?
a) %x
b) %o
c) %c
d) %d
e) %f
f) %s
15 C language is case sensitive.
a) yes +
16 As indicated by the modulo operation in C?
a) div
b) /
c) /=
d) mod
e) %
f) &
17 Can start with a numeric identifier?
a) yes
b) no
18 That will lead the next program:
float x = 10/3;
printf("%f", x);?
a) 3.333333+
19 Does a C empty type?
a) yes
b) no
20 What operation can be increased by one variable x?
b) x++
21 What preprocessor can create a constant?
f) #define +
22 What special character moves the cursor to a new line?
a) \n +
23 As indicated by a real type in C?
e) float+
24 As indicated by an integer type in C?
a) int +
25 As translated into English by the word variable?
a) integer
b) character
c) variable
d) type
e) string
f) length
26 How many bits in a byte?
d) 8 +
27 What is the number 10 in the binary system?
b) 1010+
28 As translated into English by the word line?
e) string +
29 What is the comparison operation is "not equal »?
e) != +
30 What is the logic operation "or»?
c) || +
31 What is the logical operation "and»?
f) ~ +
32 What is a qualifier for the string?
b) %o+
33 What is a qualifier for a decimal?
e) %f +
34 What do you call a library of mathematical functions?
a) numbers.h
b) math.h
c) stdio.h
d) mathematics.h
e) calculations.h
f) stdafx.h
35 What is a qualifier for the octal?
a) %x
b) %o
c) %c
d) %d
e) %f
f) %s
36. The programming language C + + developed
Bjarne Stroustrup+
37. Which reserved word program transfers control if the value of a variable or expression of the switch does not match any of the constant expression?
default
other
all
contingency
38. Which of the following statements is not a cycle?
repeat until+
39. Which of the following types of data is not a data type in C + +?
Real+
40. What is, by default, returns the operating system software on success?
The program does not return.
0+
41. Indicate the correct form of write cycles do while?
)// form of writing the operator of cycle do while:
do // start of the cycle do while
{
/* block of statements */;
}
while (/*execution condition of cycle*/); // end of cycle do while
42. Enter the correct definition of the main function in accordance with the specification of ANSI
int main() |
43. To include the header file in the program in C + +, such as iostream must write:
o #include <> с iostream inside the brackets
44. Simple data types in C + +.
integer int, real float or double, character char
45. Cycle with the precondition?
do while
46. Which statement does not permit a constant transition from one expression to another?
break;
Stop;
end;
semicolon
47. What function should contain all the programs in C + +?
main() |
48. Which of the following entries - correct comment in C + +?
/* Comments */
49. What special characters are used to indicate the beginning and end of the code block?
begin end
( )
{ }
< >
50. The general format of the operator of multiple choice - switch
switch (switch_expression) { case constant1, case constant2: statement1; [break;] case constantN: statementN; [break;] [default: statement N+l;] } |
switch (switch_expression) { case constant1: statement1; [break;] case constant2: statement2; [break;] case constantN: statementN; [break;] [else: statement N+l;] } |
switch (switch_expression) { case constant1: statement1; [break;] case constant2: statement2; [break;] case constantN: statementN; [break;] [default: statement N+l;] } |
51. Program that translates source program in the source language into an equivalent output of a program on the resulting language is called:
o translator
o interpreter
o scanner
o compiler
52. Which service sign is placed after the operator case ?
:
;
-
.
53. Operator constant declarations
const := ;
const = ;
const =
54. Structure variable declarations in C + +
[=];< идент. 2>,…;
[==]; < идент. 2>,…;
[=], < идент. 2>,…;
[:=], < идент. 2>,…;
55. Which of the following statements - the operator to compare two variables?
==
equal
:=
=
56. What will be equal to the variable a, after executing this code int a; for(a = 0; a < 10; a++) {}?
9
1
10
57. Specify object-oriented programming language
С++
Java
Eiffel
All answers
58. The body of any loop is executed as long as its condition...
o true
o false
o there is no condition in the loop
59. How long will the statements in the loop while (x < 100)?
o As long as x is Stam
o As long as x is less than or equal to Stam
o As long as x is strictly less than one hundred
o As long as x is greater than one hundred
60. C + + name suggested
o Ken Thompson
o Donald Knuth
o Rick Massitti
o Bjarne Stroustrup
61. What programming environment designed for software development?
MVS, Code::Blocks, QT Creator, AutoCAD, Eclipse
MVS, NetBeans, QT Creator, RAD Studio, Dev-C++
MVS, Code::Blocks, QT Creator, RAD Studio, MathCAD
62. Be printed?
int main() { for (int i = 0; i < 4; ++i) { switch (i) { case 0 : std::cout << "0"; case 1 : std::cout << "1"; continue; case 2 : std::cout << "2"; break; default : std::cout << "D"; break; } std::cout << "."; } return 0; } |
Compile Error in line 10
0.1.2.
0112.D.
011.2.D
01.2.D.
63. Cycle with postcondition?
do while
while
for
64. What are the signs most of the ends of lines of code in C + +?
;
,
:
.
65. What is the result of the following code fragment?
?
int x = 0; switch(x) { case 1: cout << " One "; case 0: cout << "null"; case 2: cout << " Hello World "; } |
o nulPrivet world
o zero
o One
o Hello World
66 For what operating system was originally created by the C language?
a) Windows
b) Unix
c) MacOS
d) Linux
e) Dos
f) Android
67 Which of these languages are high-level languages?
a) C++
b) Си
c) C#
d) Java
e) Fortran
f) assembler
68 What do you call a tool that converts the source code into an executable file?
a) compiler
b) CPU
c) debugger
d) compiler
e) optimizer
f) garbage
69 As a sequence of steps to solve the problem?
a) process
b) pseudo
c) block diagram
d) program
e) code
f) algorithm
70 As a language, similar to the programming language?
a) process
b) pseudo
c) block diagram
d) program
e) code
f) algorithm
71 Which of the following commands pseudo suitable for display?
a) goto
b) output
c) print
d) display
e) input
f) get
72 How many entry points can have a flow chart?
a) 1
b) 2
c) 3
d) 4
e) 5
f) any number of
73 How operands is a binary operator?
a) 1
b) 2
c) 3
d) 4
e) 5
f) any number of
74 How operands is a unary operator?
a) 1
b) 2
c) 3
d) 4
e) 5
f) any number of
75 How to set a single-line comment in C?
a) /*…*/
b) {…}
c) (…)
d) //…
e) […]
f) <…>
76 How to set a multi-line comment in C?
a) /*…*/
b) {…}
c) (…)
d) //…
e) […]
f) <…>
77 Mark the correct identifikators.
a) int
b) _1
c) $x
d) int1
e) 1float
f) xyz
78 What is a qualifier for the number in octal calculation?
a) %x
b) %o
c) %g
d) %d
e) %f
f) %s
79 What is a qualifier for a real number?
a) %x
b) %o
c) %c
d) %d
e) %f
f) %s
80 C language is case sensitive.
a) yes
b) no
81 As indicated by the modulo operation in C?
a) div
b) /
c) /=
d) mod
e) %
f) &
82 Can start with a numeric identifier?
a) yes
b) no
83 That will lead the next program:
float x = 10/3;
printf("%f", x);?
a) 3.333333
b) 3.000000
c) 3
d) 3.33
e) 4
f) 3.333
84 Does a C empty type?
a) yes
b) no
85 What operation can be increased by one variable x?
a) x+1
b) x++
c) x+
d) x=+1
e) x++1
f) +1x
86 What preprocessor can create a constant?
a) #include
b) #constant
c) #new
d) #create
e) #make
f) #define
87 What special character moves the cursor to a new line?
a) \n
b) \t
c) \r
d) \ln
e) \newline
f) \a
88 As indicated by a real type in C?
a) int
b) real
c) string
d) char
e) float
f) void
89 As indicated by an integer type in C?
a) int
b) real
c) integer
d) char
e) float
f) void
90 As translated into English by the word variable?
a) integer
b) character
c) variable
d) type
e) string
f) length
91 How many bits in a byte?
a) 2
b) 4
c) 6
d) 8
e) 10
f) 16
92 What is the number 10 in the binary system?
a) 1111111111
b) 1010
c) 100
d) 10
e) 101
f) 110
93 As translated into English by the word line?
a) integer
b) character
c) variable
d) type
e) string
f) length
94 What is the comparison operation is "not equal »?
a) <>
b) =!
c) <=
d) > <
e) !=
f) >=
95 What is the logic operation "or»?
a) or
b) &
c) ||
d) and
e) &&
f) ~
96 What is the logical operation "and»?
a) or
b) &
c) ||
d) and
e) &&
f) ~
97 What is a qualifier for the string?
a) %x
b) %o
c) %c
d) %d
e) %f
f) %s
98 What is a qualifier for a decimal?
a) %x
b) %o
c) %c
d) %d
e) %f
f) %s
99 What do you call a library of mathematical functions?
a) numbers.h
b) math.h
c) stdio.h
d) mathematics.h
e) calculations.h
f) stdafx.h
100 What is a qualifier for the octal?
a) %x
b) %o
c) %c
d) %d
e) %f
f) %s
101. The programming language C + + developed
Ken Thompson
o Niklaus Wirth
o Bjarne Stroustrup
o Donald Knuth
102. Which reserved word program transfers control if the value of a variable or expression of the switch does not match any of the constant expression?
default
other
all
contingency
103. Which of the following statements is not a cycle?
for
repeat until
do while
while
104. Which of the following types of data is not a data type in C + +?
real
double
float
int
105. What is, by default, returns the operating system software on success?
The program does not return.
0
1
-1
106. Indicate the correct form of write cycles do while?
// form of writing the operator of cycle do while: do // start of the cycle do while { /* block of statements */; } while (/*execution condition of cycle */) // end of cycle do while |
// form of writing the operator of cycle do while: do // start of the cycle do while { /* block of statements */; } while (/*execution condition of cycle*/); // end of cycle do while |
// form of writing the operator of cycle do while: do // start of the cycle do while { /* block of statements */; } while {/* execution condition of cycle */} // end of cycle do while |
107. Enter the correct definition of the main function in accordance with the specification of ANSI
void main(void) |
int main() |
int main(void) |
void main() |
108. To include the header file in the program in C + +, such as iostream must write:
include #iostream,h;
#include <> с iostream inside the brackets
include (iostreamh)
#include <>; с iostream.h inside the brackets
109. Simple data types in C + +.
integer int, real float or real, character char
integer bool, real float or double, character string
integer int, real float or double, character string
integer int, real float or double, character char
110. Cycle with the precondition?
while
for
do while
111. Which statement does not permit a constant transition from one expression to another?
break;
Stop;
end;
semicolon
112. What function should contain all the programs in C + +?
program() |
system() |
main() |
start() |
113. Which of the following entries - correct comment in C + +?
*/ Comments */
/* Comments */
** Comments **
{ Comments }
114. What special characters are used to indicate the beginning and end of the code block?
begin end
( )
{ }
< >
115. The general format of the operator of multiple choice - switch
switch (switch_expression) { case constant1, case constant2: statement1; [break;] case constantN: statementN; [break;] [default: statement N+l;] } |
switch (switch_expression) { case constant1: statement1; [break;] case constant2: statement2; [break;] case constantN: statementN; [break;] [else: statement N+l;] } |
switch (switch_expression) { case constant1: statement1; [break;] case constant2: statement2; [break;] case constantN: statementN; [break;] [default: statement N+l;] } |
116. Program that translates source program in the source language into an equivalent output of a program on the resulting language is called:
o translator
o interpreter
o scanner
o compiler
117. Which service sign is placed after the operator case ?
:
;
-
.
118. Operator constant declarations
const := ;
const = ;
const =
119. Structure variable declarations in C + +
[=];< идент. 2>,…;
[==]; < идент. 2>,…;
[=], < идент. 2>,…;
[:=], < идент. 2>,…;
120. Which of the following statements - the operator to compare two variables?
==
equal
:=
=
121. What will be equal to the variable a, after executing this code int a; for(a = 0; a < 10; a++) {}?
9
1
10
122. Specify object-oriented programming language
С++
Java
Eiffel
All answers
123. The body of any loop is executed as long as its condition...
o true
o false
o there is no condition in the loop
124. How long will the statements in the loop while (x < 100)?
o As long as x is Stam
o As long as x is less than or equal to Stam
o As long as x is strictly less than one hundred
o As long as x is greater than one hundred
125. C + + name suggested
o Ken Thompson
o Donald Knuth
o Rick Massitti
o Bjarne Stroustrup
126. What programming environment designed for software development?
MVS, Code::Blocks, QT Creator, AutoCAD, Eclipse
MVS, NetBeans, QT Creator, RAD Studio, Dev-C++
MVS, Code::Blocks, QT Creator, RAD Studio, MathCAD
127. Be printed?
int main() { for (int i = 0; i < 4; ++i) { switch (i) { case 0 : std::cout << "0"; case 1 : std::cout << "1"; continue; case 2 : std::cout << "2"; break; default : std::cout << "D"; break; } std::cout << "."; } return 0; } |
Compile Error in line 10
0.1.2.
0112.D.
011.2.D
01.2.D.
128. Cycle with postcondition?
do while
while
for
129. What are the signs most of the ends of lines of code in C + +?
;
,
:
.
130. What is the result of the following code fragment?
?
int x = 0; switch(x) { case 1: cout << " One "; case 0: cout << "null"; case 2: cout << " Hello World "; } |
o nulPrivet world
o zero
o One
o Hello World