Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

C# QUESTIONS : PART 9

Find wrong initialized constructor

obj 1=new obj();

 obj 1=newobj("Blue Mountain");

obj 1=("blue mountain");

obj 1=new obj()

SHOW ANSWER

Difference between for and foreach is that

The foreach statement repeats a group of embedded statements for each element in an array or an object

 The for loop executes a statement or a block of statements repeatedly until a specified expression

both a and b

For repeats fixed number of times whereas foreach repeats for infinite number of times

SHOW ANSWER

What could occur in case of no garbage collector used?

Progressive slow down of the computer

A system crash

Errors due to wring memory allocation

All of the above

SHOW ANSWER

Identify correct one

class TestClass();

class TestClass { }

 class TestClass { };

TestClass

SHOW ANSWER

Inheritance mechanism

Use the existing functionality of base class

 Override the existing functionality of base class

Implements new functionality in derived class

all of the above

SHOW ANSWER

Building block of OOP encapsulates part of the application which may be

a process

a, c and d

a chunk of data

an abstract entity

SHOW ANSWER

There are two types of constructors in C#

default

 built in

parameterized

both a and c 

SHOW ANSWER

Keyword used to declare a base class method while performing overriding of base class methods is

 this

virtual

override

 extend

SHOW ANSWER

If you want a method to return information

you must write a return statement inside the method

you must capture it

 you must add void keyword as a return type

you must return the statement out side the method

SHOW ANSWER

A default constructor is

parameter less

easy to use

convenient

inconvenient

SHOW ANSWER

Process by which we can control parts of a program that can access members of a class is called

polymorphism

abstraction

encapsulation

recursion

SHOW ANSWER

Choose correct option

Function overloading is an example of static polymorphism

Operator overloading is an example of static polymorphism

Function overloading is an example of dynamic polymorphism

 Operator overloading is an example of dynamic polymorphism

SHOW ANSWER

Data members of a class are by default

public

private 

protected

static

SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in