Examination Main Sit Question Paper: Year 2021/22: Module Code: Module Title: Module Leader
Examination Main Sit Question Paper: Year 2021/22: Module Code: Module Title: Module Leader
Examination Main Sit Question Paper: Year 2021/22: Module Code: Module Title: Module Leader
You are reminded that you should not access online materials, notes etc. during this examination
or discuss this assessment with others before the end of its time period.
By submitting this assessment, you confirm that you have read the above Statement and are
responsible for understanding and complying with Academic Misconduct regulations as they relate
to this assessment.
Page 1 of 14
INSTRUCTIONS TO CANDIDATES
Page 2 of 14
Part A – (MCQ)
Answer all 30 MCQ questions. Each question carries two marks
Q-1
Which of the following operator can be used to access the member function of a class?
1. :
2. ::
3. .
4. #
Page 3 of 14
1) Syntax error
2) {0} is in city {1} Chrish Colombo
3) Chrish is in Colombo
4) Chrish is in city Colombo
5) executes successfully and prints nothing
Q-3
Which of the following gives the correct count of the constructors that a class can define?
1) 1
2) 2
3) Any number
4) None of the above
Q-4
What will be the output of the following code snippet?
using System;
class sample
{
public static void first()
{
Console.WriteLine("first method");
}
public void second()
{
first();
Console.WriteLine("second method");
}
public void second(int i)
{
Console.WriteLine(i);
Page 4 of 14
second();
}
}
class program
{
public static void Main()
{
sample obj = new sample();
sample.first();
obj.second(10);
}
}
1) second method
10
second method
first method
2) first method
10
first method
second method
3) first method
10
4) second method
10
first method.
Page 5 of 14
Q-5
Which of the following statements correctly tell the differences between ‘=’ and ‘==’ in C#?
1) ‘==’ operator is used to assign values from one variable to another variable
‘=’ operator is used to compare value between two variables
2) ‘=’ operator is used to assign values from one variable to another variable
‘==’ operator is used to compare value between two variables
3) No difference between both operators
4) None of the mentioned.
Q-6
Which of the following is the root of the .NET type hierarchy?
1. System.Object
2. System.Type
3. System.Base
4. System.Parent
5. System.Root
Q-7
What will be the output of the following code snippet ?
using System;
namespace ProgrammingExercise
{
class FindOutput
{
static void Main(string[] args)
{
int a = 2, b = 3, c = 4;
switch (a + b - c)
{
case 0: case 2: case 4:
Page 6 of 14
++a;
c += b;
break;
case 1: case 3: case 5 :
--a;
c -= b;
break;
default:
a += b;
break;
}
Console.WriteLine(a + "\n" + b + "\n" + c);
}
}
}
1. 1 3 1
2. 2 3 4
3. 5 3 4
4. Compilation Error
Q-8
Which of the following keyword, enables to modify the data and behavior of a base class by
replacing its member with a new derived member?
1) overloads
2) overrides
3) new
4) base
Page 7 of 14
Q-9
Which of the following keywords is used to refer base class constructor to subclass
constructor?
1) this
2) static
3) base
4) extend
Q-10
Which of the following options define the correct way of implementing an interface data by
the class employee?
1) class employee : data {}
2) class employee implements data {}
3) class employee imports data {}
4) None of the mentioned
Q-11
Which of the following is NOT a .NET Exception class?
1. Exception
2. StackMemoryException
3. DivideByZeroException
4. OutOfMemoryException
5. InvalidOperationException
Q-12
Which of the following statements is correct about an Exception?
1. It occurs during compilation.
2. It occurs during linking.
3. It occurs at run-time.
4. It occurs during Just-In-Time compilation.
5. It occurs during loading of the program.
Page 8 of 14
Q-13
Which of the following statements is correct?
Q-14
Which of the following statements is correct about constructors?
Q-15
Which of the following statements are TRUE about the .NET CLR?
Page 9 of 14
Q-16
Which of the following testing is also known as white-box testing?
1.Structural testing
2.Error guessing technique
3.Design based testing
4.None of the above
Q-17
What is the key objective of Integration testing?
1.Design Errors
2.Interface Errors
3.Procedure Errors
4.None of the mentioned
Q-18
In the maintenance phase the product must be tested against previous test cases. This is
known as __________ testing.
1. Unit
2. Regression
3. Acceptance
4. Integration
Q-19
Which one of the following is a functional requirement?
1. Maintainability
2. Portability
3. Business needs
4. Reliability
Page 10 of 14
Q-20
How can we describe an array in the best possible way?
Q-21
Which of the following is the disadvantage of the array?
Q-22
In Asp.net , Web.config file is used ?
1. Configures the time that the server-side code behind module is called
2. To store the global information and variable definitions for the application
3. To configure the web server
4. To configure the web browser
Q-23
Difference between Response.Write() andResponse.Output.Write().
1. Response.Output.Write() allows you to buffer output
2. Response.Output.Write() allows you to write formatted output
3. Response.Output.Write() allows you to flush output
4. Response.Output.Write() allows you to stream output
Page 11 of 14
Q-24
Which protocol is used for requesting a web page in ASP.NET from the Web Server?
1.HTTP
2.TCP
3.SMTP
4.None of the above.
Q-25
Which file you should write for the connection string so that you can access it in all the web
pages for the same application?
1.In App_Data folder
2.In Web.config file
3.In MasterPage file
4.None of the above
Q-26
What is the name of the Page object’s property that determines if a Web page is being
requested without data being submitted to the server?
1.IsCallback
2.IsReusable
3.IsValid
4.IsPostBack
Q-27
How many types of authentication ASP.NET supports?
1.Windows Authentication.
2..NET Passport Authentication.
3.Forms Authentication.
4.All of the above.
Page 12 of 14
Q-28
Which of the following is not an ASP.NET page event?
1. Init
2. Load
3. Import
4. None of the above.
Q-29
Which attribute is necessary for HTML control to work as a HTML server control?
1. runat=”server”
2. runat=”web-server”
3. ID=”server”
4. ID=”web-server”
Q-30
Which validation control in ASP.NET can be used to determine if data that is entered into a
TextBox control is of type Currency?
1. ValidationSummary
2. CompareValidator
3. RequiredFieldValidator
4. None of the above.
Page 13 of 14
Part B (Essay type questions)
Answer Question One and only one question from Question Two and
Three.
Each question carries 20 marks
Q-1 (Compulsory)
1. Explain the following with a sample code
Inheritance, Overloading, Overriding, Constructor. (16 Marks)
2. What are the advantages when using abstraction (4 Marks).
Q-2
1. Explain SDLC briefly. (8 Marks)
2. What is Queue data structure? Explain with code snippet. (6 Marks)
3. Compare Blackbox testing and white box testing. (6 Marks)
Q-3
1. Write a program in C# to find the sum of all elements of the array. (7 Marks)
2. Explain the different levels of software testing (6 Marks)
3. Write a program in C# to print the following * Pattern (7 Marks)
Page 14 of 14