You are on page 1of 98

1 Which of the following generations of computers used Integrated Circuit (IC)

with hundreds of transistors placed on a single silicon chip.


2 Which of the following computer systems can vary in size from a small desktop
model to the size of a small filing cabinet?
3 Which of the following options is NOT a benefit of computers?

4 Which of the following softwares is a type of system software?

5 Which of the following keys on the keyboard is used to erase the character to
the left of the cursor position?
6 You want to capture information from books and store it on your computer as
an image. Which of the following devices enables you to perform the required
task?
7 You want to buy a device that would allow you to record sound. Which of the
following devices would allow you to perform the required task?
8 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?
9 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?
10 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?

11 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?

12 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?
13 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.

14 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?

15 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?

16 Which of the following options provides a step-by-step evaluation of values in


the variables of the program?
17 Which of the following options means a sequence of instructions that are
repeated more than once?
18 Which of the following statements enables the control of an application to pass
back from a module to the main program?
19 Which of the following operators can be used to ensure that all specified
conditions are met to execute an operation?
20 Which of the following symbols is used to connect one step in the flowchart to
another step on a different page?
21 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?

22 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?
23 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?

24 You have to develop a program that declares a variable to store a number.


Which of the following options is the correct name that can be given to the
variable?
25 You have to develop a program to compare the string values stored in two
variables. Which of the following data types would you choose for the two
variables to accomplish the required task?
26 Click the Exhibit button to view the flowchart.
What would be the value of nsum if the input values for nNum1, nNum2, and
nNum3 are 5, 10, and -15 respectively?
27 Click the Exhibit button to view the flowchart.
Which of the following options is correct if the value of nTest1, nTest2, nTest3,
and nAverage is 80, 77, 83, and 80 respectively?
28 Which of the following productivity enhancing tools can be used to view the
contents of the clipboard in Office XP?
29 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?
30 Which of the following productivity enhancing tools of Office XP can be used as
an alternate method for accepting user input?
31 Where is the Ask a Question box feature of Office XP located in Microsoft
Word?
32 Which of the following features of Office XP lets you reuse an earlier created
table style in Office XP?
33 Which of the following tasks cannot be performed by using the shared
documents feature of Microsoft Word 2002?

34 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?
35 Which of the following task panes of PowerPoint can be used to determine the
type and size of bullet points in the presentation?
36 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?

37 Which of the following features of Microsoft Word can be used to send a letter
to a group of people with the same content?
38 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?
39 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?

40 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?
41 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?
42 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?

43 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?
44 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?

45 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?

46 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?
47 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?

48 Which of the following options means a tangible entity with a well-defined


behavior?
49 Which of the following computer languages is specially designed to work with
Microsoft's .NET platform?
50 Which of the following escape characters can be used to insert a backspace in
C#?
51 Which of the following components of the .NET Framework provides garbage
collection services?
52 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?
53 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?
54 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?
55 You are creating a class for your application. The class would contain methods
for storing car details. Which of the following options states the correct syntax
for creating the required class?
56 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?
57 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?
58 Which of the following options is a special type of method that is invoked when
a new instance of a class is created?
59 A delegate that has reference to only one method at a time is derived from the
_________ class.
60 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?

61 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?
62 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?
63 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?
64 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?
65 You have to create an application for a TV store. The application calculates the
discount amount that is provided when a customer buys a TV. The amount of
discount that is provided depends on the type and the screen size of the TV.
You create a flowchart for your program where B represents a Black and White
TV, and C represents a Color TV.
Click the Exhibit button to view the flowchart.
What would be the amount of discount provided if a customer buys a Color TV
with a 21 inch screen?

66 Click the Exhibit button to view the flowchart.


What would be the value of numresult if the value of coption is B, and the value
of num1 and num2 is 10 and 2 respectively?
67 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?

68 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?
69 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?
70 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();
}
}
}
71 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();
}
}
}
72 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.
73 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.
74 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?
75 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.
76 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.
77 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.

78 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);
}
}
79 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();
}
}

Analyze the preceding code and identify the correct output, if the value of var1
and var 2 is 50 and 70 respectively.
80 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.

81 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?
82 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();

}
}
}

83 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.
84 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?

85 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();
}
}

86 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();
}
}
}
87 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.

88 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?
89 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.

90 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?
91 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?
92 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?
93 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?
94 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?
95 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?
96 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
find file', when it is executed. This exception is handled by one of the catch
blocks in the code. Identify the lines of code that handle the exception.
97 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.

98 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.
99 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.
100 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();
}
}

101 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?
102 Which of the following types of touch screens send sound waves across the
computer screen to look for interruptions caused by touch?
103 Which of the following types of computer mouses allows to work from the
distance upto one and a half meters away from the computer?
104 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?
105 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?

106 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?
107 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?
108 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?
109 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?
110 Which of the following options is NOT a software component required to
connect a computer to the Internet?
111 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?

112 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?

113 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?

114 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?

115 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?

116 Set of instructions given to a computer to perform a particular job is called a


____________.
117 Which of the following operators is used to combine expressions containing
operators, such as < and >?
118 Which of the following keywords in pseudocode is an iterative construct with a
testing statement at the bottom of the iterative set of statements?
119 Which of the following operators is NOT an arithmetic operator?
120 Identify the constants from the following list:

"Bat"
Payment
10
"Peter"
Marks
121 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?

122 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?
123 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

124 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?

125 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?
126 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.

127 Which of the following examples is a valid declaration of a variable name in


C#?

128 How many bytes are occupied by the char data type in C# programming
language?
129 Consider X=5. Determine the values of X and Y after the execution of the
following expression:
Y=X++;
130 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?

131 Which of the following options is a built-in data type in C#?


132 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?
133 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?
134 Which of the following data types in C# is a reference type?
135 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?

136 You have to accept numeric values from the user in a C# program. Which of
the following code snippets can help you to achieve the required task?

137 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.

138 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?
139 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?
140 Determine the output of the following code snippet:
int var= 1;
for (; var <= 2; var++)
{
Console.WriteLine ("Value of variable is: {0}", var);
}
141 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?
142 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;

143 From the following steps of instructions, identify the correct sequence of steps
for the execution of a for loop.

144 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?
145 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();
}
}
}

146 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.
147 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.
148 You have written the following code by using the switch…case 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.

149 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.
150 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;
}
}
return true;
}
151 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.

152 ______________ involves extracting only the relevant information.


153 Which of the following elements of the method declaration is used to pass and
receive data from a method?
154 The method name is followed by ____________ even if the method call has no
parameters.
155 ___________ allows one interface to be used for multiple functions and
reduces the complexity within the functions of a class of a C# program.
156 Which of the following keywords restricts the users from inheriting the class in
C#?
157 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?

