Thursday, 4 June 2020

C# Quiz Part-2


 C# Quiz Part-2


11. Can Abstract Class have Constructor?
     A. 
     B. 
     C. 
     D. 
... Answer is A)
Yes, Abstract class can have constructor and also can cal from derived class



12. Static variable is called using class name but cannot be call static variable through object?
     A. 
     B. 
     C. 
     D. 
... Answer is A)
True , Only one copy of static variable is create and used every where



13. In case of dynamic variable ?
     A. 
     B. 
     C. 
     D. 
... Answer is C)
Type of the variable is decided at run time



14. The process of Converting a Value Type to a Reference Type(object) is called ?
     A. 
     B. 
     C. 
     D. 
... Answer is A)
Boxing



15. File.AppendText() is used to create a StreamWriter ?
     A. 
     B. 
     C. 
     D. 
... Answer is B)
Appends UTF-8 encoded text to an existing file



16.  ?? operator In C# is called Null-coalescing operator which ? 
     A. Is used to check null values.
     B.
     C. 
     D. 
... Answer is A)
used to check null values



17.  In c# File.Move() method is used to move a specified file to a new location ? 
     A. True
     B. 
     C. Can't say .
     D. 
... Answer is A)
True 



18. UInt32 is used to represents ?
     A. 64-bit unsigned integer
     B. 
     C. 32-bit unsigned integer
     D. 
... Answer is C)
32-bit unsigned integer



19. In c# Anonymous type is created  ?
     A.Using the new keyword
     B. It is a reference type data type
     C. Property, event and indexer cannot be an anonymous types.
     D. 
... Answer is D)
All of them

 
 
20. Enum is mainly used to assign the names or string values to integral constants which is a ? 
     A.Value Type
     B. Reference Type
     C. 
     D. 
... Answer is A)
Value Type





Thank You



No comments:

Post a Comment

In case of any query , please let me know, Thanks