Posts

Showing posts with the label C#

MCQ of C# with Answer set-3

Image
MCQs in C# 1. The general syntax for declaring an enumeration in C# is . A) < enum _name> enum {enum list}; B) enum <enum_name> {enum list}; C) <enum_type> enum <enum_name> {enum list}; D) None of the above 2. State True or False for the difference between classes and structures. i) Structures do not support inheritance ii) Structure can have default constructor iii) Classes are reference types and structures are value types. A) i- True, ii- False, iii-True B) i- False, ii- True, iii-True C) i-True, ii-True, iii-False D) i- False, ii- False, iii-True 3. The various techniques provided by C# to implement static polymorphism is/are i) Function overloading ii) Static overloading iii) Operator overloading A) i and ii only B) i and iii only C)  ii and iii only D) All i, ii, iii 4. Operator overloading is creating functions with special names, the keyword ........................ operator followed by the symbol for the operator being defined. A) Overload B) Upda...

Objective Questions of C# with Answer set-2

Image
Objective Questions in C# 1. In C# variables are categorized into .......... i) Value types          ii) Reference types              iii) initial types             iv) pointer types A) i, ii and iii only B) ii, iii and iv only C) i, ii and iv only D) All i, ii, iii and iv 2. Value type variables can be assigned a value directly which are derived from the class A) System.value B) System.ValueType C) General.ValueType D) Variable.ValueType 3. The various data types used in C# are i) Integral Type           ii) Floating point types iii) Boolean types       iv) Nullable types A) i, ii and iii only B) ii, iii and iv only C) i, iii and iv only D) All i, ii, iii and iv 4. The built-in operators that are provided by C# programming language are... i) Arithmetic operators          ii) Logical opera...

Solved Objective Questions of C# set-1

Image
1. Which of the following is not the component of .Net framework? A) Common Language Run time(CLR) B) .Net Framework Library. C) Component Network D) Windows Workflow Foundation (WF) 2. Following is/are the Integrated Development Environment (IDE) for C#. A) Visual Studio 2010 (VS) B) Visual Web Developer C) Both A and B Visual overview of the Common CLR Language Infrastructure, and how the components relate to each other. Converted to SVG from PNG version, originally by Foofy from English Wikipedia. (Photo credit: Wikipedia ) D) Only A 3. A C# program may consist of the following parts. i) Namespace declaration ii) Class methods iii) A main method iv) Statement & Expressions A) i, ii and iii only B) ii, iii and iv only C) i, iii and iv only D) All i, ii, iii and iv 4. State True or False for naming class in C#. i) The class name can be a C# keyword. ii) A name must begin with a letter, can be followed by letters, digits and underscore. A) i- True, ii- False B) i- False, ii- T...