158 Which of the following types of operators cannot be overloaded?


159 Which of the following types of relationships exist between a handbag and a
zip?
160 Which of the following keywords can be used by derived classes to implement
a virtual method defined in the base class?
161 ___________ is used when you want a standard structure of methods to be
followed by the classes, where classes will implement the functionality.
162 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?
163 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.

164 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?
165 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?

166 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.

167 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?
168 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?
169 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?

170 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;
}
}

171 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?
172 A __________ is a refernce type variable and is a general-purpose mechanism
for indirectly calling methods at run time.
173 _____________ hold the reference of more than one method and execute all
the methods it wraps in the calling order.
174 __________ is an object that contains the definition of the event and the
delegate.
175 Which of the following options is NOT true about constructors?

176 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?

177 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?
178 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?

179 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?
180 Which of the following tasks is NOT performed by the publisher object while
defining a delegate for an event?

181 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?
182 Which of the following statements is NOT true about delegates?
183 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?

184 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.

185 _____________ class is used to read characters from a byte stream.


186 A _____________ occurs when an application compiles and runs properly but
does not produce the expected results.
187 The ______________ contains constants for controlling the kind of access that
the FileStream constructors can have on a file.
188 Which of the following definitions correctly describes the peek method of the
StreamReader class?

189 Which of the following definitions correctly defines the Flush method of
StreamWriter class?

190 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();
}
}
}
191 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.

192 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.
193 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?
194 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?
195 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
seconds\n");
Typometer obj = new Typometer();

Thread t = new Thread(new ThreadStart(obj.StartGame));


