By: Prof. Dr. Fazal Rehman | Last updated: March 3, 2022
Advanced programming MCQ’s with C-Sharp .NET
1: Which of the following is the data members of a class by default …a) private, publicb) protected, publicc) publicd) private
Answer - Click Here:
D
2: Which of the following is used to define reference variable…a) $b) #c) refd) &
Answer - Click Here:
C
3: Which of the following differences between ‘=’ and ‘==’…a) ‘==’used to assign values & ‘=’used to compare valueb) ‘=’used to assign values from one to another‘==’used to compare value between two variablesc) No difference between both operatorsd) None of these
Answer - Click Here:
B
4: Which of the following is true value that a function return…a) 0b) 1c) 2d) o or 1
Answer - Click Here:
B
5: Which of the following number of constructors is a true in a class can be define…a) 1b) 2c) any numberd) many number
Answer - Click Here:
C
6: Which of the following method has the same name as its class name…a) classb) deletec) constructord) none of these
Answer - Click Here:
C
7: Which of the following operator is used for destructor…a) :b) ::c) &d) ~
Answer - Click Here:
D
8: Which of the following method is used to destroy objects when application is on process…a) distructorb) finalize()c) constructord) end
Answer - Click Here:
A
9: Which of the following operator is used to free the memory when memory is allocated…a) deleteb) freec) newd) none of these
Answer - Click Here:
A
10: Which of the following statement is not true about destructor…a) A class can have one destructor onlyb) Destructors can have modifiers or parametersc) Destructors cannot be inherited or overloadedd) All of these
Answer - Click Here:
B
11: Which of te following is the return type of destructor…a) voidb) intc) floatd) string
Answer - Click Here:
C
12: Which of the following method used for the base class for string()…a) System.stringb) System.arrayc) System.chard) None of these