-
cảnh báo
-
region
-
line
-
lỗi
What do you know about C # P2 programming language?
Please read the knowledge with multiple choice questions around our C # programming topic below. The question set will have 10 sentences, 4 answers each and you should choose the correct answer.
-
Question 1. In C #, which of the following preprocessing directives allows creating a level alert from a specific location in your code?
-
Question 2. Which answer is correct when talking about exceptions in C #?
-
Exception classes in C # are mainly taken directly or indirectly from the System.Exception class.
-
C # exceptions are represented by classes.
-
Both answers are correct
-
There is no right answer.
-
-
Question 3. Are assignment operators unable to overload?
-
It's correct
-
False
-
-
Question 4. Which of the following is correct about the member functions of a class?
-
A member function of a class is a function whose definition or prototype is in the same class definition as any other variable.
-
The class member function works on any object of the class and has access to all members of the class for that object.
-
The above two answers are correct.
-
There is no right answer.
-
-
Question 5. Is the System.SystemException class the base class for all predefined system exceptions in C #?
-
It's correct
-
False
-
-
Question 6. Which of the following preprocessing directives specifies the end of a conditional directive in C #?
-
elif
-
endif
-
if
-
else
-
-
Question 7. To convert a type (integer or string) into a date-time structure in C #, we use:
-
ToString
-
ToSingle
-
ToChar
-
ToDateTime
-
-
Question 8. In C #, which access method allows a class to hide its member variables and functions from other class and function objects, except subclasses in the same application?
-
Protected Internal
-
private
-
Protected
-
Internal
-
-
Question 9. When talking about constructor class, what is the correct answer?
-
The constructor class is a special member function of the class, executed whenever we create a new object of that class.
-
The constructor has the same name as the class and has no return type.
-
Both answers are correct.
-
There is no right answer
-
-
Question 10. To convert a type to a Boolean value in C #, we use:
-
ToBoolean
-
ToSingle
-
ToChar
-
ToDateTime
-
3.5 ★ | 2 Vote
Read More
- Overview of R language, install R on Windows and Linux
- Why should you learn Python programming language?
- The reason why C programming language is never outdated
- Test on C programming P6
- What is the first programming language in the world?
- What do you know about Smalltalk programming language?
- 10 programming languages booming today
- What do you know about programming language C # P1