196 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);
Thread1.Start();
Thread2.Start();
Console.Read();
}
197 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()
{
ThreadStart Child1 = new ThreadStart(ChildThread1);
ThreadStart Child2 = new ThreadStart(ChildThread2);
Thread Thread1 = new Thread(Child1);
198 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");
}
public static void Main()
{
ThreadStart Child1 = new ThreadStart(ChildThread1);
199 Sim hasThreadStart Child2
been assigned the=task
newofThreadStart(ChildThread2);
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?
200 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 complete‘
irrespective of any exception. Which of the following code snippets will help Jim
to perform the required task?
1, First generation 2, Second generation 3, Third generation 4, Fourth generation 3

1, Microcomputer 2, Minicomputer 3, Mainframe 4, Supercomputer 2


computer
1, Computers work at 2, Computers rarely 3, Computers are less 4, Computers do not 3
a very high speed. make mistakes. flexible than humans. get bored by
repetitive work.
1, Word processor 2, Database 3, Operating system 4, Spreadsheet 3
management system package

1, Delete 2, Shift 3, Insert 4, Backspace 4

1, Keyboard 2, Mouse 3, Scanner 4, Printer 3

1, Speaker 2, Microphone 3, Plotter 4, Joystick 2

1, Processor 2, Hard drive 3, Motherboard 4, Joystick 3

1, Hard disk 2, Floppy disk 3, Compact disk 4, Random access 1


memory

1, Text file 2, Data file 3, Graphic file 4, Audio file 2

1, By selecting the 2, By selecting the 3, By selecting the 4, By selecting the 4


Icon option from the Thumbnails option List option from the Details option from
View menu from the View menu View menu the View menu

1, Up 2, Forward 3, View 4, Back 4


1, 1. Click the MyFile 2, 1. Click the MyFile 3, 1. Click on the 4, 1. Click the Copy 2
file in Windows file in Windows Copy this file button.
Explorer. Explorer. hyperlink under File 2. Click the MyFile file
2. Click on the Copy 2. Click on the Copy and Folder Tasks in in Windows Explorer.
this file hyperlink this file hyperlink the left pane of the 3. Click on the Copy
under File and Folder under File and Folder window. this file hyperlink
Tasks in the left pane Tasks in the left pane 2. Click the MyFile file under File and Folder
of the window. of the window. in Windows Explorer. Tasks in the left pane
3. Click the Copy 3. Select the Projects 3. Select the Projects of the window.
button. folder from the list in folder from the list in 4. Select the Projects
4. Select the Projects the Copy Items dialog the Copy Items dialog folder from the list in
folder from the list in box. box. the Copy Items dialog
the Copy Items dialog 4. Click the Copy 4. Click the Copy box.
box. button. button.

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

1, 1. Select the Find 2, 1. Click the Edit 3, 1. Select the Find 4, 1. Click the Edit 2
option menu option menu.
2. Click the Edit menu 2. Select the Find 2. Enter the required 2. Enter the required
3. Enter the required option word in the Find what word in the Find what
word in the Find what 3. Enter the required text box in the Find text box in the Find
text box in the Find word in the Find what dialog box. dialog box.
dialog box. text box in the Find 3. Click the Edit menu 3. Select the Find
4. Click the Find Next dialog box. 4. Click the Find Next option
button to find the 4. Click the Find Next button to find the 4. Click the Find Next
required word. button to find the required word. button to find the
required word. required word.

1, Flowchart 2, Programming logic 3, Dry run table 4, Decisional 3


construct
1, Dry run 2, Loop 3, Decisional 4, Flowchart 2
construct
1, start 2, return 3, if 4, switch 2

1, AND 2, OR 3, NOT 4, XOR 1

1, Off page connector 2, On page connector 3, Flow lines 4, Annotation 1

1, Logical operator 2, Dry run 3, Flowchart 4, Decisional 2


Construct

1, Statement A is true 2, Statement A is false 3, Both statement A 4, Both statement A 1


and statement B is and statement B is and statement B are and statement B are
false. true. true. false.

1, Use structured 2, Use conditional 3, Use loop constructs 4, Use Decision 1


programming constructs Constructs
techniques
1, my_Number 2, my Number 3, my&Number 4, @my:Number 1

1, int 2, char 3, long 4, float 2

1, 0 2, 10 3, 30 4, 40 1

1, nTotSelect is 2, nTotSelect is 3, nTotReject is 4, nTotReject is 1


incremented by 1. decremented by 1. incremented by 1. decremented by 1.

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 4, Table AutoFormat 4


Formatting
1, Merge multiple 2, Display the format 3, Translate 4, E-mail a document 4
copies of a document of the document document text to to a group of people
another language
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 2


Box

1, Drawing Canvas 2, Show\Hide 3, Watermarks 4, Shared Documents 3


Whitespace

1, Clear Formatting 2, Styles and 3, Reveal Formatting 4, List Styles 3


Formatting

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 2, 1. Place the 3, 1. Point to the blue 4, 1. Place the 1


insertion point on the insertion point on the colored button insertion point on the
changed text. changed text. underneath the text changed text.
2. Point to the blue 2. Click the for displaying the 2. Point to the blue
colored button AutoCorrect options AutoCorrect options colored button
underneath the text button. smart tag. underneath the text
for displaying the 3. Point to the blue 2. Place the insertion for displaying the
AutoCorrect options colored button point on the changed AutoCorrect options
smart tag. underneath the text text. smart tag.
3. Click the for displaying the 3. Click the 3. Select Change
AutoCorrect options AutoCorrect options AutoCorrect options back to "acme"
button. smart tag. button. command from the
4. Select Change 4. Select Change 4. Select Change AutoCorrect Options
back to "acme" back to "acme" back to "acme" Actions menu.
command from the command from the command from the 4. Click the
AutoCorrect Options AutoCorrect Options AutoCorrect Options AutoCorrect options
Actions menu. Actions menu. Actions menu. button.
1, 1. Click the Table 2, 1. Place the mouse 3, 1. Place the mouse 4, 1. Place the mouse 2
AutoFormat icon on pointer inside the pointer inside the pointer inside the
the Tables and table. table. table.
Borders toolbar. 2. Click the Table 2. Select a table style 2. Select a table style
2. Place the mouse AutoFormat icon on from the Table styles from the Table styles
pointer inside the the Tables and list box in the Table list box in the Table
table. Borders toolbar. AutoFormat dialog AutoFormat dialog
3. Select a table style 3. Select a table style box. box.
from the Table styles from the Table styles 3. Click the Table 3. Click the Apply
list box in the Table list box in the Table AutoFormat icon on button.
AutoFormat dialog AutoFormat dialog the Tables and 4. Click the Table
box. box. Borders toolbar. AutoFormat icon on
4. Click the Apply 4. Click the Apply 4. Click the Apply the Tables and
button. button. button. Borders toolbar.

1, 1. Select the 2, 1. Select the 3, 1. Select the 4, 1. Select the 3


Picture watermark Picture watermark Printed Watermark Printed Watermark
option in the Printed option in the Printed command from the command from the
Watermark dialog Watermark dialog box. Format menu. Format menu.
box. 2. Click the Select 2. Select the Picture 2. Select the Picture
2. Select the Printed Picture button. watermark option in watermark option in
Watermark command 3. Select the Printed the Printed the Printed
from the Format Watermark command Watermark dialog Watermark dialog
menu. from the Format box. box.
3. Click the Select menu. 3. Click the Select 3. Select the required
Picture button. 4. Select the required Picture button. image in the Insert
4. Select the required image in the Insert 4. Select the required Picture dialog box
image in the Insert Picture dialog box and image in the Insert and click the Insert
Picture dialog box click the Insert button. Picture dialog box and button.
and click the Insert click the Insert button. 4. Click the Select
button. Picture button.

1, 1. Select the New 2, 1. Click the Create 3,1. Select the New 4, 1. Select the New 3
Photo Album button. Photo Album Photo Album
command from the 2. Select the New command from the command from the
Insert menu. Photo Album Insert menu. Insert menu.
2. Click the command from the 2. Click the File/Disk 2. Click the Create
Scanner/Camera Insert menu. button. button.
button. 3. Click the 3. Select the pictures 3. Click the File/Disk
3. Select the pictures Scanner/Camera that need to be button.
that need to be button. inserted and click the 4. Select the pictures
inserted and click the 4. Select the pictures Insert button. that need to be
Insert button. that need to be 4. Click the Create inserted and click the
4. Click the Create inserted and click the button. Insert button.
button. Insert button.
1, 1. Select the Sum 2, 1. Click in a cell, 3, 1. Click in a cell, 4, 1. Select the Sum 2
command. and then click the and then click the command.
2. Click in a cell, and down arrow of the down arrow of the 2. Select the range of
then click the down AutoSum button in the AutoSum button in the cells that need to be
arrow of the AutoSum standard toolbar. standard toolbar. added.
button in the standard 2. Select the Sum 2. Select the Sum 3. Click in a cell, and
toolbar. command. command. then click the down
3. Select the range of 3. Select the range of 3. Press the Enter arrow of the AutoSum
cells that need to be cells that need to be button. button in the standard
added. added. 4. Select the range of toolbar.
4. Press the Enter 4. Press the Enter cells that need to be 4. Press the Enter
button. button. added. button.

1, Method 2, Object 3, Class 4, Data 2

1, C# 2,Visual Basic 6.0 3, C++ 4, C 1

1, \a 2, \b 3, \\ 4, \0 2

1, Common 2, Base Class 3, Web Form and 4, Console 1


Language Runtime Libraries Web Services Applications
1, Windows Control 2, Device Application 3, Console 4, Class Library 4
Library Application

1, Realistic Modeling 2, Reusability 3, Resilience to 4, Existence as 2


Change Different Forms

1, Design 2, Blueprint 3, Analysis 4, Implementation 3

1, class my car 2, class my_car 3, class 8my_car 4, class my\car 2


{ { { {
} } } }
1, Statement A is true 2, Statement A is false 3, Both statement A 4, Both statement A 1
and statement B is and statement B is and statement B are and statement B are
false. true. true. false.

1, Output 2, Class view 3, Solution Explorer 4, Code Editor 3

1, Finalize 2, Dispose 3, Constructor 4, Destructor 3

1, System.Console 2, System.Delegate 3, 4, System.Attribute 2


System.MulticastDele
gate
1, 1. Type 2, 1. Type 3, 1. Type 4, 1. Type 2
http://www.google.co.i http://www.google.co.i http://www.google.co.i http://www.google.co.i
n in the Address Bar n in the Address Bar n in the Address Bar n in the Address Bar
of the Web browser. of the Web browser. of the Web browser. of the Web browser.
2. Type the specific 2. Click the Images 2. Click the Images 2. Type the specific
search keyword in the hyperlink on the hyperlink on the search keyword in the
Search text box. Google website home Google website home Search text box.
3. Click the Images page. page. 3. Click the Search
hyperlink on the 3. Type the specific 3. Click the Search Images button to
Google website home search keyword in the Images button to display the result.
page. Search text box. display the result. 4. Click the Images
4. Click the Search 4. Click the Search 4. Type the specific hyperlink on the
Images button to Images button to search keyword in the Google website home
display the result. display the result. Search text box. page.

1, By using a flatbed 2, By using a thermal 3, By using a flatbed 4, By using a light 1


plotter printer scanner pen

1, By installing a EGA 2, By installing a VGA 3, By installing a CGA 4, By installing a 4


graphics adaptor graphics adaptor graphics adaptor SVGA graphics
adaptor

1, By using the OR 2, By using the AND 3, By using the NOT 4, By using 2


operator between the operator between the operator between the parentheses between
search terms search terms search terms the search terms

1, By using a floppy 2, By using a compact 3, By using a hard 4, By using a 4


disk disk disk Magneto-Optical disk

1, 8% 2, 10% 3, 5% 4, 14% 2

1, 0 2, 5 3, 2 4, 4 1
1, The code would 2, Beep Beep! 3, The code would not 4, BEEP BEEP! 4
give a runtime error compile

1, public class 2, public class 3, public class 4, public class 3


CountIsZeroExceptio CountIsZeroException CountIsZeroException CountIsZeroExceptio
n:Exceptions :Exceptions : ApplicationException n:InvalidProgramExce
{ { { ption
public public {
Console.WriteLine("E CountIsZeroException CountIsZeroException
rror"); (string message): (string message): Console.WriteLine("E
} base(message) base(message) rror");
{ {
} } }
} }
1, 0 2, 10 3, 8 4, 9 2
1, calc = -calc; 2, calc(-c) 3, Calculator(-c); 4, calc = calc; 1
1, 2 2, 1 3, 2 4, 2 1
1 2 1 2
3 3 2 3
3 3 2 3
1, Operator 2, Virtual functions 3, Function 4, Abstract classes 3
overloading overloading
1, Derived obj = new 2, class Derived : B1 3, obj.Function1(); 4, void Function1(); 4
Derived();
1, The access 2, The FoodHabits 3, The FoodHabits() 4, The FoodHabits() 4
specifier of the method has not been method is method has been
FoodHabits() method overridden in the implemented in the implemented in the
is not declared as derived classes by Carnivorous class. Animal class.
protected in the using the overrides
Carnivorous class. keyword.
1, The Engine() 2, The Engine() 3, The access 4, The access 2
method is not method is not specifier of the specifier of the
declared virtual in the declared virtual in the Engine() method is Engine() method is
Truck class. Car class. not declared as not declared as
protected in the Car protected in the Truck
class. class.
1, disp obj=new 2, obj.abcd(); 3, class disp : 4, Console.Read(); 3
disp(); myClass
1, The 2, The 3, The access 4, The class 1
UpdateCustStatus() UpdateCustStatus() specifier of the ItemsDetails is calling
and TakeOrder() and TakeOrder() interface is not the interface methods
methods are methods are declared as protected. without passing any
implemented in the implemented in the parameters to the
interface. ItemDetails class. methods.

1, Value of number1 2, Value of number1 is 3, No output, there 4, Value of number 1 3


is 10, Value of 3, Value of number 2 would be a compile- is 0, Value of number
number2 is 3. is 10. time error. 2 is 0.
1, Compile-time error 2, The total is : 50 3, The total is: 120 4, The total is: 20 3
1, Calculator() 2, ~Calculator() 3, !Calculator() 4, ~Calculator() 2
{ { { {

Console.WriteLine("P Console.WriteLine("Pr Console.WriteLine("Pr System.WriteLine("Pr


rogram Terminating"); ogram Terminating"); ogram Terminating"); ogram Terminating");
Console.Read(); Console.Read(); Console.Read(); Console.Read();
} } } }

1, By using a 2, By using a 3, By using the 4, By using the 4


constructor destructor Finalize() method Dispose() method
1, Main() Begins 2, Constructor 3, Main() Begins 4, Main() Begins 1
Constructor Invoked Invoked Constructor Invoked Constructor Invoked
Inner Block Begins Main() Begins Constructor Invoked Constructor Invoked
Constructor Invoked Inner Block Begins Inner Block Begins Inner Block Begins
Inner Block Ends Constructor Invoked Inner Block Ends Inner Block Ends
Main() ends Inner Block Ends Main() ends Destructor Invoked
Destructor Invoked Main() ends Destructor Invoked Destructor Invoked
Destructor Invoked Destructor Invoked Destructor Invoked Main() ends
Destructor Invoked

1, Opens the file 2, Opens the file 3, Opens the file 4, Deletes the 3
Myfile.txt and the Myfile.txt and MyFile.txt and places existing file Myfile.txt
places the cursor at truncates the file, so the cursor at the end and creates a new file
the beginning of the that its size is zero of the file. with the same name.
file. bytes.
1,string 2, string 3, string 4, string 4
str=Console.ReadLin str=Console.ReadLine str=Console.ReadLine str=Console.ReadLin
e(); (); (); e();
StringWriter sr FileStream sr StreamReader StringReader
= new = new FileStream(str); sr = new sr = new
StringWriter(str); StringReader(str); StringReader(str);
Console.WriteLine(sr.
Console.WriteLine(sr. ReadLine()); Console.WriteLine(sr. Console.WriteLine(sr.
ReadLine()); ReadLine()); ReadLine());
Console.Read();
Console.Read(); Console.Read(); Console.Read();

1, 1. Opens the file 2, 1. Opens the file 3, 1. Opens the file 4, 1. Opens the file 1
Myfile.txt, and Myfile.txt, and Myfile.txt, and Myfile.txt, and
prepares the stream prepares the stream prepares the stream prepares the stream
for a read operation. for a read operation. for a read operation. for a read operation.
2. Positions the file 2. Positions the file 2. Positions the file 2. Positions the file
pointer at the pointer at the end of pointer at the current pointer at the
beginning of the the stream. position within the beginning of the
stream. 3. Reads a line of stream. stream.
3. Reads a line of characters from the 3. Reads data types 3. Converts
characters from the current stream and from a binary stream. characters into binary
current stream and returns data as a data types and reads
returns data as a string. the data types from
string. the binary stream.

1, The code would list 2, The code would 3, The code would list 4, The code would list 3
the name and size of result in an error. the name and size of the name and the
all the sub folders all the files under the total size of the
under the c:\Windows c:\Windows folder. c:\Windows folder.
folder.
1, StreamReader sr = 2, 3, FileStream fs = 4, sr.Close(); 2
new sr.BaseStream.Seek( new
StreamReader(fs); 0, SeekOrigin.End); FileStream("Myfile.txt"
,
FileMode.Open,FileAc
cess.Read);

1, String filePath; 2, String filePath; 3, String filePath; 4, String filePath; 1


Console.WriteLine("E Console.WriteLine("E Console.WriteLine("E Console.WriteLine("E
nter Folder Path"); nter Folder Path"); nter Folder Path"); nter Folder Path");
filePath=Console.Rea filePath=Console.Rea filePath=Console.Rea filePath=Console.Rea
dLine(); dLine(); dLine(); dLine();
DirectoryInfo DirectoryInfo DirectoryInfo FileInfo[]
MydirInfo = new MydirInfo = new MydirInfo = new MydirInfo = new
DirectoryInfo(@filePat FileInfo(@filePath); DirectoryInfo(@filePat DirectoryInfo[]
h); h); (@filePath);
Console.WriteLine("Fu
Console.WriteLine("F ll Name of the Console.WriteLine("F Console.WriteLine("F
ull Name of the directory is : {0}", ull Name of the ull Name of the
directory is : {0}", directory is : {0}", directory is : {0}",
MydirInfo.FullName);
MydirInfo.FullName); MydirInfo.Name); MydirInfo.Name);
Console.WriteLine("Th
Console.WriteLine("T e directory was last Console.WriteLine("T Console.WriteLine("T
he directory was last accessed on : {0}", he directory was last he directory was last
accessed on : {0}", accessed on : {0}", accessed on : {0}",
MydirInfo.LastAccess
MydirInfo.LastAccess Time.ToString()); MydirInfo.LastAccess MydirInfo.LastAccess
Time.ToString()); Console.Read(); Time.ToString()); Time.ToString());
Console.Read(); Console.Read(); Console.Read();
1, The finally block is 2, The class is not 3, The type of 4, The catch block is 3
not implemented after derived from the exception that is not nested within the
the catch block. ApplicationException handled in the catch try block.
class. block is not correct.

