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