Answer these 700+ C# MCQs and see how sharp is your knowledge of C#. Scroll down and let's start!
A. break;
B. continue;
C. jump;
A. <IsNullable>
B. ?.
C. inline declaration for out params
A. A multi-dimensional array with dimensions of various sizes.
B. A multi-dimensional array with dimensions of the same size.
C. An array of singular dimension with an unknown size.
A. #
B. ^
C. |
D. &
A. none of these
B. Throw Exception
C. try catch finally block
D. ON ERROR Resume NEXT statement
A. x[1]
B. x.First
C. x[0]
A. using System.Strings
B. using System.IO;
C. #include <System.IO>
A. try, catch, finally
B. Garbage Collection
C. the using statement
D. try, catch, deconstruct
A. methods
B. constructors
C. fields
D. all of these
A. try catch finally block
B. none of these
C. Throw Exception
D. ON ERROR Resume NEXT statement
A. .csx
B. .cs
C. .c#
D. .cpp
E. .c
A. 15
B. 10
C. 5
A. Cats myCat = new cats();
B. cats myCat = new cats();
C. Cats myCat = new Cats();
A. Stepping through your code
B. All of these
C. Breakpoints
A. ellipsis
B. semi-colon
C. period
D. colon
A. Console.Write() method
B. System.Write() method
C. Console.Print() method
A. managed
B. manual allocation
A. False
B. True
A. is to delineate the end of a statement to be executed.
B. is to mark the beginning and end of a logical block of code.
C. is to mark function code to be used globally.
D. None of these
A. int
B. bool
C. string
D. single
A. derived classes can override some of the class methods.
B. that you can create objects of that class type.
C. that the class cannot be used for inheritance.
A. all of these
B. version information.
C. supported locales.
A. +
B. &
C. &&
D. *
E. ^
A. using System.Xml;
B. using System.Strings
C. using System.Parser
D. using System;
A. Yes
B. No
A. This would not compile
B. hello, this is a test
C. test, this is a hello
D. {0}, this is a {1}
A. struct
B. Both class and struct
C. class
A. It is the destructor for myClass instances.
B. It is a property called myClass.
C. It is a constructor for myClass instances.
A. Run time error
B. 1
C. true
D. Compile time error
E. false
A. foreach
B. for
C. switch
A. All options.
B. Interface inheritance
C. Implementation inheritance
A. include
B. import
C. use
D. using
A. System.Collections.Generic namespace
B. System.Data namespace
C. System.Collections.Specialized namespace
A. all .NET languages.
B. the Common Language Runtime.
C. the Java Virtual Machine.
A. XMLReader
B. XMLCreation
C. XMLWriter
A. Run Time Error
B. Both
C. Neither
D. Compile Time Error
A. Person<Nullable>
B. Person == null
C. Person.Null
D. Person?
A. The system will throw a MathFormatException
B. x = null;
C. The system will throw a InvalidOperationException
D. The system will throw a DivideByZeroException
E. x = NaN;
A. all of these
B. allowing developers to create their own code generation utilities.
C. developing automatic source code generators.
A. 0
B. null
C. unknown
D. none of these
A. System.Runtime.Serialization
B. System.Threading.ThreadPool
C. System.IO.Compression
A. Person == true ? Employee: Manager
B. Person.Name;
C. Person ?? Employee
A. public, protected, internal, private
B. public, private
C. public, protected, private
D. public, internal, private
E. protected, internal, private
A. Ternary
B. Unary
C. Binary
D. All Options
A. Java
B. Ruby
C. Python
D. Javascript
E. C
A. false
B. true
A. System.Text
B. System.DataAnnotations
C. System.Data
D. System.IO
E. System.Stream
A. all of these
B. integer
C. string
D. enum
A. =>
B. ++
C. +=
D. =
E. ->
A. you should declare it as private in the base class.
B. you should declare it as virtual in the base class.
C. you should declare it as partial in the base class.