1, 2, System.AppDomain 3, System.Attribute 4, 2
System.AsyncCallbac System.AttributeTarg
k ets

1, delegates 2, threading 3, positional 4, named parameters 3


parameters

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 2, public void 3, public void 4, public void 3


WriteData() WriteData() WriteData() WriteData()
{ { { {
FileStream fs FileStream fs FileStream fs FileStream fs
= new = new = new = new
FileStream("Myfile.txt FileStream("Myfile.txt" FileStream("Myfile.txt" FileStream("Myfile.txt
",FileMode.Open, ,FileMode.Append, ,FileMode.Append, ",FileMode.Append,
FileAccess.Read); FileAccess.Write); FileAccess.Write); FileAccess.Write);
StreamWriter StreamWriter StreamWriter StreamWriter
w = new w = new w = new w = new
StreamWriter(fs); StreamWriter(); StreamWriter(fs); StreamWriter(fs);

Console.WriteLine("E Console.WriteLine("E Console.WriteLine("E Console.WriteLine("E


nter a string"); nter a string"); nter a string"); nter a string");
string str = string str = string str = string str =
Console.ReadLine(); Console.ReadLine(); Console.ReadLine(); Console.ReadLine();
w.Write(); w.Write(str); w.Write(str); w.Write();
w.Flush(); w.Close(); w.Flush(); w.Close();
w.Close(); fs.Close(); w.Close(); fs.Close();
fs.Close(); } fs.Close(); }
} }
1, catch 2, catch 3, catch (IOException 4, catch 3
(NullReferenceExcept (InvalidCastException e) (ArgumentNullExcepti
ion e1) e2) { on e3)
{ { {
Console.WriteLine(e.
Console.WriteLine(e1 Console.WriteLine(e2. Message); Console.WriteLine(e3
.Message); Message); .Message);
} } Console.Read(); }
}
1, void binWriter() 2, void binWriter() 3, void binWriter() 4, void binWriter() 3
{ { { {
FileStream fs FileStream fs FileStream fs FileStream fs
= new = new = new = new
FileStream("binfile.DA FileStream("binfile.DA FileStream("binfile.DA FileStream("binfile.DA
T", T", FileMode.Open); T", T", FileMode.Open);
FileMode.CreateNew) int i = 10; FileMode.CreateNew) int i = 10;
; double d = ; double d =
int i = 10; 1023.56; int i = 10; 1023.56;
double d = BinaryWriter = double d = BinaryWriter
1023.56; new BinaryWriter(fs); 1023.56; dataout;
BinaryWriter BinaryWriter dataout = new
dataout; dataout; BinaryWriter(fs);
dataout = dataout.Write(i); dataout = new
BinaryWriter(fs); BinaryWriter(fs);
dataout.Write(d); dataout.Write(i);

dataout.Write(i); dataout.Close(); dataout.Write(i); dataout.Write(d);


}
dataout.Write(d); dataout.Write(d); dataout.Close();
}
dataout.Close(); dataout.Close();
} }

