C sharp sample Questions

Practice sample Questions of C# Programming

Q1. What you know about C# ?

A Microsoft product
B Just C program and OOPS combine
C Web development purpose
D All of above 3
E None of these

Answer: D
Hint or Explanation The Microsoft C# language , containing just c language code and OOPs concepts attached and mainly for web development .

Q2. What purpose using Microsoft .NET framework ?

A Form based
B Web based
C Web Services
D All of above 3
E Form based and Web based

Answer D

Hint or Explanation The .Net framework can be used to create both - Form-based and Web-based applications. Web services can also be developed using the .Net framework.

Q3. What is an enumeration used in C# programming language?

A pointer variable reference
B constant set of values
C hash values inserting
D Assign indexing to array variable
E None of these

Answer B

Hint or Explanation An enumeration is used in any programming language to define a constant set of values.
For example: enum Days{Sun,Mon,tue,Wed,thu,Fri,Sat};

Q4. ___________are variables that hold references to methods

A Delegates
B Abstract
C Scope
D interface
E Inheritance

Answer A

Hint or Explanation Delegates are variables that hold references to methods. It is a function pointer or reference type. Both the Delegate and the method to which it refers can have the same signature. All Delegates derives from the
System.Delegate namespace.
Following example demonstrates declaring a delegate:
public delegate AddNumbers(int n);

Q5.What is CLI?

A Common Language Implementer
B Common Language Infrastructure
C Common Loading Infrastructure
D Common Loading Implementer
E None of above

Answer B

Hint or Explanation The CLR code uses a common type system (CTS) that is based on a common language infrastructure (CLI).
CLI is a specification developed by Microsoft that describes the executable code and runtime environment. In simple terms this allows us to use various high-level programming languages on various machines without rewriting the code.

Q6.A ____________ is a collection of methods and functions that can be used for the core purpose.

A class library
B Database
C Client / Server
D DBMS
E None of above

Answer A

Hint or Explanation A Class library is a collection of methods and functions that can be used for the core purpose.

Q7.__________ framework is used to change the approach in which the applications are developed while working with databases.

A Generics
B Iterators
C Covariance and contravariance
D Entity
E None of above

Answer D

Hint or Explanation An Entity framework is used to change the approach in which the applications are developed while working with databases.

Q8. The Microsoft Visual Studio is an __________________ from Microsoft.

A Framework
B CLI
C integrated development environment
D Version
E None of above

Answer C

Hint or Explanation The Microsoft Visual Studio is an integrated development environment from Microsoft.
Visual Studio -- Develop apps for Android, iOS, Mac, Windows, web, and cloud

Q9. A console application is an application that can be run in the ______________ in Windows.

A Separate window
B Remote location
C Command prompt
D Server side
E None of above

Answer C

Hint or Explanation A console application is an application that can be run in the command prompt in Windows.

Q10. What purpose of using enumeration in C# language?

A combining values into a set
B constant set of values
C set to indexing
D set to hash tables
E None of above

Answer B

Hint or Explanation In C#, an enum (or enumeration type) is used to assign constant names to a group of numeric integer values. It makes constant values more readable, for example, WeekDays.Monday is more readable then number 0 when referring to the day in a week

More pages : Interview Questions

0 Comments:

Post a Comment