Examination Main Sit Question Paper: Year 2021/22: Module Code: Module Title: Module Leader

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

EXAMINATION MAIN SIT QUESTION PAPER: Year 2021/22

Module code: CS6004ES

Module title: Application Development

Module leader: Mr. Praveen Croos

Date: 12th December 2021

Day / evening: Day

Start time: 10.00 am

End time: 2.00 pm

Exam type: Unseen

Academic Integrity Statement

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.

© London Metropolitan University

Page 1 of 14
INSTRUCTIONS TO CANDIDATES

1) This paper contains 30 MCQ questions and 3 essay questions on 14


pages (including the cover page)
2) This exam is worth 40% of the assessment for the module.
3) The total marks obtainable for this examination is 100. Each MCQ
question carries 2 marks.
4) Candidates must answer all 30 MCQ questions in Section A, and
Question One (compulsory) and any other Question from Two and
Three from Section B

5) You can type your answers in a Word document.

6) Answers for the MCQ questions should be typed as follow;


Example - 1) 1
2) 1
7) Clearly mention your London Met ID number on the first page of the
document.
8) Save your document as a PDF and name it as :
London Met ID No_AD_WrittenExam

9) Upload the PDF to ICMS before the deadline.

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

Q-2 What will be the output of the following code snippet ?


using System;
class A
{
public string name;
public string address;
public void show()
{
Console.WriteLine("{0} is in city {1}", name, address);
}
}
class Program
{
static void Main(string[] args)
{
A obj = new A();
obj.name = "Chrish";
obj.address = "Colombo";
obj.show();
Console.ReadLine();
}
}?

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?

1. A constructor can be used to set default values and limit instantiation.


2. C# provides a copy constructor.
3. Destructors are used with classes as well as structures.
4. A class can have more than one destructor.

Q-14
Which of the following statements is correct about constructors?

1. If we provide a one-argument constructor then the compiler still provides a zero-


argument constructor.
2. Static constructors can use optional arguments.
3. Overloaded constructors cannot use optional arguments.
4. If we do not provide a constructor, then the compiler provides a zero-argument
constructor.

Q-15

Which of the following statements are TRUE about the .NET CLR?

1) It provides a language-neutral development & execution environment.


2) It ensures that an application would not be able to access memory that it is not
authorized to access.
3) It provides services to run "managed" applications.
4) The resources are garbage collected.
5) It provides services to run "unmanaged" applications.
1. Only 1 and 2
2. Only 1, 2 and 4
3. 1, 2, 3, 4
4. Only 4 and 5
5. Only 3 and 4

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?

1.The Array shows a hierarchical structure.


2.Arrays are immutable.
3.Container that stores the elements of similar types
4.The Array is not a data structure

Q-21
Which of the following is the disadvantage of the array?

1.Stack and Queue data structures can be implemented through an array.


2.Index of the first element in an array can be negative
3.Wastage of memory if the elements inserted in an array are lesser than the allocated size
4.Elements can be accessed sequentially.

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

You might also like