1, void myMethod() 2, void myMethod() 3, void myMethod() 4, void myMethod() 2


{ { { {
try try try try
{ { { {
................ ................ ................ ................
} } }
catch catch(IndexOutOfRan catch(e) catch(IndexOutOfRan
{ geException e) { geException e)
Console.WriteLine(Ex { Console.WriteLine(e. {
ception.message); Console.WriteLine(e. message);
} message); } Console.WriteLine(e.
} } } message);
} }
}
}
1, String str = "Hello"; 2, StreamWriter sr = 3, String 4, FileStream fs = 1
new StreamWriter(fs); str=Console.ReadLine new
(); FileStream("orders.txt
", FileMode.Append,
FileAccess.Write,
FileShare.None);
1, Writing 1023.56 2, Writing True 3, Writing 1023.56 4, Writing 1023.56 1
Writing True Writing 1023.56 Writing 90.28 Writing True
Writing 90.28 Writing 90.28 Writing 12.2 * 7.4
Reading True Reading 1023.56
Reading 1023.56 Reading 1023.56 Reading 90.28 Reading 1023.56
Reading True Reading 90.28 Reading True
Reading 90.28 Reading 12.2 * 7.4

1, Scanner 2, Touch screen 3, Plotter 4, Printer 1

1, Resistive touch 2, Infrared touch 3, Surface Acoustic 4, Capacitive touch 3


screens screens touch screens screens
1, Light Pen mouse 2, Joystick mouse 3, Trackball mouse 4, Wireless mouse 4

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 3, Parallel port PS / 2 4, Enhanced Parallel 1
Port (ECP) (bidirectional) Port (EPP)

