You are on page 1of 92

1 Which of the following computer systems can vary in size from a small desktop

model to the size of a small filing cabinet?


2 Which of the following options is NOT a benefit of computers?
3 You have brought a new sound card. Now, you want to attach the sound card to
your system in order to use it. Which of the following components of the
computer can be attached to the sound card?
4 You have recorded some videos of your friend's party. Now, you want to store
the videos on a high capacity storage device on your computer.
You do not want to move the storage device between computers. Which of the
following storage devices would you use to perform the required task?
5 You want to store information regarding the employees of your organization in a
computer file. You want to store the information in the form of records where
the details about each employee are contained in a single line. Which of the
following types of computer file would enable you to perform the required task?
6 You have copied a large number of image files to your computer. You want to
change the view of the contents pane so that the size of a image is displayed
along with the image name. How will you perform the required task?
7 Jim needs to create a project for his school. He needs to search for images on
the World Wide Web to add images to his project. He decides to use the
Google search engine to perform the preceding task. Which of the following
options states the correct sequence of steps that Jim needs to follow to search
for the images?
8 Kim has created an organizational chart of her organization. Now, she needs to
create a high quality visual of the organizational chart on paper. How can Kim
accomplish the required task?
9 Jim needs to transfer some files from his computer to his friend's computer.
The total size of the files is 2 GB. How can he transfer the files between the two
computers?
10 Which of the following I/O devices transforms the image to ASCII codes that is
used by a computer to represent the characters you find on your keyboard,
such as alphabets, numbers, punctuation marks, and graphics?
11 Which of the following types of touch screens send sound waves across the
computer screen to look for interruptions caused by touch?
12 Which of the following types of computer mouses allows to work from the
distance upto one and a half meters away from the computer?
ITFC Questions
13 Which of the following components of a motherboard provides the timing signal
in the form of electronic pulses that are used by the computer components to
set up a working pace?
14 Which of the following types of Web browsers allows its users to customize font
sizes and colors, zoom images, remove scroll bars, and enable sound alerts?
15 You want to use a Web browser that occupies very little hard disk space and
provides rapid access to the Internet. In addition, it can be used by physically
challenged individuals. Which of the following Web browsers meets your
requirements?
16 John wants to attach a hard disk to the computer. For this, he wants to use a
port that sends a byte of data bit by bit. Which of the following ports can help
John to achieve the required task?
17 You want to use search engine for the Web pages that contain the exact
phrase, Life beyond Earth. Which of the following operators will you use in the
search phrase to find such Web pages?
18 You have recently explored Internet and found the latest information on the
subjects for which you are pursuing professional certifications. Therefore, you
want to bookmark those Web pages. Which of the following options allows you
to perform the required task?
19 Which of the following options is NOT a software component required to
connect a computer to the Internet?
20 While assembling a computer system, Sam wants to use a bus that can
operate between the expansion bus and the system bus. Which of the following
types of buses he can use for the same?
21 You are setting up a computer system at your home. You need to attach a
component to the computer system that supplies required voltage to internal
and external components like motherboard and keyboard. Which of the
following components of the system unit will you use to achieve the same?
22 You want to connect your digital camera to your computer system without using
data cables. You want to use a low cost wireless technology that is able to
connect the camera with the computer system within the range of 30 feet.
Which of the following technologies can help you to achieve the same?
23 You want to upgrade your computer system and increase its RAM for faster
data transfer. Which of the following types of RAM will you purchase that can
synchronize memory access with the CPU clock for faster data transfer?
24 You are a regular traveler. You want to purchase a portable computer that is
not bulky and allows basic functionalities, such as I/O operations on data. In
addition, it can contain at least one database with names and address book,
and to-do lists. Which of the following portable devices will you purchase?
25
26 You have bought a new monitor. The monitor supports a resolution of 1024 x
768 with 256 colors. You find out that the graphics adaptor of your computer
does not support the resolution of the monitor. How would you ensure that the
graphics adaptor supports the appropriate resolution?
27 You are viewing the contents of the D:\Computer folder in Windows Explorer.
You, then moved to view the E:\Windows folder. Now, you want to navigate to
the D:\Computer folder again. Which of the following buttons in the explorer
toolbar would enable you to perform the preceding task?
1 You have created a file named MyFile under the D: drive of your computer.
Now, you want to copy MyFile to another folder named Projects that is created
under the D: drive. Identify the correct sequence of steps required to copy
MyFile to the Projects folder.
2 You are using Windows XP and want to change the appearance of the desktop
screen. Which of the following options states the correct steps to change the
appearance of the desktop?
3 You are viewing a text file using Notepad. While viewing the file, you want to
search for a particular word in the file. Which of the following options states the
correct sequence to find the required word in the file?
WBT /CBT Questions
4 Which of the following productivity enhancing tools can be used to view the
contents of the clipboard in Office XP?
5 Which of the following features of Office XP consists of a set of buttons that are
displayed when a user performs an action or an error?
6 Which of the following productivity enhancing tools of Office XP can be used as
an alternate method for accepting user input?
7 Where is the Ask a Question box feature of Office XP located in Microsoft
Word?
8 Which of the following features of Office XP lets you reuse an earlier created
table style in Office XP?
9 Which of the following tasks cannot be performed by using the shared
documents feature of Microsoft Word 2002?
10 Which of the following tools of the Formula Auditing toolbar in Excel can be
used to determine the cells that are dependent on a specified cell?
11 Which of the following task panes of PowerPoint can be used to determine the
type and size of bullet points in the presentation?
12 Which of the following features of PowerPoint can be used to determine the
number of slides that would be printed on a single page of the handout?
13 Which of the following features of Microsoft Word can be used to send a letter
to a group of people with the same content?
14 You are creating a document in word. You want to control the AutoCorrect entry
by undoing the AutoCorrect change. Which of the following productivity
enhancing tools can you use to accomplish the required task?
15 You are creating a document for your organization. To enhance the
appearance of the document, you decide to add the logo of your organization
such that it is displayed as a background in the document. Which of the
following features of Word 2002 would you use to perform the required task?
16 You have created a document in Microsoft Word. While formatting the
document, you want to view the complete details of formatting that is applied to
a paragraph. Which of the following commands of Office XP will allow you to
perform the required task in Microsoft Word?
17 You are adding some data in an Excel workbook. The workbook contains three
worksheets. You want to change the color of a worksheet tab. Which of the
following options would you use to perform the required task?
18 You have prepared a presentation with lot of pictures. While sharing the
presentation with your friends on the Internet, you find that the presentation is
taking a long time to download. Which of the following changes can you make
to your presentation so that it is downloaded quickly?
19 You are creating a word document. Whenever you type the word "acme", it is
automatically changed to Acme Inc. by the AutoCorrect feature. You want to
stop the word from being changed automatically. Which of the following options
states the correct steps to perform the required task?
20 You have added a table to your document. You want to change the style of the
table to one of the predefined styles available in Word. Which of the following
options states the correct sequence of steps to perform the required task?
21 You are creating a document in Word. You want to add a watermark to your
document. You need to use an image stored on your computer for the
watermark. Which of the following options states the correct sequence of steps
to add a watermark to the document?
22 John is a manager. He wants to create a photo album of items in the inventory
using PowerPoint. The images are stored in a folder on his computer. Identify
the correct sequence of steps to perform the required task?
23 John has created a report using Excel. He wants to add a field that contains the
sum of values of a selected range of fields. To accomplish the required task, he
wants to use the AutoSum feature of Excel. Identify the correct sequence of
steps that John needs to perform to use the AutoSum feature?
1 Which of the following options means a tangible entity with a well-defined
behavior?
2 Which of the following components of the .NET Framework provides garbage
collection services?
3 Which of the following templates in Visual Studio.NET IDE can be used to
create a class or a reusable component that exposes some functionality to be
used in various projects?
4 You are developing an application using C#. For implementing a specific
functionality, you decide to create a new class by inheriting an existing class.
Which of the following characteristics of object oriented approach does the
preceding example exhibit?
5 Mac is developing an application. Before starting to build the application, he
identifies the critical requirements of the application. Which of the following
options states the correct phase of the object-oriented methodology
implemented by Mac?
6 Consider the following statements:
Statement A: An assembly is a single file with the extension .exe or .dll.
Statement B: An assembly cannot contain more than one module.
Which of the following options is correct about the preceding statements?
7 You are developing an application in Visual Studio .NET IDE. While developing
the application, you want to view all the classes used in your project. Which of
the following windows lists the project name and all the classes used in the
project?
C#
8 Which of the following options is a special type of method that is invoked when
a new instance of a class is created?
9 A delegate that has reference to only one method at a time is derived from the
_________ class.
10 Consider the following code:

using System;
class Car
{
public string Color;
public void Honk()
{
Console.WriteLine("BEEP BEEP!" );
}
}
class Result
{
static void Main(string[] args)
{
Car Ford = new Car(); ;
Ford.Honk();

Console.ReadLine();
}
}

What would be the output of the preceding code?


11 Jimmy is developing a C# application. The application accepts two integer
values and calculates their average value. The values are stored in two integer
variables, sum and count, and the average value is stored in an integer variable
named average. However, Jimmy must ensure that the value of the count
variable is not zero. Therefore, he decides to create a user-defined exception
named CountIsZeroException that displays the appropriate message, if the
value of the count variable is 0. Which of the following code snippets can
Jimmy use to create the user-defined exception?
12 Consider the following code:

using System;
public class FunctionCount
{
public static int count = 0;
public static void CountFunction()
{
count++;
System.Console.WriteLine("Count function is Called by Main {0} times.",
count);
}
public static void Main(string[] args)
{
for (int var = 0; var < 10; var++)
{
FunctionCount.CountFunction();
}
Console.ReadLine();
}

}
How many times would the CountFunction method be called?
13 You are creating a calculator application by using the following code:

