Frage 1
Frage
1. C-style languages are
Antworten
-
a) C, C#
-
b) C, C++
-
c) C, C#, C++
-
d) C, C#, C++, Java
-
e) C#, C++
Frage 2
Frage
2. Choose the incorrect statement for C style languages.
Antworten
-
a) semicolons are not used to denote the end of a statement
-
b) curly brackets are used to group statements
-
c) variables are assigned using an equals sign, but compared using two consecutive equals sign
-
d) square brackets are used with arrays
-
e) a, b, c, d
Frage 3
Frage
3. Which aspects does variable have?
Antworten
-
a) type, size and memory address
-
b) memory address, type and value
-
c) type and value
-
d) value, size and memory address
Frage 4
Frage
4. What declaration of variables is the correct?
Antworten
-
a) char c;i;
-
b) int b;c;
-
c) char c, char s;
-
d) double a, b;
Frage 5
Frage
5. Declaration of variable is not a statement of C# language, but ends with semicolon.
Frage 6
Frage
6. Declaration of variable is a statement of C# language.
Frage 7
Frage
7. Which rule is correct when naming variables?
Antworten
-
a) the first character must be letters, underscore only
-
b) an identifier can consist of letters, number and reserved words
-
c) reserved words can be used as variable names
-
d) the first character must be only letter
Frage 8
Frage
8. C# is case sensitive language.
Frage 9
Frage
9. Choose the correct statement with initializing.
Antworten
-
a) string c="0";
-
b) int i="0";
-
c) char c="0";
-
d) int i='0';
Frage 10
Frage
10. What method in C# is Console output?
Frage 11
Frage
11. What method in C# is Console input?
Frage 12
Frage
12. The result in Console application of this code will be? int a=8, b=2, c=0; c=a+b;
Console.WriteLine(“{0}+{1}={2}”,b,a,c);
Antworten
-
a) 2+8=10
-
b) 8+2=10
-
c) 10=2+8
-
d) 10=8+2
Frage 13
Frage
13. Choose the incorrect assignment? int i,j;
Antworten
-
a) i=j=1;
-
b) i=10,j=10;
-
c) i=(j=10);
-
d) a, b, c
Frage 14
Frage
14. What will be the result? int i=5; int j=1; int x=(j--)+(--i);
Antworten
-
a) x=6;
-
b) x=5;
-
c) x=7;
-
d) x=8;
Frage 15
Frage
15. What will be the result? int x=10,i=0,j=2; x+=(i-j);
Frage 16
Frage
16. The “for” statement can be an infinite loop.
Frage 17
Frage
17. Choose the incorrect For statement?
Frage 18
Frage
18. The statements bodies of the “for” and “while” operators might never be executed.
Frage 19
Frage
19. The statements bodies of the “for” and “while” operators must be executed at least once.
Frage 20
Frage
20. The statements bodies of the “for” and “foreach” operators might never be executed.
Frage 21
Frage
21. The statements bodies of the “for” and “foreach” operators must be executed at least once.
Frage 22
Frage
22. In what statement the Statements body is always executed at least once?
Antworten
-
a) for, do while, while
-
b) do while
-
c) foreach, while
-
d) do while, for
Frage 23
Frage
23. C# classes contain:
Antworten
-
a) properties and functions
-
b) data members(field, variables), properties and methods
-
c) method, functions and constructors
-
d) variables and methods
Frage 24
Frage
24. The properties in C# classes are…
Antworten
-
a) procedures and functions
-
b) constructors
-
c) data members(variables)
-
d) members with get and set
Frage 25
Frage
25. C# procedure specifies with …
Antworten
-
a) this keyword
-
b) void keyword
-
c) return data type
-
d) static keyword
Frage 26
Antworten
-
a) a property of the class
-
b) an instance of the class
-
c) a method of the class
-
d) a data member of the class
Frage 27
Frage
27. The classes are like new data types.
Frage 28
Frage
28. Access modifiers are ...
Frage 29
Frage
29. A public method with the same name as the class with no return type is ...
Antworten
-
a) constructor
-
b) function
-
c) procedure
-
d) property
Frage 30
Frage
30. Procedures and constructors can’t be passed any arguments.
Frage 31
Frage
31. Functions can’t be passed any arguments.
Frage 32
Frage
32. Functions can be passed any arguments.
Frage 33
Frage
33. Procedures can’t be passed any arguments.
Frage 34
Frage
34. Procedures can be passed any arguments.
Frage 35
Frage
35. Methods can be passed any arguments.
Frage 36
Frage
36. Methods can’t be passed any arguments.
Frage 37
Frage
37. The default constructor is a method with …
Antworten
-
a) any arguments
-
b) no arguments
Frage 38
Frage
38. In the static method must be absent “this” reference, as such method doesn’t work with any object.
Frage 39
Frage
39. In the static method allowed immediate call only other instance methods.
Frage 40
Frage
40. The “this” keyword can be used for...
Frage 41
Frage
41. Choose the correct declaration of array.
Frage 42
Frage
42. Choose the correct declaration of jugged array.
Antworten
-
a) int [][] j = new int[];
-
b) int [][] j = new int[][5];
-
c) int [][] j = int [5][5];
-
d) int [][] j = new int[5][];
Frage 43
Frage
43. Choose the correct declaration and initialization of array.
Antworten
-
a) int[] a = new int[5]{1,5,8,4,5};
-
b) int[] a = {1,5,8,4,5};
-
c) a,b
-
d) there is no correct answer
Frage 44
Frage
44. Choose the correct declaration of two-dimensional array.
Antworten
-
a) int[][] a = new int [2][5];
-
b) int [] a = new int [2][5];
-
c) int [,] a = new int[2,5];
-
d) int[,] a = new int[2][5];
Frage 45
Frage
45. The last unit (element) index of array is…
Antworten
-
a) 0
-
b) 10
-
c) length
-
d) length-1
Frage 46
Frage
46. How many elements does the next array include? Int[] a=new int[77];
Frage 47
Frage
47. How many elements does the next array include? Int[] a=new int[100];
Frage 48
Frage
48. C# function specifies with …
Antworten
-
a) this keyword
-
b) void keyword
-
c) return data type
-
d) static keyword
Frage 49
Frage
49. The statements body of the “do while” operator might never be executed.
Frage 50
Frage
50. The statements body of the “do while” operator must be executed at least once.
Frage 51
Frage
51. Choose the correct assignment? int i,j;
Antworten
-
a) i,j=8;
-
b) i=8,j=8;
-
c) i=(j=8);
-
d) a,b,c;
Frage 52
Frage
52. Constructors can’t be passed any arguments.
Frage 53
Frage
53. Constructors can be passed any arguments.
Frage 54
Frage
54. Default constructors can’t be passed any arguments.
Frage 55
Frage
55. Default constructors can be passed any arguments.
Frage 56
Frage
56. How many elements does the next array include? int[] a=new int[99];
Frage 57
Frage
57. Choose the core principles of OOP
Antworten
-
a) Encapsulation and Inheritance
-
b) Encapsulation, Inheritance and Polymorphism
-
c) encapsulation and polymorphism
-
d) encapsulation, inheritance, polymorphism, aggregation and composition
Frage 58
Frage
58. Hiding an object’s internal implementation detail is…
Antworten
-
a) encapsulation
-
b) inheritance
-
c) polymorphism
-
d) composition
Frage 59
Frage
59. Which concept promotes code reuse?
Antworten
-
a) encapsulation
-
b) inheritance
-
c) polymorphism
-
d) composition
Frage 60
Frage
60. Which statement shows Encapsulation concept?
Frage 61
Frage
61. Closely related to the notion of encapsulating programming logic is the idea of…
Antworten
-
a) overriding
-
b) data protection
-
c) overloading
-
d) realization
Frage 62
Frage
62. Which access modificator (s) related to the data protection?
Antworten
-
a) public
-
b) protected
-
c) private
-
d) private and protected
Frage 63
Frage
63. Members of a class that represent an object’s state should not be marked as
Antworten
-
a) public
-
b) private
-
c) protected
Frage 64
Frage
64. Choose traditional technique to encapsulate class’s data.
Antworten
-
a) Define default constructor
-
b) Define your own constructor
-
c) Define a pair of public accessor(get) and mutator(set) methods
-
d) Mark the data of class as public
Frage 65
Frage
65. Choose a technique to encapsulate class’s data
Antworten
-
a) Define fields of class
-
b) Define your own constructor
-
c) Define a public properties
-
d) Define a private properties
Frage 66
Frage
66. The “Black boxing programming” term is related to
Antworten
-
a) inheritance
-
c) objects
-
b) encapsulation
-
d) polymorphism
Frage 67
Frage
67. A “get” method …
Antworten
-
a) returns the current value of state data
-
b) returns the default value of state data
-
c) allows to change the current value of state data
-
d) allows to change the methods of class
Frage 68
Frage
68. A “set” method …
Antworten
-
a) returns the current value of state data
-
b) returns the default value of state data
-
c) allows to change the current value of state data
-
d) allows to change the methods of class
Frage 69
Frage
69. Is it possible to perform any internal logic necessary before making the value assignment in properties of class?
Frage 70
Frage
70. Which keyword is related to the "get" block of property?
Antworten
-
a) value
-
b) return
-
c) this
-
d) public
Frage 71
Frage
71. Which keyword is related to the "set" block of property?
Antworten
-
a) value
-
b) return
-
c) this
-
d) public
Frage 72
Frage
72. Inheritance of OOP facilities ...
Antworten
-
a) data protection
-
b) data hiding
-
c) code reuse
Frage 73
Frage
73. Classical inheritance is …
Frage 74
Frage
74. The parent class is
Antworten
-
a) a child class
-
b) a derived class
-
c) a base class
Frage 75
Frage
75. The extending classes are formally termed...
Antworten
-
a) child classes
-
b) parent classes
-
c) base classes
Frage 76
Frage
76. What role of parent class?
Antworten
-
a) define all the common data and members for the classes that extend it
-
b) define all the common methods for the classes that extend it
-
c) define all the common data for the classes that extend it
-
d) define all the common properties and functions for the classes that extend it
Frage 77
Frage
77. A child class inherits the constructor of a parent class.
Frage 78
Frage
78. Which members can never be accessed from parent class?
Antworten
-
a) public members
-
b) private members
-
c) protected members
-
d) private and protected
Frage 79
Frage
79. (?)Is it possible to build multiple inheritance for classes in C# language ?
Frage 80
Frage
80. Which classes cannot have its child classes?
Antworten
-
a) public classes
-
b) sealed classes
-
c) private classes
-
d) derived classes
Frage 81
Frage
81. Which members of parent class cannot be accessed to other classes, but can be accessed to its child classes?
Antworten
-
a) all members
-
b) public members
-
c) private members
-
d) protected members
Frage 82
Frage
82. Another use of the "this" keyword is to design a class using a technique termed…
Frage 83
Frage
83. The "base" keyword refers to …
Antworten
-
a) the parent class
-
b) the child class
-
c) derived class
Frage 84
Frage
84. The process termed "method overriding" is …
Antworten
-
a) a way for base classes to define as own version of a method defined by its parent class
-
b) a way for child classes to define its own version of a method defined by its derived class
-
c) a way for parent classes to define its own version of a method defined by its child class
-
d) a way for child classes to define its own version of a method defined by its parent class
Frage 85
Frage
85. A virtual method of a parent class must be overridden for by each derived classes.
Frage 86
Frage
86. A virtual method of a parent class must not be overridden for by each derived classes.
Frage 87
Frage
87. A virtual method of a parent class has its own implementation body block.
Frage 88
Frage
88. A virtual method of a parent class has not its own implementation body block.
Frage 89
Frage
89. An abstract method of a parent class has its own implementation body block.
Frage 90
Frage
90. An abstract method of a parent class has not its own implementation body block.
Frage 91
Frage
91. An abstract method of a parent class must be overridden for by each child class.
Frage 92
Frage
92. An abstract method of a parent class must not be overridden for by each child class.
Frage 93
Frage
93. Which feature is not related to an abstract class?
Antworten
-
a) it is impossible to create an instance(object) of an abstract class
-
b) all abstract methods and properties of a basic class have not to be realized in a derived class
-
c) the abstract class may contain both abstract and common methods/properties
-
d) all abstract methods and properties of a basic class have to be realized in a derived class
Frage 94
Frage
94. An interface is defined using...
Frage 95
Frage
95. An interface defines …
Antworten
-
a) the method signature
-
b) the virtual methods
-
c) the common methods
-
d) the abstract methods
Frage 96
Frage
96. Classes that implement an interface are contractually required to implement the interface signature definition and can’t alter it.
Frage 97
Frage
97. A class can support as many interfaces as necessary.
Frage 98
Frage
98. A class can support only one interface.
Frage 99
Frage
99. A class cannot support as many interfaces as necessary.
Frage 100
Frage
100. "Has-a" relationship is ...
Antworten
-
a) traditional form of code reuse in the world of OPP
-
b) another form of code reuse in the world of OOP
-
c) traditional form of data protection in the world of OOP
-
d) another form of data protection in the world of OOP
Frage 101
Frage
101. "Has-a" relationship commonly includes ...
Antworten
-
a) encapsulation and composition terms
-
b) aggregation and polymorphism terms
-
c) polymorphism and composition terms
-
d) aggregation and composition terms
Frage 102
Frage
102. "Has-a" relationship must establish parent/child relationships.
Frage 103
Frage
103. The "has-a" relationship allows one class to define a member variable of another class and expose its functionality (if required) to the object user indirectly.
Frage 104
Frage
104. The .NET Framework allows to work with graphics using the ...
Frage 105
Frage
105. Which class is used to draw lines, curves and shapes?
Antworten
-
a) The Brush class
-
b) The Pencil class
-
d) The Region class
-
c) The Pen class
Frage 106
Frage
106. Which class is used to fill shapes?
Antworten
-
a) The Brush class
-
b) The Pencil class
-
c) The Pen class
-
d) The Region class
Frage 107
Frage
107. Choose the correct code to specify the location of control?
Antworten
-
a) button1.Size = new Size(10,10);
-
b) button1.Location = Point(10,10);
-
c) button1.Location(10,10);
-
d) button1.Location = new Point(10,10);
Frage 108
Frage
108. Choose the correct code to specify the size of control?
Antworten
-
a) button1.Size = new Size(10,10);
-
b) button1.Location = Point(10,10);
-
c) button1.Location(10,10);
-
d) button1.Location = new Point(10,10);
Frage 109
Frage
109. Which properties of controls can be used to specify its location?
Antworten
-
a) Size
-
b) Left, Right, Top, Bottom
-
c) ForeColor and BlackColor
-
d) Left, Right
Frage 110
Frage
110. Drawing begins with the ...
Antworten
-
a) System.Drawing.Pen class
-
b) System.Drawing.Graphics class
-
c) System.Drawing.Brush class
-
d) System.Drawing.Image class
Frage 111
Frage
111. To use Draw methods of the graphic object, we must provide an instance of the Pen class.
Frage 112
Frage
112. To use Draw methods of the graphic object, we must provide an instance of the Brush class.
Frage 113
Frage
113. Graphics.DrawLines, Graphisc.DrawPolygon, and Graphics.DrawRectangles accept arrays as parameters to allow us to create more complex shapes.
Frage 114
Frage
114. To use Fill methods of the graphic object, we must provide an instance of the Brush class.
Frage 115
Frage
115. To use Fill methods of the graphic object, we must provide an instance of the Pen class.
Frage 116
Frage
116. What method returns a String array containing the substrings in this instance that are delimited by elements of a specified char array or string array? Answer: Split!
Frage 117
Frage
117. An enumerated type is declared using the … keyword. Answer: Enum
Frage 118
Frage
118. By default, the first enumerator has the value…
Frage 119
Frage
119. C# structures are created with … keyword.
Frage 120
Frage
120. Virtual methods are defined in …
Frage 121
Frage
121. What big advantage of using interfaces ?
Frage 122
Frage
122. Is it enough to create polymorphic methods using the "virtual" and "override" keywords?
Frage 123
Frage
123. Inheritance allows to build …
Frage 124
Frage
174. Which of the following returns true if at least one expression is true?
Frage 125
Frage
175. Which of the following returns true if two expressions are true?
Frage 126
Frage
176. The keywords of the Switch statement are ...
Antworten
-
switch, case default, goto, return, throw
-
for, case default, goto, return, throw
-
begin,end,swap
Frage 127
Frage
125. The int type is …
Antworten
-
value,predefined
-
reference,predefined
-
value,user-defined
-
reference,user-defined
Frage 128
Frage
126. The bool type is …
Antworten
-
value,predefined
-
reference,predefined
-
value,user-defined
-
reference,user-defined
Frage 129
Frage
127. The char type is …
Antworten
-
value,predefined
-
reference,predefined
-
value,user-defined
-
reference,user-defined
Frage 130
Frage
128. The long type is …
Antworten
-
value,predefined
-
reference,predefined
-
value,user-defined
-
reference,user-defined
Frage 131
Frage
129. The float type is …
Antworten
-
value,predefined
-
reference,predefined
-
value,user-defined
-
reference,user-defined
Frage 132
Frage
130. The double type is …
Antworten
-
value,predefined
-
reference,predefined
-
value,user-defined
-
reference,user-defined
Frage 133
Frage
131. The class type is …
Antworten
-
reference, user-defined
-
value,predefined
-
value,user-defined
-
reference,predefined
Frage 134
Frage
132. The interface type is …
Antworten
-
reference, user-defined
-
value,user-defined
-
value,predefined
-
reference,predefined
Frage 135
Frage
133. The object type is…
Antworten
-
value,predefined
-
value,user-defined
-
reference,user-defined
-
reference,predefined
Frage 136
Frage
134. The string type is …
Antworten
-
reference,predefined
-
value,predefined
-
value,user-defined
-
reference,user-defined
Frage 137
Frage
135. The struct type is …
Antworten
-
value, user-defined
-
reference,user-defined
-
value,predefined
-
reference,predefined
Frage 138
Frage
136. The enum type is …
Antworten
-
value, user-defined
-
reference,user-defined
-
reference,predefined
-
value,predefined