1, Nesting 2, Wildcards (*) 3, Or 4, Quotation marks (" 4


(parentheses ()) ")

1, History button in 2, History button in the 3, Favorites button in 4, Favorites button in 3


the Location bar Toolbar the Toolbar the Location bar

1, Operating System 2, TCP/IP - protocol 3, Web browser 4, Modem 4

1, Industry Standard 2, Extended ISA Bus 3, Video Electronics 4, Peripheral 4


architecture Bus Standards Component
Association Local Bus Interconnect Bus

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, Flowchart 2, Algorithm 3, Pseudocode 4, Program 4

1, Logical operators 2, Arithmetic 3, Relational 4, Unary operators 1


operators operators
1, begin --- end 2, If --- else--- 3, While---do 4, do---while 4
endif
1, / 2, % 3, = 4, * 3
1, "Bat", 10, and 2, "Bat", Payment, 3, "Bat" and "Peter" 4, Payment, 10, and 1
"Peter" "Peter", and Marks Marks
1, Only Statement A 2, Only Statement B is 3, Both, Statement A 4, Both, Statement A 1
is true. true. and Statement B are and Statement B are
true. false.

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, 2, The instruction, 3, The instruction, 4, There is no error in 1


"Get a number" "Add 1 to the number" "Display the number" the flowchart.
should be in the Input should be in should be in the
box. annotation box. Procedure box.

1, int 2, int #score; 3, int 9_strank; 4, int class; 1


This_variable_name_i
s_very_long;
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 2, Unary operators 3, Arithmetic 4, Logical operators 1


operators assignment operators

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) 2, if (var>0) 3, if (var>0) 4, if var>0 2
then:
Console.WriteLine(‘ console.WriteLine(‘T Console.WriteLine(‘
Console.WriteLine(‘ This is a positive his is a positive This is a positive
This is a positive number‘); number‘); number‘);
number‘);

1, int Number = 2, int Number = 3, int Number = 4, int Number = 4


convert.ToInt32(Cons Convert.toint32(consol Convert.Toint32(Cons Convert.ToInt32(Con
ole.ReadLine()); e.ReadLine()); ole.ReadLine()); sole.ReadLine());
1, using System; 2, public void 3, class ExecuteClass 4, public static void 4
AcceptDetails() Main (string [] args)

1, Result = (!( x == 2, Result = (x^10); 3, Result = 4, Result = ( x == 10); 1


10)); x.equals(10);

1, The while loop 2, The for loop 3, The do…while loop 4, The foreach loop 3

1, Value of variable 2, Value of variable is: 3, The compiler will 4, Value of variable 2
is: 0 1 generate a syntax is: 0
Value of variable is: 1 Value of variable is: 2 error. Value of variable is: 1
Value of variable is: 2
1, By using param 2, By using foreach 3, By using IndexOf 4, By using Rank 1
arrays statement method property

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 2, 1. Initialization of a 3, 1. Initialization of a 4, 1. Evaluate 1


variable. variable. variable. condition.
2. Evaluate condition. 2. Evaluate condition. 2. 2. Initialization of a
3. If true then execute 3. Increment/Decrement variable.
the body of the for Increment/Decrement the counter. 3.
loop. the counter. 3. Evaluate condition. Increment/Decrement
4. 4. If true then execute 4. If true then execute the counter.
Increment/Decrement the body of the for the body of the for 4. If true then execute
the counter. loop. loop. the body of the for
5. If false then exit 5. If false then exit the 5. If false then exit the loop.
the for loop. for loop. for loop. 5. If false then exit
the for loop.

1, struct Bill_Details 2, public enum 3, enum Bill_Details 4, public structure 1


{ Bill_Details() { Bill_Details
public string { public string inv_No; {
inv_No; string inv_No; public string ord_Dt; public string
public string string ord_Dt; public string inv_No;
ord_Dt; string custName; custName; public string
public string string product; public string product; ord_Dt;
custName; double cost; public double cost; public string
public string double advance_Amt; public double custName;
product; double due_Amt; advance_Amt; public string
public double } public double product;
cost; due_Amt; public double
public double }; cost;
advance_Amt; public double
public double advance_Amt;
due_Amt; public double
} due_Amt;
};
1, Sat = 0 2, Sat = Sat 3, Sat = 1 4, The program will 1
Fri = 6 Fri = Fri Fri = 7 generate a compile-
time error.

