100% found this document useful (1 vote)
435 views5 pages

C# Test 1

The document is a summary of a C# test taken by the user. The user answered 12 out of 20 questions correctly in 9 minutes and 36 seconds. The summary encourages the user to work harder to become an expert. It provides a button to check the user's answers or try the test again.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
100% found this document useful (1 vote)
435 views5 pages

C# Test 1

The document is a summary of a C# test taken by the user. The user answered 12 out of 20 questions correctly in 9 minutes and 36 seconds. The summary encourages the user to work harder to become an expert. It provides a button to check the user's answers or try the test again.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 5

7/16/2021 C# Test 1

C# Test 1

Good try! You gave 12 correct answers out of 20 questions in 09:36 minutes.

You still need to work hard to become an expert.

Check Your Answers


 Try Again
More C# Tests

Question 1: Which of the following methods is an entry point in the C# console program?

A public static void Program()

B public static void Main() 

C public static void main()

D None of the above

Question 2: Which of the followings are value types in C#?

A Int32

B Double

C Decimal

D All of the above 

Question 3: Which of the following is a reference type in C#?

A String 

B Long

C Boolean

D None of the above

Question 4: What is the nullable type in C#?

A It allows assignment of null to reference type. 

B It allows assignment of null to value type. 

C It allows assignment of null to static class.

D None of the above.

https://www.tutorialsteacher.com/online-test/csharp-test1 1/5
7/16/2021 C# Test 1

Question 5: Struct is a _____.

A Reference type

B Value type 

C Class type 

D String type

Question 6: 10 > 9 ? "10 is greater than 9" : "9 is greater than 10" is an example of
_______

A Ternary operator 

B Conditional operator 

C Greater than operator

D Inverse operator

Question 7: Which of the following datatype can be used with enum?

A int 

B string 

C boolean

D All of the above

Question 8: What is an indexer?

A It allows an instance of a class to be indexed like an array 

B It allows enumerator with class

C It creates index for instances of a class.

D None of the above.

Question 9: String is ______.

A Mutable 

B Immutable 

C Static

D Value type

https://www.tutorialsteacher.com/online-test/csharp-test1 2/5
7/16/2021 C# Test 1

Question 10: All arrays start with _____ index.

A 1

B 0 

C -1

D 0.0

Question 11: Which of the following is the correct way of declaring an array in C#?

A int[] intArray = new int[];

B int intArray[] = new int[5];

C int[] intArray = new int[5]; 

D int[5] intArray = new int[];

Question 12: Which of the following is true for ReadOnly variables?

A Value will be assigned at runtime. 

B Value will be assigned at compile time.

C Value will be assigned when it accessed first time

D None of the above

Question 13: Which of the following statements is true?

A try block must be followed by catch or finally block or both.

B finally block cannot include return statement.

C try block can include another try block.

D All of the above. 

Question 14: Which of the following statements is true?

A A finally block may not execute every time

B A return or break statement cannot exit a finally block. 

C A finally block can come before catch block.

D Multiple finally block is possible.

https://www.tutorialsteacher.com/online-test/csharp-test1 3/5
7/16/2021 C# Test 1

Question 15: Func and Action are the types of ______.

A Utility function

B Delegate 

C Event 

D Generic class

Question 16: Return type of Predicate<T>() is always a ______.

A int

B string

C boolean 

D void

Question 17: The partial class allows ________

A Implementation of single class in multiple .cs files. 

B Declaration of multiple classes in a single .cs file. 

C Implementation of multiple interfaces to single class.

D Multiple class inheritance.

Question 18: LINQ stands for ________.

A Language Integrated Query 

B Local Integration Query

C Language Included Query

D Lazy Integrated Query

Question 19: Data type of a variable declared using var will be assigned at _______.

A Runtime

B Compile time 

C Any time

https://www.tutorialsteacher.com/online-test/csharp-test1 4/5
7/16/2021 C# Test 1

D Application Initialization time.

Question 20: Which of the following statements is true?

A The dynamic type allows multiple time declaration of a variable. 

B The dynamic type allows compile time type checking

C The dynamic type escapes compile time type checking 

D None of the above.

TUTORIALSTEACHER.COM TUTORIALS

TutorialsTeacher.com is optimized for learning  ASP.NET Core  AngularJS 1

web technologies step by step.


Examples might
 ASP.NET MVC  Node.js
be simplified to improve reading and basic
understanding.
While using this site, you agree  IoC  D3.js

to have read and accepted our terms


of use
 Web API  JavaScript
and privacy policy.
 C#  jQuery

 LINQ  Sass
[email protected]

 Entity Framework  Https

E-MAIL LIST

Subscribe to TutorialsTeacher email list and get latest updates, tips &
tricks on C#, .Net, JavaScript, jQuery, AngularJS,

Node.js to your inbox.

Email address GO

We respect your privacy.

HOME
PRIVACY POLICY
TERMS OF USE
ADVERTISE WITH US  2020 TutorialsTeacher.com. All Rights Reserved.

https://www.tutorialsteacher.com/online-test/csharp-test1 5/5

You might also like