using System;
namespace Calculator
{
class Calculator
{
public int number1, number2;
public Calculator(int num1, int num2)
{
number1 = num1;
number2 = num2;
}
public static Calculator operator -(Calculator c1)
{
c1.number1 = -c1.number1;
c1.number2 = -c1.number2;
return c1;
}
public void Print()
{
Console.WriteLine(" number1=" + number1);
Console.WriteLine(" number2=" + number2);
Console.ReadLine();
}
}
class EntryPoint
{
static void Main()
{
Calculator calc = new Calculator(15, -25);

calc.Print();
14 Predict the output of the following code:

using System;
namespace ConsoleApplication1
{
struct NumberCount
{
public int i;
public NumberCount(int initval)
{
this.i = initval;
}
public static NumberCount operator ++(NumberCount arg)
{
arg.i++;
return arg;
}
}
class TestClass
{
static void Main(string[] args)
{
NumberCount Count1 = new NumberCount(1);
NumberCount Count2 = Count1++;
Console.WriteLine(Count1.i);
Console.WriteLine(Count2.i);
Count2 = ++Count1;
Console.WriteLine(Count1.i);
Console.WriteLine(Count2.i);
Console.ReadLine();
}
}
}
15 Consider the following code snippet:

class CalculateMax
{
public int Max(int number1, int number2)
{
if (number1 > number2)
{
return number1;
}
else
{
return number2;
}
}
public float Max(float number1, float number2)
{
if (number1 > number2)
{
return number1;
}
else
{
return number2;
}
}
}

Analyze the preceding code and identify the approach used to implement
polymorphism.
16 Jim has to develop an application for his college. While creating the application,
he decides to re-use some methods of an existing class B1 in a new
class, Derived. He writes the following code:

using System;
public class B1
{
public void Function1()
{
Console.WriteLine("Base class");
}
}
class Derived : B1
{
void Function1();

static void Main()


{
Derived obj = new Derived();
obj.Function1();
Console.Read();
}
}

However, the preceding code gives a compile-time error. Analyze the preceding
code and identify the line of code causing the error.
17 Kim has created a C# application and used abstract classes in it. She
encounters errors, whenever she tries to compile the application. She has used
the following code snippet in her application:

using System;
abstract class Animal
{
public abstract void FoodHabits()
{
}
}
class Carnivorous: Animal
{
public override void FoodHabits( )
{
Console.WriteLine("The Carnivorous animals eat only meat");
}
}
class Herbivorous: Animal
{
public override void FoodHabits( )
{
Console.WriteLine("The Carnivorous animals eat only plants");
}
}
What is the source of error in the preceding code?
18 Tim is developing an application using C#. He has to create a class named Car
containing a method named Engine. The engine method has a statement that
displays a message to the user. Tim wants to override the Engine method in a
class named Truck that is derived from the Car class. Tim has written the
following code to perform the required task:

using System;
class Car
{

public void Engine()
{
Console.WriteLine("Car has a smaller engine than a truck.");
}
}
class Truck : Car
{
public override void Engine()
{
Console.WriteLine("Truck has a bigger engine than a car.");
}
static void Main()
{
Truck obj = new Truck();
obj.Engine();
Console.Read();
}
}
However, the preceding code gives an error when it is executed. Identify the
reason for the error.
19 Consider the following code:

using System;
namespace Test
{
sealed class myClass
{
void display()
{
Console.WriteLine("Hello");
}
}
class disp : myClass
{
void abcd()
{
Console.WriteLine("Wassup");
}
static void Main()
{
disp obj = new disp();
obj.abcd();
Console.Read();
}
}
}
The preceding code gives error when it is compiled. Analyze the code and
identify the line of code causing the error.
20 Lim is creating an application using C#. He has created an interface named
IOrderdetails that has two methods, UpdateCustStatus() and TakeOrder(). The
interface is implemented by a class named ItemsDetails. Lim has written the
following code snippet:

public interface IOrderDetails


{
void UpdateCustStatus()
{
......................
}
void TakeOrder()
{
....................
}
}
public class ItemsDetails : IOrderDetails
{
public void UpdateCustStatus() { }
public void TakeOrder() { }
}

However, the code doesn't compile and gives a compile-time error. Identify the
reason for the error.
21 Predict the output of the following code:

public class Class1


{
static int number1;
int number2;
static Class1()
{
number1 = 10;
number2 = 3;
Console.WriteLine("Value of number1 is {0}", number1);
Console.WriteLine("Value of number2 is {0}", number2);
}
}
22 Consider the following code:

using System;
class Calculator
{
static int number1, number2, total;
Calculator(int num1, int num2)
{
number1 = num1;
number2 = num2;
}
public void CalculateNumber()
{
total = number1 + number2;
}
public void DisplayNumber()
{
Console.WriteLine("The total is : {0}", total);
}
public static void Main(string[] args)
{
int var1, var2;
Console.WriteLine("Enter Value 1 :");
var1=Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Enter Value 2 :");
var2 = Convert.ToInt16(Console.ReadLine());
Calculator C1 = new Calculator(var1,var2);
C1.CalculateNumber();
C1.DisplayNumber();
Console.ReadLine();
}
}

23 Consider the following code:

using System;
class Calculator
{
static int number1=20;
static int number2=30;
static int total=0;

public void CalculateNumber()
{
total = number1 + number2;
Console.WriteLine("The Total is :{0}", total);
}
public static void Main(string[] args)
{
Calculator C1 = new Calculator();
C1.CalculateNumber();
Console.ReadLine();
}
}
You need to add a destructor of the Calculator class so that it displays the
message "Program Terminating" whenever a user exits the program. Identify
the correct lines of code that you can add to the Calculator class to implement
the desired functionality in your application.
24 Jim is creating an application for his college project. The application has a class
named myConnection with a method named dbCon() that uses a database
connection. Jim wants to add another method to the class to release the
database connection as soon as the dbCon() method completes execution.
How will Jim perform the required task?
25 Predict the output of the following code:

using System;
namespace Objects
{
class TestCalculator
{
TestCalculator()
{
Console.WriteLine("Constructor Invoked");
}
~TestCalculator()
{
Console.WriteLine("Destructor Invoked");
Console.Read();
}
public static void Main(string[] args)
{
Console.WriteLine("Main() Begins");
TestCalculator calc1 = new TestCalculator();
{
Console.WriteLine("Inner Block Begins ");
TestCalculator calc2 = new TestCalculator();
Console.WriteLine("Inner Block Ends");
}
Console.WriteLine("Main() ends");
Console.Read();

}
}
}
26 Consider the following code snippet:

class FileHandling
{
void fileAccess()
{
FileStream File1= new FileStream("C:\\Myfile.txt", FileMode.Append,
FileAccess.Write);
}

}
Analyze the preceding code and identify the use of the FileMode.Append
enumerator in the fileAccess() method.
27 Tom has to create an application in C# that would be used to read data from a
string buffer. The application accepts data in the string buffer from the user and
displays it on screen. Which of the following code snippets can he use to
perform the required task?
28 Predict the output of the following code snippet:

public void ReadData()


{

FileStream fs = new FileStream("Myfile.txt", FileMode.Open,
FileAccess.Read);
StreamReader sr = new StreamReader(fs);
sr.BaseStream.Seek(0, SeekOrigin.Begin);
string str = sr.ReadLine();
while (str != null)
{
Console.WriteLine("{0}", str);
str = sr.ReadLine();
}
}
29 Predict the output of the following code snippet:

using System;
using System.IO;
namespace File_Handling
{
class Tester
{

public static void Main()


{
DirectoryInfo MydirInfo = new DirectoryInfo(@"c:\WINDOWS");
FileInfo [] FilesInDir = MydirInfo.GetFiles ( );
foreach (FileInfo file in FilesInDir)
{
Console.WriteLine ("File Name :{0} Size: {1} bytes",
file.Name, file.Length);
}
Console.Read();
}
}
}
30 Jim has created an application that reads the contents of a text file as a byte
stream and displays it to the user. Jim has written the following code snippet for
his application:

public void ReadData()


{
FileStream fs = new FileStream("Myfile.txt",
FileMode.Open,FileAccess.Read);
StreamReader sr = new StreamReader(fs);
sr.BaseStream.Seek(0, SeekOrigin.End);
string str = sr.ReadLine();
while (str != null)
{
Console.WriteLine("{0}", str);
str = sr.ReadLine();
}
sr.Close();
fs.Close();
}
However, the application does not display any data when it is executed. Identify
the line(s) of code causing the logical error of not displaying any data.
31 John has to create an application that would display the full path of a user-
specified folder, and the date and time on which the folder was last accessed.
Which of the following code snippets should John use to perform the required
task?
32 Tom has to create an application to divide two numbers. The numbers must be
accepted from the user. However, he must ensure that if the user tries to divide
a number by zero, then the application should catch the exception and display
an appropriate error message. Tom has written the following code snippet to
implement the required functionality in his application:

class division
{
void DivideNum()
{
int a;
int b;
int result;
Console.WriteLine("Enter first number");
a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter second number");
b = Convert.ToInt32(Console.ReadLine());
try
{
result = a / b;
Console.WriteLine("The result after dividing the two numbers is: {0}", result);
}

catch (IndexOutOfRangeException e)
{

Console.WriteLine("e.message");
}

}
However, the preceding code does not handle the exception if the user gives
the value of b as zero. Identify the reason for this.
33 You have to develop an application using C#. The application should have a
feature that enables it to communicate with different processes. Which of the
following predefined classes do you need to use in your application to perform
the required task?
34 Jim is developing a C# application. He has used attributes in the application.
Now, he needs to specify essential information of an attribute, which he has
used in the application. Which of the following options would enable him to
perform the required task?
35 John is developing an application using C#. He wants to use one of the
predefined attributes of .NET that would enable him to call the member
functions of unmanaged code from his application. Which of the following
predefined attributes would allow him to perform the required task?
36 You are developing a C# application. You have defined a custom attribute for
your application. Now, you want to apply the custom attribute to every element
of your application, such as classes and events using a single member of the
AttributeTargets enumerator. Which of the following members of
AttributeTargets enumerator can you use to perform the preceding task?
37 Tim has developed an application that has some custom attributes defined in it.
Now, he wants to access the metadata of the preceding application while it is
running. Which of the following namespaces does Tim need to use to access
the metadata of the running application?
38 You have to create an application that accepts data from the user and saves
the same into a text file named Myfile.txt. Which of the following code snippets
would you use to perform the required task?
39 Consider the following code snippet:

void display()
{
try
{
FileStream fs = new FileStream("orders.txt", FileMode.Open,
FileAccess.Read);
StreamReader sr = new StreamReader(fs);
String str = sr.ReadLine();
Console.WriteLine(str);
Console.Read();
}
catch (IOException e)
{
Console.WriteLine(e.Message);
Console.Read();
}
catch (NullReferenceException e1)
{
Console.WriteLine(e1.Message);
}
catch (InvalidCastException e2)
{
Console.WriteLine(e2.Message);
}
catch (ArgumentNullException e3)
{
Console.WriteLine(e3.Message);
}
}

The preceding code gives an exception that displays the message 'Could not
40 John has to create an application using C# that stores data in a binary file.
There are two variables in the application, an integer variable i, and a double
variable d. The application has to store the values of the i and d in a binary file
named binfile.DAT. The application should always create a new file whenever it
writes data to the file. Identify the correct code snippet that John has to write to
perform the required task.
41 Jim is creating an application using C#. The application has to calculate the
sum of values in an integer array. Jim needs to ensure that the application
displays an exception message if the integer array is assigned any out of range
value. Identify the code snippet that would help Jim to handle the exception.
42 You have created an application for a fast food joint. The workers of the fast
food joint save the order data in a common file named orders.txt. You have
used the following code snippet to save the order data:

void Write()
{
Console.WriteLine("Enter order data");
String str=Console.ReadLine();
FileStream fs = new FileStream("orders.txt", FileMode.Append,
FileAccess.Write, FileShare.None);
StreamWriter sr = new StreamWriter(fs);
String str = "Hello";
sr.Write(str);
sr.Flush();
sr.Close();
fs.Close();
}
However, the preceding code gives a compile-time error. Identify the line(s) of
code causing the error.
43 Predict the output of the following code snippet:

public class RWData


{
public static void Main()
{
BinaryWriter dataout;
BinaryReader datain;
double d = 1023.56;
bool b = true;
dataout = new BinaryWriter(new FileStream("testdata", FileMode.Create));

Console.WriteLine("Writing " + d);


dataout.Write(d);
Console.WriteLine("Writing " + b);
dataout.Write(b);
Console.WriteLine("Writing " + 12.2 * 7.4);
dataout.Write(12.2 * 7.4);
dataout.Close();
Console.WriteLine();

datain = new BinaryReader(new FileStream("testdata", FileMode.Open));


d = datain.ReadDouble();
Console.WriteLine("Reading " + d);
b = datain.ReadBoolean();
Console.WriteLine("Reading " + b);
d = datain.ReadDouble();
Console.WriteLine("Reading " + d);
Console.ReadLine();
datain.Close();
}
}
44
45 Which of the following options is a built-in data type in C#?
46 You have been asked to create a menu-based C# program that can accept the
values as 'y' for yes and 'n' for no in the data variable, choice. Which of the
following data types will you use for the choice data variable?
47 Sam wants to store data in a variable. In addition, he wants that the variable
should hold a reference to the memory instead of the data. Which of the
following data types he can use for declaring such a variable?
48 Which of the following data types in C# is a reference type?
49 You want to check the value of the var variable in the C# program. The
requirement states that if the value of the var variable is greater than 0 then the
statement, "This is a positive number" should be shown to the user. Which of
the following code snippets will help you to achieve the required task?
50 You have written the following C# code:
using System;
class Car
{
string Engine;
public void AcceptDetails()
{
Console.WriteLine("Enter the engine model");
Engine = Console.ReadLine();
}
public void DisplayDetails()
{
Console.WriteLine("The Engine Model is: {0}", Engine);
}
}
class ExecuteClass
{
public static void Main (string [] args)
{
Car MyCar = new Car();
MyCar. AcceptDetails();
}
}

Identify the line of code that a C# compiler first looks for in the preceding code
to compile it.
51 You have declared a variable named x and initialized it with the value 20. In
addition, you have declared a boolean variable named Result. Which of the
following code snippets would you use to store the value, true in the Result
variable when the value of x is not equal to 10?
52 Danny wants to use a looping construct in which the body of the loop is
executed at least once and the condition is evaluated for subsequent iterations.
Which of the following looping constructs will Danny use to achieve the required
task?
53 Determine the output of the following code snippet:
int var= 1;
for (; var <= 2; var++)
{
Console.WriteLine ("Value of variable is: {0}", var);
}
54 You have been asked to create a marks-list for the school students using
arrays in the C# language. However, you are not sure about the number of
students in the school. Identify which of the following concepts can be used to
handle an array list of unknown numbers?
55 Consider X=20 and Y=20. Determine the values of X and Y from the following
arithmetic expressions:

X+=Y;
X-=Y;
X*=Y;
X/=Y;
X%=Y;
56 From the following steps of instructions, identify the correct sequence of steps
for the execution of a for loop.
57 You have been asked to maintain bill details of an employee in a single
variable. Which of the following programs will you use for the same?
58 Predict the output of the following code:

using System;
namespace EnumDays
{
class EnumTest
{
enum Days { Sat, Sun, Mon, Tue, Wed, Thu, Fri};
static void Main (string[] args)
{
int First_Day = (int)Days.Sat;
int Last_Day = (int)Days.Fri;
Console.WriteLine("Sat = {0}", First_Day);
Console.WriteLine("Fri = {0}", Last_Day);
Console.ReadLine();
}
}
}
59 You want to create a multidimensional array that calculates the sum of the
array elements. For this, you have declared a multidimensional array by using
the following code snippet:
int sum=0;
int rowSum;
int[,] mArray = new int[2, 4]{
{2,2,2,2},
{3,3,3,3},
};

Identify the correct code snippet that will help you to calculate the sum of
elements of mArray array.
60 You have been asked to write a C# program to check whether the year entered
by the user is a Leap year. For this, you have written the following code:

using System;
class LeapYear
{
static void Main(string[] args)
{
int Year;
Console.WriteLine("Enter the year: ");
Year = Convert.ToInt32(Console.ReadLine());

if ((Year % 4 == 0) ; (Year / 100 != 0 || Year % 400 == 0))


{
Console.WriteLine("The Year you have entered is a Leap Year {0}", Year);
}
else
{
Console.WriteLine("The Year you have entered is not a Leap Year {0}",
Year);
}
Console.ReadLine();
}
}

The preceding code results in an error. Identify the statement(s) that can
generate an error.
61 You have written the following code by using the switchcase construct:
int var;
var = 500;
switch(&&var)
{
case 100:
Console.WriteLine("Century");
break;
case 200:
Console.WriteLine("Double Century");
break;
case 300:
Console.WriteLine("Triple Century");
break;
default:
Console.WriteLine("Invalid value");
break;

}

Analyze the preceding code and identify the statement(s) that can produce an
error on compilation.
62 You have written the following code to accept five numbers and print the sum of
all the positive numbers entered by the user:

using System;
class BreakContinue
{
static void Main(string[] args)
{
int incr, SumNum, number;
for (SumNum = number = incr = 0; incr < 5; incr += 1)
{
Console.WriteLine("Enter a positive number");
number = (Console.ReadLine());

if (number <= 0)
continue;
SumNum = SumNum + number;
}
Console.WriteLine("The sum of positive numbers entered is {0}",
SumNum);
Console.ReadLine();
}
}

Analyze the preceding code and identify the statement(s) that can produce an
error on compilation.
63 You have written the following program that checks a palindrome character
array:

using System;

namespace ManipulateArray
{
class Palindrome
{
static void Main(string[] args)
{
char[] Str = new char[10];
Console.WriteLine("Enter a Palindrome string (Max 10 Char):");
Str = Console.ReadLine().ToCharArray();
Console.WriteLine(CheckPalindrome(Str));
Console.ReadLine();
}
private static bool CheckPalindrome(char[] myString)
{
int startChar;
int lastChar;
startChar = 0;
lastChar = myString.Length - 1;
while (startChar < lastChar)
{
if (myString[startChar] = myString[lastChar])
{
startChar++;
lastChar--;
}
else
{
return false;
64 You have written the following C# code that generates the Fibonacci series
upto 200:

using System;
class Fibonacci
{
static void Main(string[] args)
{
int number1;
int number2;
number1=number2=1;
Console.WriteLine("{0}", number1);
while (number2 <= 200)
{
Console.WriteLine(number2);
number2 += number1;
num1 = number2-number1;
}
Console.ReadLine();

}
}
However, the preceding code when compiled generates an error. Identify the
incorrect statement that generates the error in the preceding code.
65 ______________ involves extracting only the relevant information.
66 Which of the following elements of the method declaration is used to pass and
receive data from a method?
67 The method name is followed by ____________ even if the method call has no
parameters.
68 ___________ allows one interface to be used for multiple functions and
reduces the complexity within the functions of a class of a C# program.
69 Which of the following keywords restricts the users from inheriting the class in
C#?
70 Which of the following access specifiers allows a class to expose its member
variables and member functions to other functions and objects of any class?
71 Which of the following types of operators cannot be overloaded?
72 Which of the following types of relationships exist between a handbag and a
zip?
73 Which of the following keywords can be used by derived classes to implement
a virtual method defined in the base class?
74 ___________ is used when you want a standard structure of methods to be
followed by the classes, where classes will implement the functionality.
75 You are working on a C# application. In the application , you want the base
class to hide its member variables and member functions from other class
objects and functions, except the child class. Which of the following access
specifiers will you use to achieve the same?
76 Consider the following code snippet that declares a method named AddNumber
in the calc class:

class calc
{
public int AddNumber(int num1, int num2)
{
int result;
result = num1 + num2;
return result;
}
}

Identify the correct code snippet for calling the AddNumber() method.
77 You want to declare a variable named Mark in the Student class to store some
value. In addition, you want that only one copy of the Mark variable should exist
for the Student class. Which of the following keywords can help you to declare
such a variable?
78 You want to overload the + operator in a C# program. Which of the following
options is the correct syntax to define the function for overloading the +
operator?
79 Sam wants to declare an interface named IOrderDetails, which contains two
methods, UpdateCustStatus() and TakeOrder(). Identify the correct code
snippet that can help Sam to achieve the required task.
80 Consider the following statement:
"You do not want to see the complex processes of a vacuum cleaner that are
needed to convert electricity into suction power".
Which of the following concepts provided by the C# programming language can
be used to implement the preceding statement?
81 Danny have been asked to calculate the area of the geometrical figures;
square, rectangle, and triangle. To achieve this, he created the CalcArea()
method that is defined in the program to find the area of all the three types of
geometrical figures. The CalcArea() method will find the area depending on the
number of inputs provided by the user. Which of the following C# mechanisms
has Sam followed to find the area of the geometrical figures?
82 Consider the following statements:

Statement A: Overloading a binary operator is similar to overloading a unary


operator, except that a binary operator requires two additional parameters.
Statement B: The comparison operators, if overloaded, must be overloaded in
pairs; that is, if == is overloaded, != must also be overloaded.

Which of the following options is correct with respect to the preceding


statements?
83 Predict the output of the following code:
using System;
class Base
{
public Base()
{
Console.WriteLine("Constructor of Base");
}
~Base()
{
Console.WriteLine("Destructor of Base");
}
class Derived : Base
{
public Derived()
{
Console.WriteLine("Constructor of Derived");
}
~Derived()
{
Console.WriteLine("Destructor of Derived");
}
}
class BaseDerived
{
static int Main(string[] args)
{
Derived obj = new Derived();
return 0;
}
}
84 You are creating an application in C# programming language. While
implementing inheritance in the program, you have a situation where you want
a method in a class to be implemented differently in the derived classes but not
by the base class itself. Which of the following concepts provided by C#
programming language will you use in such a situation?
85 A __________ is a refernce type variable and is a general-purpose mechanism
for indirectly calling methods at run time.
86 _____________ hold the reference of more than one method and execute all
the methods it wraps in the calling order.
87 __________ is an object that contains the definition of the event and the
delegate.
88 Which of the following options is NOT true about constructors?
89 Consider the following code snippet:

public class Class1


{
static int number1;
int number2;
static Class1()
{
number1 = 10;
}
}

Which of the following concepts provided by the C# programming language is


illustrated by the preceding code snippet?
90 You are working with a C# application. You have come across with a
requirement where the variables need to be initialized with user supplied values
as soon as the object of the class is created. Which of the following
mechanisms will you use in such a situation?
91 Consider the following statements:
Statement A: The dispose() method is called after the last reference to an
object is released from the memory.
Statement B: Constructors are special methods that are used to release the
instance of a class from memory.
On the basis of the preceding statements, identify which of the following
statements is correct?
92 You are creating a C# application for your organization. You want that the
application should be able to dynamically change the reference to the methods
in a class. Which of the following concepts will you use in your application to
perform this task?
93 Which of the following tasks is NOT performed by the publisher object while
defining a delegate for an event?
94 You want to declare a delegate in you C# program. The delegate should be
used to refer any method that takes an integer parameter and does not return
any value. Which of the following code snippets can be used to declare such a
delegate?
95 Which of the following statements is NOT true about delegates?
96 You have been assigned the following tasks for implementing events with
delegates in a C# program:
1) Declare a delegate
2) Declare an event based on the delegate
3) Fire the event
Which of the following objects will you use to accomplish the preceding tasks?
97 You have defined an event and a delegate by using the following code
snippet:

public delegate void TimeToRise();


private event TimeToRise RingALarm;

Further, you have created a class named Student that contains a method
named Wakeup(). You want that the WakeUp() method should be called at 6
am. Identify the correct code snippet that allows the Student class to subscribe
to the event named TimeToRise.
98 _____________ class is used to read characters from a byte stream.
99 A _____________ occurs when an application compiles and runs properly but
does not produce the expected results.
100 The ______________ contains constants for controlling the kind of access that
the FileStream constructors can have on a file.
101 Which of the following definitions correctly describes the peek method of the
StreamReader class?
102 Which of the following definitions correctly defines the Flush method of
StreamWriter class?
103 Predict the output of the following code:

using System;
namespace ThreadExample
{
class MainThreadExample
{
public static void Main(string[] args)
{
Thread Th = Thread.CurrentThread;
Th.Name = "MainThread";
Console.WriteLine("The current thread after name change: {0}",
Th.Name);
Console.ReadLine();
}
}
}
104 Consider the following code:

using System;
using System.Threading;
namespace ThreadSample
{
class BasicThreadApp
{
public static void ChildThreadCall()
{
Console.WriteLine("Child thread started");
int SleepTime = 5000;
Console.WriteLine("Sleeping for {0} seconds", SleepTime/1000);
ChildThread.Sleep(SleepTime);
Console.WriteLine("Waking Up");
}
public static void Main()
{
ThreadStart ChildRef = new ThreadStart(ChildThreadCall);
Console.WriteLine("Main - Creating Child thread");
Thread ChildThread = new Thread(ChildRef);
ChildThread.Start();
Console.WriteLine("Main - Have requested the start of child
thread");
Console.ReadLine();
}
}
}
The preceding code generates a compile-time error. Identify the line of code
that will generate the error.
105 Sam has created the following method in a C# application to accept and print
book details:

public static void BookDetails()


{
Console.WriteLine("Enter the name of the book you want to buy: ");
String str=Console.ReadLine();
Console.WriteLine("Enter the number of copies you want:");
int Num1= Convert.ToInt32(Console.ReadLine());
Console.WriteLine("You have requested for {0} copies of the {1} book.
",Num1, str);
}

Further Sam wants to call this method by using thread in the application.
Identify the correct code snippet that Sam should implement to create a thread
and call the BookDetails() method by using the newly created thread.
106 Jonathan has developed a notepad application by using C#. In the application,
he has created three methods namely, Write(), Save(), and Print() to write data
in a text file, save the file, and print the file, respectively. He wants to call these
methods by using threads. Further, he wants that the Save() method should be
called after the execution of the Write() method and the Print() method should
be called after the file has been saved. Which of the following code snippets
can help Jonathan to accomplish the preceding tasks?
107 Stella wants to create a clock application in C#. After every five seconds, the
application displays a message to the user that 5 seconds are over. This
should continue till one minute is over. Which of the following codes can help
Stella to implement the required task?
108 Mr. Beth has been assigned a task to create a game application in C# that
gives a user 15 seconds to type the text printed on the screen. He writes the
following code for the game:

using System;
using System.IO;
using System.Threading;
namespace Game
{
public class Typometer
{
public void StartGame()
{
String str = "The Cheater Cheats the Cheating Code";
Console.WriteLine(str);
String userVal = Console.ReadLine();
if (userVal == str)
{
Console.WriteLine("\nYou WON! Game Over! \n");
}
else
{
Console.WriteLine("\nThe strings does not match..Game Over!
\n");
}
Thread.Sleep(15000);
}
}
class Game
{
static void Main(string[] args)
{
Console.WriteLine("You have to complete the game within 15
109 Predict the output of the following code:

using System;
using System.Threading;
class ThreadSchedule
{
public static void Doctor()
{
for (int Cnt = 0; Cnt < 2; Cnt++)
{
Console.Write("\nDoctor: Give medicine " + (Cnt + 1));
Console.WriteLine();
Thread.Sleep(1000);
}
Console.WriteLine("Doctor: Work finished");
}
public static void Nurse()
{
for (int Cnt = 0; Cnt < 2; Cnt++)
{
Console.Write("Nurse: Medicine " + (Cnt + 1) + " given\n");
Console.WriteLine();
Thread.Sleep(1000);
}
Console.WriteLine("Nurse: Work finished");
}

public static void Main()


{
ThreadStart Child1 = new ThreadStart(Doctor);
ThreadStart Child2 = new ThreadStart(Nurse);
Thread Thread1 = new Thread(Child1);
Thread Thread2 = new Thread(Child2);
110 Consider the following code:

using System;
using System.Threading;
namespace ThreadExample
{
class FileAccess
{
public void WriteData(string Data)
{
Monitor.Enter(this);
Console.WriteLine("Writing data to file");
for (int Cnt = 0; Cnt < 5; Cnt++)
{
Console.WriteLine("Writing in Line {0}", Cnt );
}
Monitor.Exit();
}
}
class ThreadMonitorClass
{
public static FileAccess Fd = new FileAccess();
public static void ChildThread1()
{
Console.WriteLine("Thread 1 started");
Fd.WriteData("T1");
}
public static void ChildThread2()
{
Console.WriteLine("Thread 2 started");
Fd.WriteData("T2");
}
public static void Main()
111 Consider the following code that locks the code of the UpdateAC() method by
using the lock statement:
using System;
using System.Threading;
namespace ThreadExample
{
class FileAccess
{
public void UpdateAC(string Data)
{
lock()
{
Console.WriteLine("Updating Salary Accounts: {0}", Data);
for (int Cnt = 0; Cnt < 5; Cnt++)
{
Console.WriteLine("Updated {0} record", Cnt+1);
}
}
}
}
class ThreadMonitorClass
{
public static FileAccess Fd = new FileAccess();
public static void ChildThread1()
{
Console.WriteLine("Thread 1 started");
Fd.UpdateAC("T1");
}
public static void ChildThread2()
{
Console.WriteLine("Thread 2 started");
Fd.UpdateAC("T2");
}
112 Sim has been assigned the task of creating a C# application for a game. She
has to use the Thread class to perform different functions in the game.
Therefore, she created an instance of the Thread class in the application. Now,
she has to allocate system resources such as memory to the instance of the
Thread class. How will she perform the required task?
113 Jim has to create an application that accepts two numbers from the user and
displays the remainder after dividing the two numbers. He wants to implement
exception handling in his application. He wants to handle the exception in such
a way that application displays the message Calculation completeirrespective
of any exception. Which of the following code snippets will help Jim to perform
the required task?
1 Which of the following options provides a step-by-step evaluation of values in
the variables of the program?
2 Which of the following options means a sequence of instructions that are
repeated more than once?
3 Which of the following statements enables the control of an application to pass
back from a module to the main program?
4 Which of the following operators can be used to ensure that all specified
conditions are met to execute an operation?
5 You have created a program to calculate the sum of a set of values. Now, you
want to evaluate the output of the program with a set of sample values. Which
of the following options enables you to accomplish the required task?
6 Consider the following statements:
Statement A: Loops are of two types, fixed loops and variable loops.
Statement B: The number of repetitions for a fixed loop is not known.
Which of the following options is correct about the preceding statements?
7 You have to create a complex program that is divided into individual modules.
Which of the following options enables you to accomplish the required task?
Logic building
8 Tim has to create a project on the solar system for his school. He decides to
use the Internet to search for the information on Mars, Saturn, and Jupiter. He
wants to search for the websites or Web pages that contain the information
about all the planets specified in the search query. How should Tim phrase the
search query to get the desired result?
9 Set of instructions given to a computer to perform a particular job is called a
____________.
10 Which of the following keywords in pseudocode is an iterative construct with a
testing statement at the bottom of the iterative set of statements?
11 Identify the constants from the following list:

"Bat"
Payment
10
"Peter"
Marks
12 Consider the following statements:

Statement A: The % operator returns the remainder value when one number is
divided by another number.
Statement B: Logical operators are used to combine expressions containing
arithmetic operators.

Which of the following options is correct with respect to the preceding


statements?
13 You want to compare two numbers and if the numbers are not equal, the
expression should evaluate to true. Which of the following relational operators
will you use for this task?
14 Complete the following expression with an appropriate logical operator so that it
evaluates to true even if one of the individual conditions evaluate to true:
nNum1 = 7 _____ nNum2 > 5
15 Your manager has asked you to book air-tickets for him. Therefore, you
checked the flight requirements and now want to enter the manager's personal
details, such as name, address, and phone number. In which phase of the I-P-
O cycle will you perform the activity of entering the manager details?
16 You have been asked to prepare a descriptive flowchart for generating the
fibonacci series. Which of the following symbols will you use to add comments
to your flowchart?
17 Analyze the given flowchart where a number is accepted and incremented by 1.
Identify the incorrect usage of symbol(s), if any, in the flowchart. Click the
Exhibit button to view the flowchart.
18 Which of the following examples is a valid declaration of a variable name in
C#?
19 How many bytes are occupied by the char data type in C# programming
language?
20 Consider X=5. Determine the values of X and Y after the execution of the
following expression:
Y=X++;
21 Which of the following operators is used when you want to compare two values
and perform an action on the basis of the result of that comparison?
1, Microcomputer 2, Minicomputer 3, Mainframe
computer
4, Supercomputer 2
1, Computers work at
a very high speed.
2, Computers rarely
make mistakes.
3, Computers are less
flexible than humans.
4, Computers do not
get bored by
repetitive work.
3
1, Processor 2, Hard drive 3, Motherboard 4, Joystick 3
1, Hard disk 2, Floppy disk 3, Compact disk 4, Random access
memory
1
1, Text file 2, Data file 3, Graphic file 4, Audio file 2
1, By selecting the
Icon option from the
View menu
2, By selecting the
Thumbnails option
from the View menu
3, By selecting the
List option from the
View menu
4, By selecting the
Details option from
the View menu
4
1, 1. Type
http://www.google.co.
in in the Address Bar
of the Web
browser.
2. Type the specific
search keyword in the
Search text box.
3. Click the Images
hyperlink on the
Google website home
page.
4. Click the Search
Images button to
display the result.
2, 1. Type
http://www.google.co.i
n in the Address Bar
of the Web browser.
2. Click the Images
hyperlink on the
Google website home
page.
3. Type the specific
search keyword in the
Search text box.
4. Click the Search
Images button to
display the result.
3, 1. Type
http://www.google.co.i
n in the Address Bar
of the Web browser.
2. Click the Images
hyperlink on the
Google website home
page.
3. Click the Search
Images button to
display the result.
4. Type the specific
search keyword in the
Search text box.
4, 1. Type
http://www.google.co.
in in the Address Bar
of the Web
browser.
2. Type the specific
search keyword in the
Search text box.
3. Click the Search
Images button to
display the result.
4. Click the Images
hyperlink on the
Google website home
page.
2
1, By using a flatbed
plotter
2, By using a thermal
printer
3, By using a flatbed
scanner
4, By using a light
pen
1
1, By using a floppy
disk
2, By using a compact
disk
3, By using a hard
disk
4, By using a
Magneto-Optical disk
4
1, Scanner 2, Touch screen 3, Plotter 4, Printer 1
1, Resistive touch
screens
2, Infrared touch
screens
3, Surface Acoustic
touch screens
4, Capacitive touch
screens
3
1, Light Pen mouse 2, Joystick mouse 3, Trackball mouse 4, Wireless mouse 4
ITFC Questions
1, Bus 2, Microprocessor 3, Clock Chip 4, Ports 3
1, Mozilla 2, Opera 3, Netscape
Navigator
4, Internet Explorer 2
1, Opera 2, Mozilla 3, Netscape
Navigator
4, Internet Explorer 1
1, RS-232C port 2, Extend Capability
Port (ECP)
3, Parallel port PS / 2
(bidirectional)
4, Enhanced Parallel
Port (EPP)
1
1, Nesting
(parentheses ())
2, Wildcards (*) 3, Or 4, Quotation marks ("
")
4
1, History button in
the Location bar
2, History button in
the Toolbar
3, Favorites button in
the Toolbar
4, Favorites button in
the Location bar
3
1, Operating System 2, TCP/IP - protocol 3, Web browser 4, Modem 4
1, Industry Standard
architecture Bus
2, Extended ISA Bus 3, Video Electronics
Standards
Association Local Bus
4, Peripheral
Component
Interconnect Bus
4
1, SMPS 2, Controller Cables 3, Chipset 4, Bus 1
1, Bluetooth 2, CDMA 3, Infrared 4, WiFi 1
1, SDRAM 2, DRAM 3, RDRAM 4, DDR 1
1, PDA 2, Palmtops 3, Laptops 4, iPod 1
1, By installing a EGA
graphics adaptor
2, By installing a VGA
graphics adaptor
3, By installing a CGA
graphics adaptor
4, By installing a
SVGA graphics
adaptor
4
1, Up 2, Forward 3, View 4, Back 4
1, 1. Click the MyFile
file in Windows
Explorer.
2. Click on the Copy
this file hyperlink
under File and Folder
Tasks in the left pane
of the window.
3. Click the Copy
button.
4. Select the Projects
folder from the list in
the Copy Items dialog
box.
2, 1. Click the MyFile
file in Windows
Explorer.
2. Click on the Copy
this file hyperlink
under File and Folder
Tasks in the left pane
of the window.
3. Select the Projects
folder from the list in
the Copy Items dialog
box.
4. Click the Copy
button.
3, 1. Click on the
Copy this file
hyperlink under File
and Folder Tasks in
the left pane of the
window.
2. Click the MyFile file
in Windows
Explorer.
3. Select the Projects
folder from the list in
the Copy Items dialog
box.
4. Click the Copy
button.
4, 1. Click the Copy
button.
2. Click the MyFile file
in Windows
Explorer.
3. Click on the Copy
this file hyperlink
under File and Folder
Tasks in the left pane
of the window.
4. Select the Projects
folder from the list in
the Copy Items dialog
box.
2
1, 1. Click the right
mouse button on the
blank area of the
Desktop screen.
2. Select the
Properties option
from the menu.
3. Select the
Appearance tab in
the Display
Properties dialog box.

4. Select the
appropriate option
from the Windows
and buttons drop-
down list box.
5. Click the OK
button to apply the
changes.
2, 1. Click the right
mouse button on the
blank area of the
Desktop screen.
2. Select the
Appearance tab in the
Display Properties
dialog box.
3. Select the
Properties option from
the menu.
4. Select the
appropriate option
from the Windows
and buttons drop-
down list box.
5. Click the OK button
to apply the changes.
3, 1. Select the
Appearance tab in the
Display Properties
dialog box.
2. Click the right
mouse button on the
blank area of the
Desktop screen.
3. Select the
Properties option from
the menu.
4. Select the
appropriate option
from the Windows
and buttons drop-
down list box.
5. Click the OK button
to apply the changes.
4, 1. Click the right
mouse button on the
blank area of the
Desktop screen.
2. Select the
Properties option
from the menu.
3. Select the
Appearance tab in
the Display
Properties dialog box.

4. Click the OK
button to apply the
changes.
5. Select the
appropriate option
from the Windows
and buttons drop-
down list box.
1
1, 1. Select the Find
option
2. Click the Edit
menu
3. Enter the required
word in the Find what
text box in the Find
dialog box.
4. Click the Find Next
button to find the
required word.
2, 1. Click the Edit
menu
2. Select the Find
option
3. Enter the required
word in the Find what
text box in the Find
dialog box.
4. Click the Find Next
button to find the
required word.
3, 1. Select the Find
option
2. Enter the required
word in the Find what
text box in the Find
dialog box.
3. Click the Edit
menu
4. Click the Find Next
button to find the
required word.
4, 1. Click the Edit
menu.
2. Enter the required
word in the Find what
text box in the Find
dialog box.
3. Select the Find
option
4. Click the Find Next
button to find the
required word.
2
WBT /CBT Questions
1, Language bar 2, Smart tags 3, Task pane 4, Ask a question box 3
1, Task panes 2, Smart tags 3, Language bar 4, Ask a question box 2
1, Task panes 2, Smart tags 3, Language bar 4, Ask a question box 3
1, Menu bar 2, Title bar 3, Status bar 4, Scroll bar 1
1, Reveal Formatting 2, Clear Formatting 3, Styles and
Formatting
4, Table AutoFormat 4
1, Merge multiple
copies of a document
2, Display the format
of the document
3, Translate
document text to
another language
4, E-mail a document
to a group of people
4
1, Trace Precedents 2, Trace Dependents 3, Trace Errors 4, Evaluate Formula 2
1, Slide Layout 2, Design Templates 3, Color Schemes 4, Slide Transition 2
1, Web Page Preview 2, Print Preview 3, Send To 4, Page Setup 2
1, Mail Merge 2, AutoCorrect 3, AutoContent 4, Shared Documents 1
1, Task panes 2, Smart Tags 3, Language Bar 4, Ask a Question
Box
2
1, Drawing Canvas 2, Show\Hide
Whitespace
3, Watermarks 4, Shared Documents 3
1, Clear Formatting 2, Styles and
Formatting
3, Reveal Formatting 4, List Styles 3
1, Auto Format 2, Border Style 3, Background 4, Tab Color 4
1, Rotate images 2, Create photo album 3, Compress pictures 4, Create handouts 3
1, 1. Place the
insertion point on the
changed text.
2. Point to the blue
colored button
underneath the text
for displaying the
AutoCorrect options
smart tag.
3. Click the
AutoCorrect options
button.
4. Select Change
back to "acme"
command from the
AutoCorrect Options
Actions menu.
2, 1. Place the
insertion point on the
changed text.
2. Click the
AutoCorrect options
button.
3. Point to the blue
colored button
underneath the text
for displaying the
AutoCorrect options
smart tag.
4. Select Change
back to "acme"
command from the
AutoCorrect Options
Actions menu.
3, 1. Point to the blue
colored button
underneath the text
for displaying the
AutoCorrect options
smart tag.
2. Place the insertion
point on the changed
text.
3. Click the
AutoCorrect options
button.
4. Select Change
back to "acme"
command from the
AutoCorrect Options
Actions menu.
4, 1. Place the
insertion point on the
changed text.
2. Point to the blue
colored button
underneath the text
for displaying the
AutoCorrect options
smart tag.
3. Select Change
back to "acme"
command from the
AutoCorrect Options
Actions menu.
4. Click the
AutoCorrect options
button.
1
1, 1. Click the Table
AutoFormat icon on
the Tables and
Borders toolbar.
2. Place the mouse
pointer inside the
table.
3. Select a table style
from the Table styles
list box in the Table
AutoFormat dialog
box.
4. Click the Apply
button.
2, 1. Place the mouse
pointer inside the
table.
2. Click the Table
AutoFormat icon on
the Tables and
Borders toolbar.
3. Select a table style
from the Table styles
list box in the Table
AutoFormat dialog
box.
4. Click the Apply
button.
3, 1. Place the mouse
pointer inside the
table.
2. Select a table style
from the Table styles
list box in the Table
AutoFormat dialog
box.
3. Click the Table
AutoFormat icon on
the Tables and
Borders toolbar.
4. Click the Apply
button.
4, 1. Place the mouse
pointer inside the
table.
2. Select a table style
from the Table styles
list box in the Table
AutoFormat dialog
box.
3. Click the Apply
button.
4. Click the Table
AutoFormat icon on
the Tables and
Borders toolbar.
2
1, 1. Select the
Picture watermark
option in the Printed
Watermark dialog
box.
2. Select the Printed
Watermark command
from the Format
menu.
3. Click the Select
Picture button.
4. Select the required
image in the Insert
Picture dialog box
and click the Insert
button.
2, 1. Select the
Picture watermark
option in the Printed
Watermark dialog
box.
2. Click the Select
Picture button.
3. Select the Printed
Watermark command
from the Format
menu.
4. Select the required
image in the Insert
Picture dialog box and
click the Insert button.
3, 1. Select the
Printed Watermark
command from the
Format menu.
2. Select the Picture
watermark option in
the Printed
Watermark dialog
box.
3. Click the Select
Picture button.
4. Select the required
image in the Insert
Picture dialog box
and click the Insert
button.
4, 1. Select the
Printed Watermark
command from the
Format menu.
2. Select the Picture
watermark option in
the Printed
Watermark dialog
box.
3. Select the required
image in the Insert
Picture dialog box
and click the Insert
button.
4. Click the Select
Picture button.
3
1, 1. Select the New
Photo Album
command from the
Insert menu.
2. Click the
Scanner/Camera
button.
3. Select the pictures
that need to be
inserted and click the
Insert button.
4. Click the Create
button.
2, 1. Click the Create
button.
2. Select the New
Photo Album
command from the
Insert menu.
3. Click the
Scanner/Camera
button.
4. Select the pictures
that need to be
inserted and click the
Insert button.
3,1. Select the New
Photo Album
command from the
Insert menu.
2. Click the File/Disk
button.
3. Select the pictures
that need to be
inserted and click the
Insert button.
4. Click the Create
button.
4, 1. Select the New
Photo Album
command from the
Insert menu.
2. Click the Create
button.
3. Click the File/Disk
button.
4. Select the pictures
that need to be
inserted and click the
Insert button.
3
1, 1. Select the Sum
command.
2. Click in a cell, and
then click the down
arrow of the AutoSum
button in the standard
toolbar.
3. Select the range of
cells that need to be
added.
4. Press the Enter
button.
2, 1. Click in a cell,
and then click the
down arrow of the
AutoSum button in the
standard toolbar.
2. Select the Sum
command.
3. Select the range of
cells that need to be
added.
4. Press the Enter
button.
3, 1. Click in a cell,
and then click the
down arrow of the
AutoSum button in
the standard
toolbar.
2. Select the Sum
command.
3. Press the Enter
button.
4. Select the range of
cells that need to be
added.
4, 1. Select the Sum
command.
2. Select the range of
cells that need to be
added.
3. Click in a cell, and
then click the down
arrow of the AutoSum
button in the standard
toolbar.
4. Press the Enter
button.
2
1, Method 2, Object 3, Class 4, Data 2
1, Common
Language Runtime
2, Base Class
Libraries
3, Web Form and
Web Services
4, Console
Applications
1
1, Windows Control
Library
2, Device Application 3, Console
Application
4, Class Library 4
1, Realistic Modeling 2, Reusability 3, Resilience to
Change
4, Existence as
Different Forms
2
1, Design 2, Blueprint 3, Analysis 4, Implementation 3
1, Statement A is true
and statement B is
false.
2, Statement A is
false and statement B
is true.
3, Both statement A
and statement B are
true.
4, Both statement A
and statement B are
false.
1
1, Output 2, Class view 3, Solution Explorer 4, Code Editor 3
C#
1, Finalize 2, Dispose 3, Constructor 4, Destructor 3
1, System.Console 2, System.Delegate 3,
System.MulticastDele
gate
4, System.Attribute 2
1, The code would
give a runtime error
2, Beep Beep! 3, The code would not
compile
4, BEEP BEEP! 4
1, public class
CountIsZeroExceptio
n:Exceptions
{

Console.WriteLine("E
rror");
}
2, public class
CountIsZeroException
:Exceptions
{
public
CountIsZeroException
(string message):
base(message)
{
}
}
3, public class
CountIsZeroExceptio
n :
ApplicationException

{
public
CountIsZeroExceptio
n(string message):
base(message)
{
}
}
4, public class
CountIsZeroExceptio
n:InvalidProgramExc
eption
{

Console.WriteLine("E
rror");

}
3
1, 0 2, 10 3, 8 4, 9 2
1, calc = -calc; 2, calc(-c) 3, Calculator(-c); 4, calc = calc; 1
1, 2
1
3
3
2, 1
2
3
3
3, 2
1
2
2
4, 2
2
3
3
1
1, Operator
overloading
2, Virtual functions 3, Function
overloading
4, Abstract classes 3
1, Derived obj = new
Derived();
2, class Derived : B1 3, obj.Function1(); 4, void Function1(); 4
1, The access
specifier of the
FoodHabits() method
is not declared as
protected in the
Carnivorous class.
2, The FoodHabits
method has not been
overridden in the
derived classes by
using the overrides
keyword.
3, The FoodHabits()
method is
implemented in the
Carnivorous class.
4, The FoodHabits()
method has been
implemented in the
Animal class.
4
1, The Engine()
method is not
declared virtual in the
Truck class.
2, The Engine()
method is not
declared virtual in the
Car class.
3, The access
specifier of the
Engine() method is
not declared as
protected in the Car
class.
4, The access
specifier of the
Engine() method is
not declared as
protected in the Truck
class.
2
1, disp obj=new
disp();
2, obj.abcd(); 3, class disp :
myClass
4, Console.Read(); 3
1, The
UpdateCustStatus()
and TakeOrder()
methods are
implemented in the
interface.
2, The
UpdateCustStatus()
and TakeOrder()
methods are
implemented in the
ItemDetails class.
3, The access
specifier of the
interface is not
declared as
protected.
4, The class
ItemsDetails is calling
the interface methods
without passing any
parameters to the
methods.
1
1, Value of number1
is 10, Value of
number2 is 3.
2, Value of number1
is 3, Value of number
2 is 10.
3, No output, there
would be a compile-
time error.
4, Value of number 1
is 0, Value of number
2 is 0.
3
1, Compile-time error 2, The total is : 50 3, The total is: 120 4, The total is: 20 3
1, Calculator()
{

Console.WriteLine("P
rogram
Terminating");
Console.Read();
}
2, ~Calculator()
{

Console.WriteLine("Pr
ogram
Terminating");
Console.Read();
}
3, !Calculator()
{

Console.WriteLine("P
rogram
Terminating");
Console.Read();
}
4, ~Calculator()
{

System.WriteLine("Pr
ogram
Terminating");
Console.Read();
}
2
1, By using a
constructor
2, By using a
destructor
3, By using the
Finalize() method
4, By using the
Dispose() method
4
1, Main() Begins
Constructor
Invoked
Inner Block Begins
Constructor
Invoked
Inner Block Ends
Main() ends
Destructor Invoked
Destructor Invoked
2, Constructor
Invoked
Main() Begins
Inner Block Begins
Constructor Invoked
Inner Block Ends
Main() ends
Destructor Invoked
Destructor Invoked
3, Main() Begins
Constructor Invoked
Constructor Invoked
Inner Block Begins
Inner Block Ends
Main() ends
Destructor Invoked
Destructor Invoked
4, Main() Begins
Constructor
Invoked
Constructor
Invoked
Inner Block Begins
Inner Block Ends
Destructor Invoked
Destructor Invoked
Main() ends
1
1, Opens the file
Myfile.txt and the
places the cursor at
the beginning of the
file.
2, Opens the file
Myfile.txt and
truncates the file, so
that its size is zero
bytes.
3, Opens the file
MyFile.txt and places
the cursor at the end
of the file.
4, Deletes the
existing file Myfile.txt
and creates a new
file with the same
name.
3
1,string
str=Console.ReadLin
e();
StringWriter
sr = new
StringWriter(str);

Console.WriteLine(sr.
ReadLine());

Console.Read();
2, string
str=Console.ReadLine
();
FileStream sr
= new
FileStream(str);

Console.WriteLine(sr.
ReadLine());

Console.Read();
3, string
str=Console.ReadLin
e();
StreamReader
sr = new
StringReader(str);

Console.WriteLine(sr.
ReadLine());

Console.Read();
4, string
str=Console.ReadLin
e();
StringReader
sr = new
StringReader(str);

Console.WriteLine(sr.
ReadLine());

Console.Read();
4
1, 1. Opens the file
Myfile.txt, and
prepares the stream
for a read
operation.
2. Positions the file
pointer at the
beginning of the
stream.
3. Reads a line of
characters from the
current stream and
returns data as a
string.
2, 1. Opens the file
Myfile.txt, and
prepares the stream
for a read operation.
2. Positions the file
pointer at the end of
the stream.
3. Reads a line of
characters from the
current stream and
returns data as a
string.
3, 1. Opens the file
Myfile.txt, and
prepares the stream
for a read operation.
2. Positions the file
pointer at the current
position within the
stream.
3. Reads data types
from a binary stream.
4, 1. Opens the file
Myfile.txt, and
prepares the stream
for a read
operation.
2. Positions the file
pointer at the
beginning of the
stream.
3. Converts
characters into binary
data types and reads
the data types from
the binary stream.
1
1, The code would list
the name and size of
all the sub folders
under the c:\Windows
folder.
2, The code would
result in an error.
3, The code would list
the name and size of
all the files under the
c:\Windows folder.
4, The code would list
the name and the
total size of the
c:\Windows folder.
3
1, StreamReader sr =
new
StreamReader(fs);
2,
sr.BaseStream.Seek(
0, SeekOrigin.End);
3, FileStream fs =
new
FileStream("Myfile.txt"
,
FileMode.Open,FileA
ccess.Read);
4, sr.Close(); 2
1, String filePath;
Console.WriteLine("E
nter Folder Path");
filePath=Console.Rea
dLine();
DirectoryInfo
MydirInfo = new
DirectoryInfo(@filePa
th);

Console.WriteLine("F
ull Name of the
directory is : {0}",

MydirInfo.FullName);


Console.WriteLine("T
he directory was last
accessed on : {0}",

MydirInfo.LastAccess
Time.ToString());
Console.Read();
2, String filePath;
Console.WriteLine("E
nter Folder Path");
filePath=Console.Rea
dLine();
DirectoryInfo
MydirInfo = new
FileInfo(@filePath);

Console.WriteLine("F
ull Name of the
directory is : {0}",

MydirInfo.FullName);


Console.WriteLine("T
he directory was last
accessed on : {0}",

MydirInfo.LastAccess
Time.ToString());
Console.Read();
3, String filePath;
Console.WriteLine("E
nter Folder Path");
filePath=Console.Rea
dLine();
DirectoryInfo
MydirInfo = new
DirectoryInfo(@filePat
h);

Console.WriteLine("F
ull Name of the
directory is : {0}",

MydirInfo.Name);

Console.WriteLine("T
he directory was last
accessed on : {0}",

MydirInfo.LastAccess
Time.ToString());
Console.Read();
4, String filePath;
Console.WriteLine("E
nter Folder Path");
filePath=Console.Rea
dLine();
FileInfo[]
MydirInfo = new
DirectoryInfo[](@fileP
ath);

Console.WriteLine("F
ull Name of the
directory is : {0}",

MydirInfo.Name);

Console.WriteLine("T
he directory was last
accessed on : {0}",

MydirInfo.LastAccess
Time.ToString());
Console.Read();
1
1, The finally block is
not implemented after
the catch block.
2, The class is not
derived from the
ApplicationException
class.
3, The type of
exception that is
handled in the catch
block is not correct.
4, The catch block is
not nested within the
try block.
3
1,
System.AsyncCallbac
k
2,
System.AppDomain
3, System.Attribute 4,
System.AttributeTarg
ets
2
1, delegates 2, threading 3, positional
parameters
4, named parameters 3
1, Conditional 2, WebMethod 3, DllImport 4, Obsolete 3
1, Field 2, Interface 3, Module 4, All 4
1, System.Data 2, System.Collections 3, System.Runtime 4, System.Reflection 4
1, public void
WriteData()
{
FileStream fs
= new
FileStream("Myfile.txt
",FileMode.Open,
FileAccess.Read);
StreamWriter
w = new
StreamWriter(fs);

Console.WriteLine("E
nter a string");
string str =
Console.ReadLine();

w.Write();
w.Flush();
w.Close();
fs.Close();
}
2, public void
WriteData()
{
FileStream fs
= new
FileStream("Myfile.txt"
,FileMode.Append,
FileAccess.Write);
StreamWriter
w = new
StreamWriter();

Console.WriteLine("E
nter a string");
string str =
Console.ReadLine();

w.Write(str);
w.Close();
fs.Close();
}
3, public void
WriteData()
{
FileStream fs
= new
FileStream("Myfile.txt"
,FileMode.Append,
FileAccess.Write);
StreamWriter
w = new
StreamWriter(fs);

Console.WriteLine("E
nter a string");
string str =
Console.ReadLine();

w.Write(str);
w.Flush();
w.Close();
fs.Close();
}
4, public void
WriteData()
{
FileStream fs
= new
FileStream("Myfile.txt
",FileMode.Append,
FileAccess.Write);
StreamWriter
w = new
StreamWriter(fs);

Console.WriteLine("E
nter a string");
string str =
Console.ReadLine();

w.Write();
w.Close();
fs.Close();
}
3
1, catch
(NullReferenceExcep
tion e1)
{

Console.WriteLine(e1
.Message);
}
2, catch
(InvalidCastException
e2)
{

Console.WriteLine(e2.
Message);
}
3, catch (IOException
e)
{

Console.WriteLine(e.
Message);

Console.Read();
}
4, catch
(ArgumentNullExcepti
on e3)
{

Console.WriteLine(e3
.Message);
}
3
1, void binWriter()
{
FileStream fs
= new
FileStream("binfile.D
AT",
FileMode.CreateNew)
;
int i = 10;
double d =
1023.56;
BinaryWriter
dataout;
dataout =
BinaryWriter(fs);


dataout.Write(i);

dataout.Write(d);

dataout.Close();
}
2, void binWriter()
{
FileStream fs
= new
FileStream("binfile.DA
T", FileMode.Open);
int i = 10;
double d =
1023.56;
BinaryWriter =
new BinaryWriter(fs);


dataout.Write(i);

dataout.Write(d);

dataout.Close();
}
3, void binWriter()
{
FileStream fs
= new
FileStream("binfile.DA
T",
FileMode.CreateNew)
;
int i = 10;
double d =
1023.56;
BinaryWriter
dataout;
dataout = new
BinaryWriter(fs);


dataout.Write(i);

dataout.Write(d);

dataout.Close();
}
4, void binWriter()
{
FileStream fs
= new
FileStream("binfile.D
AT",
FileMode.Open);
int i = 10;
double d =
1023.56;
BinaryWriter
dataout;
dataout = new
BinaryWriter(fs);


dataout.Write(i);

dataout.Write(d);

dataout.Close();
}
3
1, void myMethod()
{
try
{
................
}
catch
{
Console.WriteLine(E
xception.message);
}
}
2, void myMethod()
{
try
{
................
}
catch(IndexOutOfRan
geException e)
{
Console.WriteLine(e.
message);
}
}
3, void myMethod()
{
try
{
................
}
catch(e)
{
Console.WriteLine(e.
message);
}
}
4, void myMethod()
{
try
{
................

catch(IndexOutOfRan
geException e)
{

Console.WriteLine(e.
message);
}
}
}
2
1, String str = "Hello"; 2, StreamWriter sr =
new StreamWriter(fs);
3, String
str=Console.ReadLin
e();
4, FileStream fs =
new
FileStream("orders.tx
t", FileMode.Append,
FileAccess.Write,
FileShare.None);
1
1, Writing 1023.56
Writing True
Writing 90.28

Reading 1023.56
Reading True
Reading 90.28
2, Writing True
Writing 1023.56
Writing 90.28
Reading True
Reading 1023.56
Reading 90.28
3, Writing 1023.56
Writing 90.28

Reading 1023.56
Reading 90.28
4, Writing 1023.56
Writing True
Writing 12.2 * 7.4

Reading 1023.56
Reading True
Reading 12.2 * 7.4
1
1, int 2, class 3, arrays 4, collections 1
1, double 2, bool 3, float 4, char 4
1, Structure 2, Arrays 3, Double 4, Boolean 2
1, int 2, char 3, float 4, string 4
1, if(var>0)
then:

Console.WriteLine( T
his is a positive
number);
2, if (var>0)

Console.WriteLine(Th
is is a positive
number);
3, if (var>0)

console.WriteLine(Thi
s is a positive
number);
4, if var>0

Console.WriteLine( T
his is a positive
number);
2
1, using System; 2, public void
AcceptDetails()
3, class ExecuteClass 4, public static void
Main (string [] args)
4
1, Result = (!( x ==
10));
2, Result = (x^10); 3, Result =
x.equals(10);
4, Result = ( x == 10); 1
1, The while loop 2, The for loop 3, The dowhile loop 4, The foreach loop 3
1, Value of variable
is: 0
Value of variable is: 1
2, Value of variable is:
1
Value of variable is: 2
3, The compiler will
generate a syntax
error.
4, Value of variable
is: 0
Value of variable is:
1
Value of variable is: 2
2
1, By using param
arrays
2, By using foreach
statement
3, By using IndexOf
method
4, By using Rank
property
1
1, X=0 and Y=20 2, X=20 and Y=20 3, X=0 and Y=0 4, X=20 and Y=0 1
1, 1. Initialization of a
variable.
2. Evaluate
condition.
3. If true then execute
the body of the for
loop.
4.
Increment/Decrement
the counter.
5. If false then exit
the for loop.
2, 1. Initialization of a
variable.
2. Evaluate
condition.
3.
Increment/Decrement
the counter.
4. If true then execute
the body of the for
loop.
5. If false then exit the
for loop.
3, 1. Initialization of a
variable.
2.
Increment/Decrement
the counter.
3. Evaluate
condition.
4. If true then execute
the body of the for
loop.
5. If false then exit the
for loop.
4, 1. Evaluate
condition.
2. Initialization of a
variable.
3.
Increment/Decrement
the counter.
4. If true then execute
the body of the for
loop.
5. If false then exit
the for loop.
1
1, struct Bill_Details
{
public string
inv_No;
public string
ord_Dt;
public string
custName;
public string
product;
public double
cost;
public double
advance_Amt;
public double
due_Amt;
}
2, public enum
Bill_Details()
{
string inv_No;
string ord_Dt;
string custName;
string product;
double cost;
double
advance_Amt;
double due_Amt;
}
3, enum Bill_Details
{
public string inv_No;
public string ord_Dt;
public string
custName;
public string
product;
public double cost;
public double
advance_Amt;
public double
due_Amt;
};
4, public structure
Bill_Details
{
public string
inv_No;
public string
ord_Dt;
public string
custName;
public string
product;
public double
cost;
public double
advance_Amt;
public double
due_Amt;
};
1
1, Sat = 0
Fri = 6
2, Sat = Sat
Fri = Fri
3, Sat = 1
Fri = 7
4, The program will
generate a compile-
time error.
1
1, for (int row=0; row
< 2; row++)
{
rowSum =
0;
for (int
col=0; col < 4;
col++)
{

Console.Write("{0}\t",
mArray[row,col]);

rowSum=rowSum+m
Array[row, col];

}
sum = sum
+ rowSum;

Console.Write(" =
{0}", rowSum);

Console.WriteLine();


}

Console.WriteLine("T
he sum of the array
is:{0}", sum);
2, for (int row=0; row
<col; row++)
{
rowSum =
0;
for (int
col=0; col < 4;
col++)
{

Console.Write("{0}\t",
mArray[row,col]);

rowSum=rowSum+m
Array[row, col];

}
sum = sum
+ rowSum;

Console.Write(" =
{0}", rowSum);

Console.WriteLine();

}

Console.WriteLine("T
he sum of the array
is:{0}", sum);
3, for (int row=0; row
< 2; row++)
{
rowSum =
0;
for (int
col=0; col < 3;
col++)
{

Console.Write("{0}\t",
mArray[row,col]);

rowSum=rowSum+m
Array[row, col];

}
sum = sum
+ rowSum;

Console.Write(" =
{0}", rowSum);

Console.WriteLine();


}

Console.WriteLine("T
he sum of the array
is:{0}", sum);
4, for (int row=0; row
< 2; row++)
{
rowSum =
0;
for (int
col=0; col < row;
col++)
{

Console.Write("{0}\t",
mArray[row,col]);

rowSum=rowSum+m
Array[row, col];

}
sum = sum
+ rowSum;

Console.Write(" =
{0}", rowSum);

Console.WriteLine();


}

Console.WriteLine("T
he sum of the array
is:{0}", sum);
1
1, if ((Year % 4 == 0)
; (Year / 100 != 0 ||
Year % 400 == 0))
2, Year =
Convert.ToInt32(Cons
ole.ReadLine());
3,
Console.WriteLine("E
nter the year: ");
4, static void
Main(string[] args)
1
1, int var;
var = 500;
2, case 100:

Console.WriteLine("C
entury");
break;
3, default:

Console.WriteLine("In
valid value");
break;
4, switch(&&var) 4
1, number =
(Console.ReadLine())
;
2, for (SumNum =
number = incr = 0;
incr < 5; incr += 1)
3,
Console.WriteLine("T
he sum of positive
numbers entered is
{0}", SumNum);
4, if (number <= 0)

continue;
SumNum =
SumNum + number;
1
1, Str =
Console.ReadLine().
ToCharArray();
2, private static bool
CheckPalindrome(cha
r[] myString)
3, if
(myString[startChar] =
myString[lastChar])
4, lastChar =
myString.Length - 1;
3
1, number2 +=
number1;
2, num1 = number2-
number1;
3,
Console.WriteLine("{0
}", number1);
4,
number1=number2=1
;
2
1, Abstraction 2, Encapsulation 3, Inheritance 4, Polymorphism 1
1, Access specifier 2, Return type 3, Method name 4, Parameter list 4
1, Parentheses (()) 2, Comma (,) 3, Semi-colon (;) 4, Reference variable
(&)
1
1, Polymorphism 2, Events 3, Constructors and
destructors
4, Delegates 1
1, sealed 2, virtual 3, namespace 4, abstract 1
1, The public access
specifier
2, The private access
specifier
3, The protected
access specifier
4, The internal
access specifier
1
1, +=, -=, *= 2, *, /, % 3, +, - 4, ! , ~, ++ 1
1, Instantiation
relationship
2, Utilization
relationship
3, Inheritance
relationship
4, Composition
relationship
4
1, virtual 2, override 3, void 4, abstract 2
1, Interface 2, Static function 3, Function
overloading
4, Polymorphism 1
1, The public access
specifier
2, The private access
specifier
3, The protected
access specifier
4, The internal
access specifier
3
1, calc c = new calc();

calc.AddNumber(10,
20);
2, calc c = new calc();

int
Result=c.AddNumber(
10, 20);
3, calc c = new
calc(AddNumber(10,2
0));
4, int Result =
AddNumber(10,20);
2
1, Const 2, out 3, static 4, in 3
1, <access specifier>
className operator
+(parameters)
{
// Code
}
2, className
<access specifier>
operator
+parameters
{
// Code
}
3, <access specifier>
className
+(parameters)
operator
{
// Code
}
4, <access specifier>
className +
operator
parameters
{
// Code
}
1
1, public interface
IOrderDetails
{
void
UpdateCustStatus();

void
TakeOrder();
}
2, public void interface
IOrderDetails
{

UpdateCustStatus();
TakeOrder();
}
3, public interface
IOrderDetails
{

UpdateCustStatus();
TakeOrder();
}
4, public static
interface
IOrderDetails
{
void
UpdateCustStatus();

void
TakeOrder();
}
1
1, Inheritance 2, Abstraction 3, Polymorphism 4, Encapsulation 4
1, Encapsulation 2, Function
overloading
3, Inheritance 4, Virtual functions 2
1, Statement A is
true, and Statement
B is false.
2, Statement A is
false, and Statement
B is true.
3, Both, Statement A
and Statement B are
true.
4, Both, Statement A
and Statement B are
false.
2
1, Constructor of
Base
Constructor of
Derived
Destructor of
Derived
Destructor of Base
2, Constructor of
Base
Constructor of
Derived
Destructor of Base
Destructor of Derived
3, Constructor of
Base
Destructor of Base
Constructor of
Derived
Destructor of Derived
4, Constructor of
Derived
Destructor of
Derived
Constructor of Base
Destructor of Base
1
1, Use multithreading 2, Use virtual
functions
3, Use static
polymorphism
4, Use abstract
methods
4
1, Constructor 2, Static function 3, Virtual function 4, Delegate 4
1, Single-cast
delegates
2, Static functions 3, Events 4, Multicast delegates 4
1, Publisher 2, Subscriber 3, Monitor 4, Sender 1
1, Constructors do
not return values.
2, Static constructors
are used to initialize
the non-static
variables of a class.
3, If there are no
constructors defined
for a class, the
compiler creates a
default constructor.
4, An instance
constructor is called
whenever an instance
of a class is created.
2
1, Implementation of
the static constructor
2, Implementation of
the instance
constructor
3, Implementation of
the static function
4, Implementation of
the virtual function
1
1, Abstract classes 2, Operator
overloading
3, Function
overloading
4, Constructor with
parameters
4
1, Statement A is true
and Statement B is
false.
2, Statement A is
false and Statement B
is true.
3, Both, Statement A
and Statement B are
true.
4, Both, Statement A
and Statement B are
false.
4
1, Attributes 2, Reflection 3, Delegates 4, Events 3
1, Declare an event 2, Declare a delegate 3, Declare an event
based on the
delegate
4, Fire the event 1
1, public delegate
void MyDelegate
(string s);
2, public delegate void
MyDelegate (int i);
3, public delegate int
MyDelegate (int i);
4, public delegate int
MyDelegate ();
2
1, A multicast
delegate contains an
invocation list of
multiple methods.
2, A multicast
delegate derives from
the
System.MulticastDele
gate class.
3, A single-cast
delegate contains
reference to only one
method at a time.
4, A single-cast
delegate derives from
the
System.SinglecastDel
egate class.
4
1, Publisher 2, Subscriber 3, Monitor 4, Sender 1
1, Student PD = new
Student();
RingALarm = new
TimeToRise(PD.Wak
eUp);
2, Student PD =
Student();
RingALarm =
TimeToRise(PD.Wak
eUp);
3, Student PD = new
Student();
RingALarm = new
TimeToRise(WakeUp
);
4, Student = new
Student();
RingALarm = new
TimeToRise(WakeUp
);
1
1, StreamReader 2, FileStream 3, StringReader 4, BinaryReader 1
1, logical error 2, syntax error 3, compile-time error 4, run-time error 1
1, FileShare
Enumerator
2, FileAcess
Enumerator
3, FileInfo class 4, StreamWriter class 1
1, It returns the next
available character
but does not
consume it.
2, It allows the
read/write position to
be moved to any
position within the file.
3, It reads a line of
characters from the
current stream and
returns data as a
string.
4, It releases any
system resources
associated with the
reader.
1
1, It closes the
underlying stream.
2, It clears all buffers
for the current writer
and causes any
buffered data to be
written to the
underlying stream.
3, It writes data
specified by the
overload parameters,
followed by end of
line.
4, It writes to the
stream.
2
1, It will generate the
following output:
The current thread
after name change:
MainThread
2, It will generate the
following output:
The current thread
after name change:
Th.Name
3, It will generate the
following compile time
error:
The name 'Thread'
does not exist in the
current context.
4, It will generate the
following output:
The current thread
after name change:
{0}, MainThread
3
1, Thread
ChildThread = new
Thread(ChildRef);
2, ThreadStart
ChildRef = new
ThreadStart(ChildThr
eadCall);
3,
ChildThread.Start();
4,
ChildThread.Sleep(Sl
eepTime);
4
1, public static void
Main(string[] args)
{
ThreadStart
ChildRef = new
ThreadStart(BookDet
ails);
Thread
ChildThread = new
Thread(ChildRef);

ChildThread.Start();

}
2, public static void
Main(string[] args)
{
ThreadStart
ChildRef = new
ThreadStart(BookDet
ails());
Thread
ChildThread = new
Thread(ChildRef);

ChildThread.Start();

}
3, public static void
Main(string[] args)
{
ThreadStart
ChildRef = new
ThreadStart();
Thread
ChildThread = new
Thread(ChildRef);

ChildThread.Start();

ChildThread.CallMeth
od(BookDetails);

}
4, public static void
Main(string[] args)
{
ThreadStart
ChildRef = new
ThreadStart();
Thread
ChildThread = new
Thread(ChildRef);

ChildThread.Start();

ChildThread.BookDet
ails();
}
1
1, public static void
Main()
{
ThreadStart
ChildW = new
ThreadStart(Write);
ThreadStart
ChildS = new
ThreadStart(Save);
ThreadStart
ChildP = new
ThreadStart(Print);


Console.WriteLine("
Main - Creating Child
threads");

Thread Thread1
= new
Thread(ChildW);
Thread Thread2
= new
Thread(ChildS);
Thread Thread3
= new
Thread(ChildP);


Thread3.Start();

Thread1.Start();

2, public static void
Main()
{
ThreadStart
ChildW = new
ThreadStart(Write);
ThreadStart
ChildS = new
ThreadStart(Save);
ThreadStart
ChildP = new
ThreadStart(Print);


Console.WriteLine("M
ain - Creating Child
threads");

Thread Thread1
= new
Thread(ChildW);
Thread Thread2
= new
Thread(ChildS);
Thread Thread3
= new
Thread(ChildP);
Thread1.Priority
=
ThreadPriority.Highest
;
Thread2.Priority
=
3, public static void
Main()
{
ThreadStart
ChildW = new
ThreadStart(Write);
ThreadStart
ChildS = new
ThreadStart(Save);
ThreadStart
ChildP = new
ThreadStart(Print);


Console.WriteLine("M
ain - Creating Child
threads");

Thread Thread1
= new
Thread(ChildW);
Thread Thread2
= new
Thread(ChildS);
Thread Thread3
= new
Thread(ChildP);
Thread1.Priority
=
ThreadPriority.Highes
t;
Thread2.Priority
=
4, public static void
Main()
{
ThreadStart
ChildW = new
ThreadStart(Write);
ThreadStart
ChildS = new
ThreadStart(Save);
ThreadStart
ChildP = new
ThreadStart(Print);


Console.WriteLine("
Main - Creating Child
threads");

Thread Thread1
= new
Thread(ChildW);
Thread Thread2
= new
Thread(ChildS);
Thread Thread3
= new
Thread(ChildP);

Thread1.Priority(High
est);

Thread2.Priority(Nor
mal);
2
1, using System;
using
System.Threading;

namespace
ThreadSample
{
class
BasicThreadApp
{
public static void
ChildThreadCall()
{
for (int i=0; i
<= 12; i++)
{

Console.WriteLine("C
lock Started");

Thread.Sleep(5000);


Console.WriteLine("5
seconds over");
}

Console.WriteLine("1
minute over");
}

public static void


Main()
2, using System;
using
System.Threading;

namespace
ThreadSample
{
class
BasicThreadApp
{
public static void
ChildThreadCall()
{

Console.WriteLine("Cl
ock Started");
for (int i=0; i <
12; i++)
{

Thread.Sleep(5000);
}

Console.WriteLine("5
seconds over");

Console.WriteLine("1
minute over");
}

public static void


Main()
{
3, using System;
using
System.Threading;

namespace
ThreadSample
{
class
BasicThreadApp
{
public static void
ChildThreadCall()
{

Console.WriteLine("Cl
ock Started");
for (int i=0; i >
12; i++)
{

Thread.Sleep(5000);


Console.WriteLine("5
seconds over");
}

Console.WriteLine("1
minute over");
}

public static void


Main()
4, using System;
using
System.Threading;

namespace
ThreadSample
{
class
BasicThreadApp
{
public static void
ChildThreadCall()
{

Console.WriteLine("C
lock Started");
for (int i=0; i <
12; i++)
{

Thread.Sleep(5000);


Console.WriteLine("5
seconds over");
}

Console.WriteLine("1
minute over");
}

public static void


Main()
4
1, The
Thread.Sleep(15000)
; statement is placed
at the wrong position.
It should come after
the following
statement:
String userVal =
Console.ReadLine();
2, The
Thread.Sleep(15000);
statement is placed at
the wrong position. It
should come before
the following
statement:
Console.WriteLine("\n
You WON! Game
Over! \n");
3, The
Thread.Sleep(15000);
statement is placed at
the wrong position. It
should come after the
following statement:
t.Start();
4, The
Thread.Sleep(15000)
; statement is placed
at the wrong position.
It should come before
the following
statement:
str = "The Cheater
Cheats the Cheating
Code";
3
1, Doctor: Give
medicine 1
Doctor: Give
medicine 2

Nurse: Medicine 1
given
Nurse: Medicine 2
given

Doctor: Work
finished
Nurse: Work finished
2, Doctor: Give
medicine 1
Doctor: Give medicine
2
Doctor: Work
finished

Nurse: Medicine 1
given
Nurse: Medicine 2
given
Nurse: Work finished
3, Doctor: Give
medicine 1
Nurse: Medicine 1
given

Doctor: Give medicine


2
Doctor: Work
finished

Nurse: Medicine 2
given
Nurse: Work finished
4, Doctor: Give
medicine 1
Nurse: Medicine 1
given

Doctor: Give
medicine 2
Nurse: Medicine 2
given

Nurse: Work
finished
Doctor: Work finished
4
1,
Fd.WriteData("T1");
2, Monitor.Enter(this); 3, Monitor.Exit(); 4, public static
FileAccess Fd = new
FileAccess();
3
1,
Console.WriteLine("U
pdated {0} record",
Cnt+1);
2, lock() 3,
Fd.UpdateAC("T2");
4, public static
FileAccess Fd = new
FileAccess();
2
1, By calling the
Run() method.
2, By calling the
Start() method.
3, By calling the
Sleep() method.
4, By calling the
Resume() method.
2
1, void Calculate()
{

try
{
int a;
int b;
int c;

Console.WriteLine("E
nter num 1");
a =
Convert.ToInt32(Con
sole.ReadLine());

Console.WriteLine("E
nter num 2");
b =
Convert.ToInt32(Con
sole.ReadLine());
c = a % b;

Console.WriteLine("R
esult is {0}", c);

}
catch
{

Console.WriteLine("E
rror");
}
finally
2, void Calculate()
{

try
{
int a;
int b;
int c;

Console.WriteLine("E
nter num 1");
a =
Convert.ToInt32(Cons
ole.ReadLine());

Console.WriteLine("E
nter num 2");
b =
Convert.ToInt32(Cons
ole.ReadLine());
c = a % b;

Console.WriteLine("R
esult is {0}", c);

}
catch
{

Console.WriteLine("Er
ror");

Console.WriteLine("C
3, void Calculate()
{

try
{
int a;
int b;
int c;

Console.WriteLine("E
nter num 1");
a =
Convert.ToInt32(Cons
ole.ReadLine());

Console.WriteLine("E
nter num 2");
b =
Convert.ToInt32(Cons
ole.ReadLine());
c = a % b;

Console.WriteLine("R
esult is {0}", c);

}
catch
{

Console.WriteLine("C
alculation
complete");
}
4, void Calculate()
{

try
{
int a;
int b;
int c;

Console.WriteLine("E
nter num 1");
a =
Convert.ToInt32(Con
sole.ReadLine());

Console.WriteLine("E
nter num 2");
b =
Convert.ToInt32(Con
sole.ReadLine());
c = a % b;

}
catch
{

Console.WriteLine("R
esult is {0}", c);

Console.WriteLine("C
alculation
complete");
}
1
1, Flowchart 2, Programming logic 3, Dry run table 4, Decisional
construct
3
1, Dry run 2, Loop 3, Decisional
construct
4, Flowchart 2
1, start 2, return 3, if 4, switch 2
1, AND 2, OR 3, NOT 4, XOR 1
1, Logical operator 2, Dry run 3, Flowchart 4, Decisional
Construct
2
1, Statement A is true
and statement B is
false.
2, Statement A is
false and statement B
is true.
3, Both statement A
and statement B are
true.
4, Both statement A
and statement B are
false.
1
1, Use structured
programming
techniques
2, Use conditional
constructs
3, Use loop
constructs
4, Use Decision
Constructs
1
Logic building
1, By using the OR
operator between the
search terms
2, By using the AND
operator between the
search terms
3, By using the NOT
operator between the
search terms
4, By using
parentheses between
the search terms
2
1, Flowchart 2, Algorithm 3, Pseudocode 4, Program 4
1, begin --- end 2, If --- else---
endif
3, While---do 4, do---while 4
1, "Bat", 10, and
"Peter"
2, "Bat", Payment,
"Peter", and Marks
3, "Bat" and "Peter" 4, Payment, 10, and
Marks
1
1, Only Statement A
is true.
2, Only Statement B is
true.
3, Both, Statement A
and Statement B are
true.
4, Both, Statement A
and Statement B are
false.
1
1, != 2, < 3, = 4, > 1
1, OR 2, AND 3, NOT 4, NOR 1
1, Input 2, Output 3, Process 4, Storage 1
1, Annotation 2, On-page connector 3, Flow lines 4, Sub routines 1
1, The instruction,
"Get a number"
should be in the Input
box.
2, The instruction,
"Add 1 to the number"
should be in
annotation box.
3, The instruction,
"Display the number"
should be in the
Procedure box.
4, There is no error in
the flowchart.
1
1, int
This_variable_name_
is_very_long;
2, int #score; 3, int 9_strank; 4, int class; 1
1, 1 2, 2 3, 4 4, Variable length 2
1, X=6, Y=6 2, X=5, Y=5 3, X=6, Y=5 4, X=5, Y=6 3
1, Comparison
operators
2, Unary operators 3, Arithmetic
assignment operators
4, Logical operators 1

You might also like