1, for (int row=0; row 2, for (int row=0; row 3, for (int row=0; row 4, for (int row=0; row 1
< 2; row++) <col; row++) < 2; row++) < 2; row++)
{ { { {
rowSum = rowSum = rowSum = rowSum =
0; 0; 0; 0;
for (int for (int for (int for (int
col=0; col < 4; col++) col=0; col < 4; col++) col=0; col < 3; col++) col=0; col < row; col+
{ { { +)
{
Console.Write("{0}\t", Console.Write("{0}\t", Console.Write("{0}\t",
mArray[row,col]); mArray[row,col]); mArray[row,col]); Console.Write("{0}\t",
mArray[row,col]);
rowSum=rowSum+m rowSum=rowSum+mA rowSum=rowSum+m
Array[row, col]; rray[row, col]; Array[row, col]; rowSum=rowSum+m
Array[row, col];
} } }
sum = sum sum = sum sum = sum }
+ rowSum; + rowSum; + rowSum; sum = sum
+ rowSum;
Console.Write(" = Console.Write(" = {0}", Console.Write(" = {0}",
{0}", rowSum); rowSum); rowSum); Console.Write(" =
{0}", rowSum);
Console.WriteLine(); Console.WriteLine(); Console.WriteLine();
Console.WriteLine();
} } }
}
Console.WriteLine("T Console.WriteLine("Th Console.WriteLine("T
he sum of the array e sum of the array is: he sum of the array is: Console.WriteLine("T
is:{0}", sum); {0}", sum); {0}", sum); he sum of the array
is:{0}", sum);
1, if ((Year % 4 == 2, Year = 3, 4, static void 1
0) ; (Year / 100 != 0 || Convert.ToInt32(Cons Console.WriteLine("E Main(string[] args)
Year % 400 == 0)) ole.ReadLine()); nter the year: ");
1, int var; 2, case 100: 3, default: 4, switch(&&var) 4
var = 500;
Console.WriteLine("C Console.WriteLine("In
entury"); valid value");
break; break;

1, number = 2, for (SumNum = 3, 4, if (number <= 0) 1


(Console.ReadLine()) number = incr = 0; incr Console.WriteLine("T continue;
; < 5; incr += 1) he sum of positive SumNum =
numbers entered is SumNum + number;
{0}", SumNum);
1, Str = 2, private static bool 3, if 4, lastChar = 3
Console.ReadLine().T CheckPalindrome(cha (myString[startChar] = myString.Length - 1;
oCharArray(); r[] myString) myString[lastChar])
1, number2 += 2, num1 = number2- 3, 4, 2
number1; number1; Console.WriteLine("{0 number1=number2=1
}", number1); ;

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 4, Delegates 1
destructors
1, sealed 2, virtual 3, namespace 4, abstract 1

1, The public access 2, The private access 3, The protected 4, The internal access 1
specifier specifier access specifier specifier

1, +=, -=, *= 2, *, /, % 3, +, - 4, ! , ~, ++ 1
1, Instantiation 2, Utilization 3, Inheritance 4, Composition 4
relationship relationship relationship relationship
1, virtual 2, override 3, void 4, abstract 2

1, Interface 2, Static function 3, Function 4, Polymorphism 1


overloading
1, The public access 2, The private access 3, The protected 4, The internal access 3
specifier specifier access specifier specifier
1, calc c = new calc(); 2, calc c = new calc(); 3, calc c = new 4, int Result = 2
calc.AddNumber(10, int calc(AddNumber(10,2 AddNumber(10,20);
20); Result=c.AddNumber( 0));
10, 20);

1, Const 2, out 3, static 4, in 3

1, <access specifier> 2, className <access 3, <access specifier> 4, <access specifier> 1


className operator specifier> operator className + className +
+(parameters) +parameters (parameters) operator operator parameters
{ { { {
// Code // Code // Code // Code
} } } }

1, public interface 2, public void interface 3, public interface 4, public static 1


IOrderDetails IOrderDetails IOrderDetails interface
{ { { IOrderDetails
void {
UpdateCustStatus(); UpdateCustStatus(); UpdateCustStatus(); void
void TakeOrder(); TakeOrder(); TakeOrder(); UpdateCustStatus();
} } } void TakeOrder();
}

1, Inheritance 2, Abstraction 3, Polymorphism 4, Encapsulation 4

1, Encapsulation 2, Function 3, Inheritance 4, Virtual functions 2


overloading
1, Statement A is 2, Statement A is 3, Both, Statement A 4, Both, Statement A 2
true, and Statement B false, and Statement and Statement B are and Statement B are
is false. B is true. true. false.

1, Constructor of 2, Constructor of Base 3, Constructor of 4, Constructor of 1


Base Constructor of Derived Base Derived
Constructor of Destructor of Base Destructor of Base Destructor of Derived
Derived Destructor of Derived Constructor of Constructor of Base
Destructor of Derived Derived Destructor of Base
Destructor of Base Destructor of Derived

1, Use multithreading 2, Use virtual 3, Use static 4, Use abstract 4


functions polymorphism methods

1, Constructor 2, Static function 3, Virtual function 4, Delegate 4


1, Single-cast 2, Static functions 3, Events 4, Multicast delegates 4
delegates
1, Publisher 2, Subscriber 3, Monitor 4, Sender 1

1, Constructors do 2, Static constructors 3, If there are no 4, An instance 2


not return values. are used to initialize constructors defined constructor is called
the non-static for a class, the whenever an instance
variables of a class. compiler creates a of a class is created.
default constructor.
1, Implementation of 2, Implementation of 3, Implementation of 4, Implementation of 1
the static constructor the instance the static function the virtual function
constructor

1, Abstract classes 2, Operator 3, Function 4, Constructor with 4


overloading overloading parameters

1, Statement A is true 2, Statement A is false 3, Both, Statement A 4, Both, Statement A 4


and Statement B is and Statement B is and Statement B are and Statement B are
false. true. true. false.

1, Attributes 2, Reflection 3, Delegates 4, Events 3

1, Declare an event 2, Declare a delegate 3, Declare an event 4, Fire the event 1


based on the delegate

1, public delegate 2, public delegate void 3, public delegate int 4, public delegate int 2
void MyDelegate MyDelegate (int i); MyDelegate (int i); MyDelegate ();
(string s);

1, A multicast 2, A multicast 3, A single-cast 4, A single-cast 4


delegate contains an delegate derives from delegate contains delegate derives from
invocation list of the reference to only one the
multiple methods. System.MulticastDele method at a time. System.SinglecastDel
gate class. egate class.
1, Publisher 2, Subscriber 3, Monitor 4, Sender 1

1, Student PD = new 2, Student PD = 3, Student PD = new 4, Student = new 1


Student(); Student(); Student(); Student();
RingALarm = new RingALarm = RingALarm = new RingALarm = new
TimeToRise(PD.Wak TimeToRise(PD.Wake TimeToRise(WakeUp) TimeToRise(WakeUp
eUp); Up); ; );

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 2, FileAcess 3, FileInfo class 4, StreamWriter class 1


Enumerator Enumerator
1, It returns the next 2, It allows the 3, It reads a line of 4, It releases any 1
available character read/write position to characters from the system resources
but does not be moved to any current stream and associated with the
consume it. position within the file. returns data as a reader.
string.
1, It closes the 2, It clears all buffers 3, It writes data 4, It writes to the 2
underlying stream. for the current writer specified by the stream.
and causes any overload parameters,
buffered data to be followed by end of
written to the line.
underlying stream.

1, It will generate the 2, It will generate the 3, It will generate the 4, It will generate the 3
following output: following output: following compile time following output:
The current thread The current thread error: The current thread
after name change: after name change: The name 'Thread' after name change:
MainThread Th.Name does not exist in the {0}, MainThread
current context.
1, Thread 2, ThreadStart 3, ChildThread.Start(); 4, 4
ChildThread = new ChildRef = new ChildThread.Sleep(Sl
Thread(ChildRef); ThreadStart(ChildThre eepTime);
adCall);

1, public static void 2, public static void 3, public static void 4, public static void 1
Main(string[] args) Main(string[] args) Main(string[] args) Main(string[] args)
{ { { {
ThreadStart ThreadStart ThreadStart ThreadStart
ChildRef = new ChildRef = new ChildRef = new ChildRef = new
ThreadStart(BookDet ThreadStart(BookDeta ThreadStart(); ThreadStart();
ails); ils()); Thread Thread
Thread Thread ChildThread = new ChildThread = new
ChildThread = new ChildThread = new Thread(ChildRef); Thread(ChildRef);
Thread(ChildRef); Thread(ChildRef);
ChildThread.Start(); ChildThread.Start();
ChildThread.Start(); ChildThread.Start();
ChildThread.CallMeth ChildThread.BookDet
} } od(BookDetails); ails();
}
}
1, public static void 2, public static void 3, public static void 4, public static void 2
Main() Main() Main() Main()
{ { { {
ThreadStart ThreadStart ThreadStart ThreadStart
ChildW = new ChildW = new ChildW = new ChildW = new
ThreadStart(Write); ThreadStart(Write); ThreadStart(Write); ThreadStart(Write);
ThreadStart ThreadStart ThreadStart ThreadStart
ChildS = new ChildS = new ChildS = new ChildS = new
ThreadStart(Save); ThreadStart(Save); ThreadStart(Save); ThreadStart(Save);
ThreadStart ThreadStart ThreadStart ThreadStart
ChildP = new ChildP = new ChildP = new ChildP = new
ThreadStart(Print); ThreadStart(Print); ThreadStart(Print); ThreadStart(Print);

Console.WriteLine("M Console.WriteLine("M Console.WriteLine("M Console.WriteLine("M


ain - Creating Child ain - Creating Child ain - Creating Child ain - Creating Child
threads"); threads"); threads"); threads");

Thread Thread1 Thread Thread1 Thread Thread1 Thread Thread1


= new = new = new = new
Thread(ChildW); Thread(ChildW); Thread(ChildW); Thread(ChildW);
Thread Thread2 Thread Thread2 Thread Thread2 Thread Thread2
= new = new Thread(ChildS); = new = new
Thread(ChildS); Thread Thread3 Thread(ChildS); Thread(ChildS);
Thread Thread3 = new Thread(ChildP); Thread Thread3 Thread Thread3
= new Thread1.Priority = new = new
Thread(ChildP); = Thread(ChildP); Thread(ChildP);
ThreadPriority.Highest Thread1.Priority
Thread3.Start(); ; = Thread1.Priority(High
Thread1.Start(); Thread2.Priority ThreadPriority.Highest est);
Thread2.Start(); = ;
} ThreadPriority.Normal Thread2.Priority Thread2.Priority(Nor
; = mal);
Thread3.Priority ThreadPriority.Normal
= ; Thread3.Priority(Low
ThreadPriority.Lowest; est);
Thread3.Start();
1, using System; 2, using System; 3, using System; 4, using System; 4
using using using using
System.Threading; System.Threading; System.Threading; System.Threading;

namespace namespace namespace namespace


ThreadSample ThreadSample ThreadSample ThreadSample
{ { { {
class class class class
BasicThreadApp BasicThreadApp BasicThreadApp BasicThreadApp
{ { { {
public static void public static void public static void public static void
ChildThreadCall() ChildThreadCall() ChildThreadCall() ChildThreadCall()
{ { { {
for (int i=0; i
<= 12; i++) Console.WriteLine("Cl Console.WriteLine("Cl Console.WriteLine("Cl
{ ock Started"); ock Started"); ock Started");
for (int i=0; i < for (int i=0; i > for (int i=0; i <
Console.WriteLine("Cl 12; i++) 12; i++) 12; i++)
ock Started"); { { {

Thread.Sleep(5000); Thread.Sleep(5000); Thread.Sleep(5000); Thread.Sleep(5000);


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

Console.WriteLine("1 Console.WriteLine("1 Console.WriteLine("1 Console.WriteLine("1


minute over"); minute over"); minute over"); minute over");
} } } }

public static void public static void public static void public static void
Main() Main() Main() Main()
{ { { {
ThreadStart ThreadStart ThreadStart ThreadStart
ChildRef = new ChildRef = new ChildRef = new ChildRef = new
ThreadStart(ChildThr ThreadStart(ChildThre ThreadStart(ChildThre ThreadStart(ChildThr
eadCall); adCall); adCall); eadCall);
1, The 2, The 3, The 4, The 3
Thread.Sleep(15000); Thread.Sleep(15000); Thread.Sleep(15000); Thread.Sleep(15000);
statement is placed at statement is placed at statement is placed at statement is placed at
the wrong position. It the wrong position. It the wrong position. It the wrong position. It
should come after the should come before should come after the should come before
following statement: the following following statement: the following
String userVal = statement: t.Start(); statement:
Console.ReadLine(); Console.WriteLine("\n str = "The Cheater
You WON! Game Cheats the Cheating
Over! \n"); Code";
1, Doctor: Give 2, Doctor: Give 3, Doctor: Give 4, Doctor: Give 4
medicine 1 medicine 1 medicine 1 medicine 1
Doctor: Give Doctor: Give medicine Nurse: Medicine 1 Nurse: Medicine 1
medicine 2 2 given given
Doctor: Work finished
Nurse: Medicine 1 Doctor: Give medicine Doctor: Give
given Nurse: Medicine 1 2 medicine 2
Nurse: Medicine 2 given Doctor: Work finished Nurse: Medicine 2
given Nurse: Medicine 2 given
given Nurse: Medicine 2
Doctor: Work finished Nurse: Work finished given Nurse: Work finished
Nurse: Work finished Nurse: Work finished Doctor: Work finished
1, 2, Monitor.Enter(this); 3, Monitor.Exit(); 4, public static 3
Fd.WriteData("T1"); FileAccess Fd = new
FileAccess();
1, 2, lock() 3, 4, public static 2
Console.WriteLine("U Fd.UpdateAC("T2"); FileAccess Fd = new
pdated {0} record", FileAccess();
Cnt+1);

1, By calling the 2, By calling the 3, By calling the 4, By calling the 2


Run() method. Start() method. Sleep() method. Resume() method.
1, void Calculate() 2, void Calculate() 3, void Calculate() 4, void Calculate() 1
{ { { {

try try try try


{ { { {
int a; int a; int a; int a;
int b; int b; int b; int b;
int c; int c; int c; int c;

Console.WriteLine("E Console.WriteLine("E Console.WriteLine("E Console.WriteLine("E


nter num 1"); nter num 1"); nter num 1"); nter num 1");
a= a= a= a=
Convert.ToInt32(Con Convert.ToInt32(Cons Convert.ToInt32(Cons Convert.ToInt32(Con
sole.ReadLine()); ole.ReadLine()); ole.ReadLine()); sole.ReadLine());

Console.WriteLine("E Console.WriteLine("E Console.WriteLine("E Console.WriteLine("E


nter num 2"); nter num 2"); nter num 2"); nter num 2");
b= b= b= b=
Convert.ToInt32(Con Convert.ToInt32(Cons Convert.ToInt32(Cons Convert.ToInt32(Con
sole.ReadLine()); ole.ReadLine()); ole.ReadLine()); sole.ReadLine());
c = a % b; c = a % b; c = a % b; c = a % b;

Console.WriteLine("R Console.WriteLine("R Console.WriteLine("R }


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

Console.WriteLine("E Console.WriteLine("Er Console.WriteLine("C Console.WriteLine("C


rror"); ror"); alculation complete"); alculation complete");
} } }
finally Console.WriteLine("C finally }
{ alculation complete"); {

} Console.WriteLine("Er
Console.WriteLine("C } ror");

You might also like