ENG201 Past Final Term Solved Papers

Download:

ENG201(Fall 2009) Final Term

ENG201(Fall 2009) fINALtERM

ENG201(fALL 2011)FinalTerm

ENG201(Spring 2009) Final Term

ENG201(Spring 2010) Final tERM

ENG201(Spring 2010) Final tERM

 

Advertisements

CS201 Solved Short Question

Question No: 1 ( Marks: 2 )
Write a declaration statement for an array of 10 elements of type float. Include an initialization statement of the first four elements to 1.0, 2.0, 3.0 and 4.0.
Answer:
float floatArry[10] = {1.0,2.0,3.0,4.0};
Question No: 2 ( Marks: 2 )
Write the general syntax for the declaration of pre-increment and post-increment member operator function.
Answer:
Classname operator ++(); —- pre increment
Classname operator ++(int) —- post increment
Question No: 3 ( Marks: 2 )
Give the general syntax of class template.
Answer:
template
class myclass { —} ;
Question No: 4 ( Marks: 2 )
What is a truth Table?
Answer:
There are some areas where the decision structures become very complicated. Sometimes, we find it difficult to evaluate a complicated logical expression. Sometimes the logic becomes extremely complicated so that even writing it as a simple syntax statement in any language. It becomes complicated to determine what will be evaluated in what way. We know the concept of truth table. The truth tables are very important. These are still a tool available for analyzing logical expressions. We will read logic design in future, which is actually to do with chips and gates. How we put these things together.
Question No: 5 ( Marks: 2 )
What will be the output of following code, if user input a number 123?
int input ;
cin >> oct >> input;
cout hex input ;
Answer:
53
Rational: it will take 123 as octal and print it in hex form which is 53.
Question No: 6 ( Marks: 2 )
What is principle of friendship in the context of functions and classes?
Answer:
Class can declare a friend function and someone from outside the class cannot declare itself friend of a class.
A friend function can access the private variables of class just like a member function
Question No: 7 ( Marks: 2 )
How many arguments a Unary Operator take? Can we make a binary operator as unary operator?
Answer:
Unary operator takes only one argument like i++ or i— (Post increment or post decrement operators for integers) or ++i,–i (Pre increment or pre decrement operators for integers) ,we can not make Unary operator as binary or binary as Unary operator.
Question No: 8 ( Marks: 2 )

Which arithmetic operators cannot have a floating point operand?

Answer:
Modulus operator:
This operator can only be used with integer operands ONLY

Question No: 9 ( Marks: 2 )

What are manipulators? Give one example.

Answer:
The manipulators are like something that can be inserted into stream, effecting a change in the behavior. For example, if we have a floating point number, say pi (л), and have written it as float pi = 3.1415926 ; Now there is need of printing the value of pi up to two decimal places i.e. 3.14. This is a formatting functionality. For this, we have a manipulator that tells about width and number of decimal points of a number being printed.

Question No: 10 ( Marks: 2 )

Write down piece of code that will declare a matrix of 3×3. And initialize all its locations with 0;

Answer:
int matrix [3] [3] ;

include

main () {
int matrix [3][3];
int inivalue = 0;

for (int a=0;a<3;a++)
{ for (int b = 0;b<3;b++)
{ matrix[a][b]= inivalue;
cout/p>
}

Question No: 11 ( Marks: 2 )

What is the difference between switch statement and if statement.
Answer:
The “If” statement is used to select among two alternatives. It uses a Boolean expression to decide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternative should be executed.

Question No: 12 ( Marks: 2 )

How can we initialize data members of contained object at construction time?

Answer:
Initializer list is used to initialize the contained objects at the construction time.

Question No: 13 ( Marks: 2 )

Can we overload new and delete operators?

Answer:
Yes, it is possible to overload new and delete operators to customize memory management. These operators can be overloaded in global (non-member) scope and in class scope as member operators.

Question No: 14 ( Marks: 2 )

Suppose there is a template function ‘func’ having argument of type U and return type T. What will be the C++ syntax to call this function, passing a variable ‘x’ of type double and returning an int type?

Answer:
template
T func (T a, U b) {
return (a
}
calling
int i;
double x;
x = func
Permalink Reply by M.Tariq Malik on Sunday
Question No: 15 ( Marks: 2 )

Which variable will be used in inner code block if we have the same names of variable at outer code block and inner code block?

Answer:
Simply: variable of the inner code is use in the inner code block.

Question No: 16 ( Marks: 2 )

What is the benefit of reference and where can we use it?

Answer:
In references we give the memory address of the object, due to references we pass values without making the copy. Hence, when we have many values & we want efficiency we use references to avoid copy.

Question No: 17 ( Marks: 2 )

Write the C++ code for the declaration of overloaded stream insertion and stream extraction operator for the object d of type Date.

Answer:
Date operator >> (date & d1){
cout<”-”<”-”/p>
}

Question No: 18 ( Marks: 2 )

What is difference between endl and \n?

Answer:
Endl is manipulator and it inserts new line character and flushes the stream.

\n is control character which is used to insert line break.

Question No: 19 ( Marks: 2 )

What does code optimization mean?

Answer:
It is process by which we make our code in such a way that it improves the speed of program. By use of optimization we refine program codes in such a way that it run faster and consume less memory. We do it in such a way that output quality is not compromised.

Question No: 20 ( Marks: 3 )

How is the following cout statement interpreted by compiler?

cout a b c ;

Answer:
It will give a compiler error because a,b,c are not declared.

Question No: 21 ( Marks: 3 )

Suppose an object of class A is declared as data member of class B.

(i) The constructor of which class will be called first?
Answer: A
(ii) The destructor of which class will be called first?
Answer: B

Question No: 22 ( Marks: 3 )

What will be the output of following functions if we call these functions three times?

1)
void func1(){
int x = 0;
x++;
cout x endl;
}

Answer:

1
1
1
2)
void func2(){
static int x = 0 ;
x++;
cout x endl ;
}

Answer:
1
2
3

Question No: 23 ( Marks: 3 )

If is not available in the system then what does calloc/malloc and new operator return?

Answer:
calloc/malloc and new operator return returns a null pointer to indicate that no memory is available

Question No: 24 ( Marks: 3 )

What is the keyword ‘this’ and what are the uses of ‘this’ pointer?

Answer:
‘this’ is use to refer the current class member without using the name of the class.

Question No: 25 ( Marks: 3 )

Which one (copy constructor or assignment operator) will be called in each of the following code segment?

1) Matrix m1 (m2);
2) Matrix m1, m2;
m1 = m2;
3) Matrix m1 = m2;

Answer:

1) Matrix m1 (m2); copy constructor
2) Matrix m1, m2;
m1 = m2; assignment operator
3) Matrix m1 = m2; assignment operator

Question No: 26 ( Marks: 3 )

What will be the output of following function if we call this function by passing int 5?

template T reciprocal(T x) {return (1/x); }

Answer:

0
The output will zero as 1/5 and its .05 but conversion to int make it zero
Above is prototype of template class so assume passing an int and returning an int

Question No: 27 ( Marks: 3 )

Identify the errors in the following member operator function and also correct them.

math * operator(math m);
math * operator (math m)
{
math temp;
temp.number= number * number;
return number;

}

Answer:

The errors are in the arguments of the member operation function and also in the body of operator member function.
Correct function should be
math *operator (math *m)
{
math temp;
temp = m;
temp.number= number * number;
return temp.number;

}

Question No: 28 ( Marks: 3 )

What are the limitations of the friendship relation between classes?

Answer:
friendship relation between classes is a one way relation that is if one class declare friend another class then the another class is the friend of first class but not the first class if the friend of another class.

Question No: 29 ( Marks: 3 )

Define static variable. Also explain life time of static variable?

Answer:
When you declare a static variable (native data type or object) inside a function, it is created and initialized only once during the lifetime of the program.

Question No: 30 ( Marks: 5 )

What is difference between Unary and binary operators and how they can be overloaded?

Answer:
Unary operator takes one argument.
a ++ is an example of unary operator

Binary take two operators
+,-,* are example of binary operators
Overloaded binary operator may return any type

Here is general syntax of overloading
Return-type operator symbol (parameters);

Operator is keyword
Permalink Reply by M.Tariq Malik on Sunday
Question No: 31 ( Marks: 5 )

What steps we must follow to design good program?

Answer 1:

Hence to design a program properly, we must:
Analyze a problem statement, typically expressed as a word problem.
Express its essence, abstractly and with examples.
Formulate statements and comments in a precise language.
Evaluate and revise the activities in light of checks and tests and
Pay attention to detail.

Answer 2:

Details: we must check very details of any program. It is very important aspect of any program. We must pay complete attention to calculation.
We must give attention to logic and its flow should be smooth.

Reusable: We must write program in such a way that we can reuse them in other program. Like we define function in such a way that in future if we need any similar kind of function is requires in that case we can easily modify or reuse it.

Comments: we write the details of important steps in the form of comments. We should use comments in such a way if any body else wanted to reuse or debug or codes he can easily understand it.

Code readability: We should use Tab and spaces so codes are easily readable.

User interface: we make interface user friendly. Use polite prompts for user while take input.

Question No: 32 ( Marks: 5 )

Write a program which defines five variables which store the salaries of five employees, using setw and setfill manipulators to display all these salaries in a column.
Note: Display all data with in a particular width and the empty space should be filled with character x
Output should be displayed as given below:
xxxxxx1000
xxxxxx1500
xxxxx20000
xxxxx30000
xxxxx60000

Answer:

#include
#include
main(){
int sal1 =1000;
int sal2 =1500;
int sal3 =20000;
int sal4 =30000;
int sal5 =60000;

cout setfill (‘x’) setw (10);
cout sal1/p>
cout setfill (‘x’) setw (10);
cout sal2/p>
cout setfill (‘x’) setw (10);
cout sal3/p>
cout setfill (‘x’) setw (10);
cout sal4/p>
cout setfill (‘x’) setw (10);
cout sal5/p>
int i=0;
cin>>i; // to stop the screen to show the output
}

Question No: 33 ( Marks: 5 )

Suppose we have the following class.

class Matrix
{
private:
int Elements[3][3];
};

Write the operator function of stream extraction operator (>>) for this class.

Answer:
Element operator >> (Element &element){
cout/p>
cout/p>
cout/p>
}

Question No: 34 ( Marks: 5 )

What is meant by user interface and class interface in C++ ? And what role a class interfaces can play in user interface [Marks 5]

Answer:

Question No: 35 ( Marks: 5 )

Write the general syntax of a class that has one function as a friend of a class along with definition of friend function.

Answer:
class frinedclass{
public:
friend int compute(exforsys e1)
};
Int compute(exforsys e1)
{
//Friend Function Definition which has access to private data
return int(e1.a+e2.b)-5;
}

Question No: 36 ( Marks: 5 )

What are the advantages and disadvantages of using templates?

Answer:
Many things can be possible without using templates but it does offer several clear advantages not offered by any other techniques:

Advantages:
Templates are easier to write than writing several versions of your similar code for different types. You create only one generic version of your class or function instead of manually creating specializations.
Templates are type-safe. This is because the types that templates act upon are known at compile time, so the compiler can perform type checking before errors occur.
Templates can be easier to understand, since they can provide a straightforward way of abstracting type information.
It helps in utilizing compiler optimizations to the extreme. Then of course there is room for misuse of the templates. On one hand they provide an excellent mechanism to create specific type-safe classes from a generic definition with little overhead.

Disadvantages:
On the other hand, if misused
Templates can make code difficult to read and follow depending upon coding style.
They can present seriously confusing syntactical problems esp. when the code is large and spread over several header and source files.
Then, there are times, when templates can “excellently” produce nearly meaningless compiler errors thus requiring extra care to enforce syntactical and other design constraints. A common mistake is the angle bracket problem.

Question No: 37 ( Marks: 5 )

Suppose a program has a math class having only one data member number.
Write the declaration and definition of operator function to overload + operator for the statements of main function.
math obj1, obj2;
obj2= 10 + obj1 ;

Answer:
#include
math
{
mth operator + (obj1,int x)
{

number temp;
temp=obj1.number+x;
return temp.number;
}
}

Question No: 38 ( Marks: 5 )

Write a program which defines three variables of type double which store three different values including decimal points, using setprecision manipulators to print all these values with different number of digits after the decimal number.

Answer:

#include
#include
main () {
double a = 12.12345;
double b = 13.123456;
double c = 14.1234567;
cout setprecision (5) a endl;
cout setprecision (2) a endl;
cout setprecision (3) a endl;
}

Question No: 39 ( Marks: 5 )

Let we have a class,
class String
{
private:
char buf[25];
};
Write code for assignment (=) operator function which assign one String object to other object. Your code should also avoid self assignment

Answer:
void String::operator = ( const String &other )
{ int length ;
length = other.length();
delete buf;
buf = new char [length + 1];
strcpy( buf, other.buf ); }

Question No: 40 ( Marks: 5 )

Read the given below code and explain what task is being performed by this function
Matrix :: Matrix ( int row , int col )
{
numRows = row ;
numCols = col ;
elements = new ( double * ) [ numRows ] ;
for ( int i = 0 ; i < numRows ; i ++ )
{
elements [ i ] = new double [ numCols ] ;
for ( int j = 0 ; j < numCols ; j ++ )
elements [ i ] [ j ] = 0.0 ;
}
}
Hint : This function belong to a matrix class, having
Number of Rows = numRows
Number of Columns = numCols

Answer:
In the above mentioned code, first of all programmer call the constructor who have two parameters for the number of rows & columns in the matrix. Then this constructor also dynamically allocates the memory for the elements of the matrix & also initializes the value of the all elements of matrix with 0.0

MGT111 Assignment No 2 Spring 2012

All the incumbents of the public offices enjoy and exercise certain authority by the virtue of the office they hold. Some of these offices carry more and important aspect of authority as compared to the others. These include Police and the paramilitary forces. It is usually assumed that the SHO or the DPO is “King” ridding an unbridled horse of authority. But the situation is not so in the real life. The newspapers speaks about SHO being called for explanation or suspended by the IG Police, IG Police called for explanation in Courts of Law, even Secretary Interior called to appear before Committees of the Parliament to provide satisfactory answers, even the Police Department as a whole needs to request for funds from the executive to fulfill its desired role. Not only the mentioned ones but now the fourth pillar of the state has also nosed the Police in general and all the other pillars of the state in particular.

Question:

All the points given in the above mentioned paragraph refer to an important practice of Public Administration. Relate all the above mentioned incidents to the types they belong to.

Solution:

SHO being called for explanation or suspended by the IG Police

“Internal Control”, as both belong to the same department.

IG Police called for explanation in Courts of Law

” External Control” (judicial control)

Secretary Interior called to appear before Committees of the Parliament to provide satisfactory answers

“External Control” (legislative control)

Police Department as a whole needs to request for funds from the executive to fulfill its desired role

“External Control” (executive control)

Not only the mentioned ones but now the fourth pillar of the state has also nosed the Police in general and all the other pillars of the state in particular

External Control


CS504-Software Engineering-Finalterm-Solved-MCQs

Solved by VUstudyhelp

Question # 1

Str  = 0;// str is string Which rewritten from of above line of code is more in line with the self-documentation philosophy than the code above.
Str = false;
Str = NULL;
Str = ‘;
Str = 0.0;

Question # 2

Struct packed_struct  { unsigned int f1:1;} pack; Here in “packed_struct”:
Value of f1 =1
Size of f1 = 1 bit
Value of f1 should not exceede 1
None of given options

Question # 3

In the switch statement, cases should always end with a ——-statment.
Switch
Go
Break
Stop 

Question # 4

Bit fields are a convenient way to express many difficult operations. However, bit fields suffer from one problem.
Lack of Usability
Lack of Security
Lack of Performance
Lack of Portability 

Question # 5

If(!(block < activeBlock)) is equvivalent to.
If ((block < activeBlock))
If ((block == activeBlock))
If ((block >= activeBlock))
None of the given 

Question # 6

Bit fields allow the packing of data in a structure. Using Bit fields we can.
Read 9 bit integers
Avoid memory leakages
Avoid memory overflow
Avoid syntax errors 

Question # 7

The order in which bytes of one word are stored is _________ dependent.
Hardware
Software
Language
Syntax 

Question # 8

In order to write a portable code which of the following guideline will be helpful:
Stick to the standards
Program in the mainstream
Size of data types
All of give options 

Question # 9

Complex expressions.
Make the code easy to modify
Make the code difficult to modify
Make the code easy to understand
Does not effect understandability 

Question # 10

x = 0; // x is floating pt Which rewritten form of above line of code is more in line with the self-documentation philosophy than the code above.
x = false
x = NULL
x = 0.0;
x = ‘’

Question # 11

using proper paranthesis normally makes the code.
easy to read
easy to understand
less ambiguous
All of the given options 

Question # 12

The use of comments should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structure.
True
False 

Question # 13

Bit fields allow the packing of data in a structure. using Bit fields we can:
Read 9 bit integers
Avoid memory leakages
Avoid memory overflow
Avoid syntax errors 

Question # 14

1) x = (a + 2 > 3)? a : a-1 ; 2) if((a + 2)> 3) x = a; else x = a – 1;
Statement (2) is more complex than (1)
Statement (2) is more complex than (1)
Both statements are very complex
None of the given option

Question # 15

80/20 rule states that:
you spend 80 percent of your time in 20 percent of the code
you spend 20 percent of your time in 80 percent of the code
We should try to optimized 80 percent or at least 20 percent of the code
None of the given options.

Question # 16

Be very careful when you use functions with side effects – functions that change the values of the ________.
Objects
Classes
Structures
Variables

Question # 17

Comma ( , ) is very dangerous because.
Compiler does not recognise this symbol
It creates linkage problem
It causes side effects
All of the given options 
Question # 18
The C/C++ language has not specified whether ____ is arithmetic or logical.
Right shift >>
Right shift
&&
||
Question # 19
In order to make a code more portable, Instead of using vendor specific language extensions, use _______ as much as possible.
STL
ANSI
ISO
CMMI
Question # 20

When a small set of functions (which use each other) is so overwhelmingly the bottleneck, there are two alternatives: 
use a better algorithm OR re-write the code
debug the code OR place assertions in code
remove the functions OR add more functions
changed programming language OR compiler at least
Question # 21
_______ cause major portability issues 
Loops (Not Sure)
Bugs in code
Sizes of data types
Conditional Structures

Question # 22

Some bit field members are stored: I) left to right II) right to left III) in circular array.
only (I) is true
Only (II) is true
Both (I) and (II) are true
All of the options (I, II and III) are true

Question # 23

Comma ( , ) is very dangerous because
Compiler does not recognise this symbol
It creates linkage problem
It causes side effects
All of the given options

Question # 24

using proper paranthesis normally makes the code
easy to read
easy to understand
less ambiguous
All of the given options

Question # 25

A test case involves
Input/output specification plus a statement of the function under test
Steps to perform the function
Expected results that the software application produces
All of the given options

Question # 26
If an application fulfills its specifications but deviates from users expectations or their desired behavior. This means, software is verified but not ————
Validated
Corrected
Checked
Traced
Question # 27

The raising of the imaginary error flag is simply called raising or ________ an error.
Catching
Casting
Throwing 
None of given options
Question # 28
struct packed_struct { unsigned int f1:1; } pack; Here in “packed_struct”:
value of f1 = 1
size of f1 = 1 bit
value of f1 should not exceede 1
None of given options
Question # 29
The idea behind exception handling is to raise some error flag every time ________.
The code compiles
The code links
Memory is allocated
Something goes wrong
Question # 30
A __________ is a variance from a desired product attribute.
Exception
Error
Mistake
Defect 
Question # 31
The C/C++ language does not define the alignment of items within.
structures
classes
unions
All of the given options 
Question # 32
Consider the following statement: int a,b=10; Which of the following is correct:
variable “a” is initialized to 10
Variable “b” is initialized to 10 
Both variables “a” and “b” are initialized to 10
variables can not be initialized this way
Question # 33
Exception handling is a powerful technique that separates error-handling code from ______ code.
Normal
Faulty
Buggy
Complex
Question # 34
Bit fields are a convenient way to express many difficult operations. However, bit fields suffer from one problem.
Lack of usability
Lack of security
Lack of performance
Lack of portability
Question # 35
The complexity of a program may ______ if there are exceptional paths in it
Decrease
Increase
Remain same
All of given options
Question # 36
When an error is thrown the overall system (on the lookout for this error flag) responds by ______ the error.
Ignoring
Casting
Catching
All of the given options

Question # 37

Comments are not syntax checked
TRUE
FALSE

Question # 38
Client Server model tries to data and processing
Distribute
Merge
Clone
Proceed

Question # 39

Anti- Patterns is another concept that corresponds to common in analysis and design.
Mistake
Issues
Problems
All of the given

Question # 40

 Three tier architecture contains layers

Presentation
Application
Database
All of the above

Question # 41

MVC stands for

Model View Controller
Modern View Center
Model View Center
Modern View Controller

Question # 42

Fat client model is one of the configurations of model

Data-Centered

Layered

Reference

Client Server

Question # 43

Description of communicating objects and classes that are customized to solved a general problem in a particular context is called

Design Pattern

System Patter

System Design

None of the Given

Question # 44

In the N-tire Architecture, the idea is to enhance scalability and by distributing both data and the application using multiple server machines.

Usability

Performance

Interpretability

None of the given

Question # 45

Dynamic process model shows the process ………….. of the system 

Components

Objects

Structure

Linkage

Question # 46

It ensures that a class only has one instance and provides a global point of access to it.

Singleton Pattern

Observer Pattern

Real Pattern

None of the given

Question # 47

STL Stnads for —————— 

Standard Template Library

Standard Type Link

Standard Tempo Line

None of the given

Question # 48

Three tier architecture contains ————- layers 

Select correct option:

Presentation

Application

Database

All of the above

Question # 49

Which of following is/are among ten things,which the basic template of GOF design pattern includes. 

Select correct option:

Problem

Context

Forces

 All of the given

Question # 50

Vertical partitioning is also known as….. 

Select correct option:

Balancing

Mutating

Parallelizing

 Factoring

Question # 51

Patterns are devices that allow programs to share knowledge about their ————-. 

Code

Design

Analysis

None of the given

Question # 52

N-tier architecture stems from the struggle to find a ———– between the fat-client architecture and the thin-client architecture. 

Concurrency

Distribution point

 Middle ground 

Similarity

Question # 53

Vertical partitioning divides the architecture application from a …… making perspective. 

Decision

Design

Conclusion

Move

Question # 54

Distributing the responsibilities to different subsystems so that we get a software system which is easy to maintain, is called ………the architecture. :

Subtracting

 Partitioning

Cloning

Balancing

 Question # 55

The nominal case should be put in the if-part and the exception in the else-part of an if statement.

TURE

FALSE

Question # 56

Charles Simonyi first discussed Hungarian Notation. He was of —— .

Microsoft

IBM

Dell

Cisco

Question # 58

The terms get/set must be used where an attribute is accessed

Indirectly

Directly

Question # 59

A self documented program/code contains the following attribute:

Size of each function

Choice of variable

Choice of variable

All of the given choices

Question # 60

“is” prefix should be used for—— variables and methods.

General

Boolean

Constant

None of the given

Question # 62

The use of comments should be minimized by making the code self-documenting by appropriate name choices and an

explicit logical structure.

TRUE

FALSE

Question # 63

Variables should be initialized where they are ——and they should be declared in the ——scope possible.

defined and smallest

declared and medium

defined and medium

declared and smallest

Question # 64

Unrelated variables should be declared in the same statement.

True

False

Question # 65

which of the following statements are same in output: 1) a = a >> 2 2) a = a / 4 3) a = a * 2

(1) and (3) only

(2) and (3) only

(1) and (2) only

All procduce the same result

Question # 66

Goto statements violate the idea of

object oriented code

structured code

control structure

repetition structure

Question # 67

MVC pattern was based on the ————— pattern.

Observer

Structural

Behavioral

None of given

Question # 68

Which one is correct?

double total = 0.5;

double total = .5;

double total = .50;

all of the given

Question # 69

Code should not be:

commented

indented

cryptic

aligned

Question # 70

Global variables in C++ should always be referred to by using the

:: operator

: operator

Without an operator

None of the given

Question # 71

_________ was the first pure Object Oriented language in which observer pattern was used in implementing its Model

View Controller pattern

Smalltalk

PASCAL

JAVA

C++

Question # 72

using proper paranthesis normally makes the code

easy to read

easy to understand

less ambigous

All of the given options

Question # 73

Which of the following shows a commented statement in C++

# Ans = first + second

// Ans = first + second

\\ Ans = first + second

/# Ans = first + second

Question # 74

The form for (;;) should be used for

nested loop

empty loop

more than 1000 iterations

Question # 76

Identifier names also play a significant role in enhancing the ——– of a program.

Writ ability

Readability

Reliability

Question # 77

It ensures that a class only has one instance and provides a global point of access to it.

Singleton Pattern

Observer Pattern

Real Pattern

None of the given

Question # 78

Names representing methods and functions should be—-and written in mixed case starting

with —–case.

Noun—lower

Verb—-lower

Noun —upper

Noun—-upper

Question # 79

—–provides a unified interface to a set of interfaces in a sub-system.

Observer Pattern

Singleton Pattern

Façade Pattern

All of the above

Question # 80

MVC stands for —————

Model View Controller

Modern ViewCenter

Model ViewCenter

Modern View Controller

Question # 81

A self documenting code is a code that explains itself without the need of comments and

extraneous documentation, like _______

Flowcharts

UML diagrams

Process-flow state diagrams

All of the given choices

Question # 82

Complex expressions:

Make the code easy to modify

Make the code difficult to modify

Make the code easy to understand

Does not effect understandablity

Question # 83

Comments should NOT be indented relative to their position in the code

TRUE

FALSE

Question # 84

—-Provides a unified interface to a set of interfaces in a sub-system

Observer Pattern

Singleton Pattern

Façade Pattern

All of the above

Question # 85

Vertical Partitioning is also know as

Balancing

Mutatin

Parallizing

Factoring

Question # 86

Façade Pattern provides a unified interface to a set of interfaces ina sub-system.

True

False

Question # 87

Which of the is/are among ten things which the basis template of GOF design pattern includes.

Problem

Context

Forces

All of the above

Question # 88

Thin Client Model places a heavy processing load on……

Only Server

Only Network

Both Server and Network

Neither server nor network

Question # 89

Zero install architecture does not need any installation on ____________.

Server side

Client side

Client & Server Side

None of the above

Question # 90

Data-Centered Architectural Style is also called …. 

Repository model

Client Server model

Sub system model

Reference model

Pak301 Useful MCQ’s Virtual University Of Pakistan

Question No: 1  ( Marks: 1 )  – Please choose one

Afghanistan, Azerbaijan, Turkmenistan, Uzbekistan, Kyrgyzstan, Kazakhstan joined the ECO (renamed of RCD) later on. Which one of the following joined it first?

Pakistan, Iran, Turkey

Pakistan, Egypt, Iran

Turkey, Egypt, Pakistan

Iran, Turkey, Egypt

Question No: 2  ( Marks: 1 )  – Please choose one

In which city the Second OIC conference 1974 was held?

Cairo

Makah

Rabat

Lahore

Question No: 3  ( Marks: 1 )  – Please choose one

Who did initiate the notion of Two Nation Theory?

Quaid-e-Azam

Sir Syed Ahmed Khan

Allama Iqbal

Maulana Abdul Kalam Azad

Question No: 4  ( Marks: 1 )  – Please choose one

In which document Muslims’ demand of Separate Electorate was accepted?

Rowlett Act

Lucknow Pact

Nehru Report

Fourteen Points 

Question No: 5  ( Marks: 1 )  – Please choose one

Who did lead The Simla Delegation?

Sir Syed Ahmed Khan

Nawab Mohsin-ul-Mulk

Sir Agha Khan

Wiqar-ul-Mulk

Question No: 6  ( Marks: 1 )  – Please choose one

How many seats, in the provincial assembly elections 1946, Muslim League won in Bengal Province?

79 out of 86 seats

113 out of 119 seats pg 28

28 out of 35 seats

17 out of 38 seats

Question No: 7  ( Marks: 1 )  – Please choose one

Who did move the resolution in Delhi Convention for a separate state?

Hussain Shaheed Suharwardy

Maulana Abdul Kalam Azad

Quaid-e-Azam M. A. Jinnah

Sardar Abdurrab Nishtar

Question No: 8  ( Marks: 1 )  – Please choose one

When did the govt conduct last census in Pakistan?

In 1991

In 2001

In 1998

In 2004

Question No: 9  ( Marks: 1 )  – Please choose one

Which element is used for atomic power generation?

Platinum

Uranium pg 60

Lithium

Potassium

Question No: 10  ( Marks: 1 )  – Please choose one

When did the rule of East India Company come into end in the British India?

In 1857

In 1858

In 1947

In 1948

Question No: 11  ( Marks: 1 )  – Please choose one

Why was the Mission send in 1945 called as Cabinet Mission Plane

It was recommended by the British Cabinet

It consisted of three British Cabinet’s members

It consisted of the members of Indian Cabinet

It was recommended by British Indian Cabinet

Question No: 12 ( Marks: 1 )  – Please choose one

which year the province of Sind was created?

In 1901

In 1935

In 1970

In1954

Question No: 13  ( Marks: 1 )  – Please choose one

What was the population of Pakistan according to the first census in 1951?

36.2 Million (34 million)

46.2 Million

65.3 Million

84.3 Million

Question No: 14  ( Marks: 1 )  – Please choose one

Which country accepted Pakistan’s existence as an independent and sovereign state first?

Iran

Syria

Turkey

Labia

Question No: 15  ( Marks: 1 )  – Please choose one

Who gave the Philosphical explanasion to ideology of pakistan?

Sir Syyad

Sir aaga Khan

Allama Iqbal

Quaid-e Azam

Question No: 16  ( Marks: 1 )  – Please choose one

Who was the 1st president of Muslim League?

Sir Aga Khan

Nawab smiullah

Waqar-ul malik

Sir Aga khan

Question No: 17  ( Marks: 1 )  – Please choose one

When did CH Rehmat Ali establish Pakistan National Movement?

In, 1933

In, 1948

In, 1040

In, 1951

Question No: 17  ( Marks: 1 )  – Please choose one

When did CH Rehmat Ali wrote his Novel “Now or Never”?

In, 1930

In, 1931

Question No: 18  ( Marks: 1 )  – Please choose one

Why poona pact was concluded in september 1932?

It was an agreement between congress and British

It was an agreement between congress and Muslim League

It was an agreement between congress and Lower Cast of India

It was an agreement between Muslim league and the british

Question No: 19  ( Marks: 1 )  – Please choose one

In 1933 NOW OR NEVER was written by?

Quaid-e Azam

CH rahmet Ali

Allama Iqbal

Hafiz jalandhri

Question No: 20  ( Marks: 1 )  – Please choose one

Which Act is called as Minto-Morley Reforms also?

Government of India Act, 1919

Government of India Act, 1909

Government of India Act, 1935

Indian Council Act of 1892

Question No: 21  ( Marks: 1 )  – Please choose one

For what purpose Sir Syed Ahmed Khan visited England in 1869?

To understand their political system

To understand their educational system

To settle there with his son

To pursue his higher education there

Question No: 22  ( Marks: 1 )  – Please choose one

When did Quaid-e-Azam join All India Muslim League?

In, 1906

In, 1920

In, 1909

In, 1913

Question No: 23  ( Marks: 1 )  – Please choose one

Who created the NWFP and when?

Congress, 1905

Muslim League, 1922

Lard Mountbatten, 1945

Lord Cuezon, 1900

Question No: 24  ( Marks: 1 )  – Please choose one

Iran and Turkey signed Regional Cooperation for Development (RCD) in

July, 1964

June, 1947

August, 1964

March, 1948

Question No: 25  ( Marks: 1 )  – Please choose one

Why did Sir Syed Ahmad Khan started Aligarh Movement?

To create brotherhood among the Muslim

For battle with India

For British Education challenges

to create awareness among the Muslims about their separate identity

Question No: 26  ( Marks: 1 )  – Please choose one

Who Form the Home Rule League in Bombay? And when?

On April 23, 1916 Bal Gangadhar Tilak formed The Home Rule League in Bombay.

On August 31, 1922 Allama Iqbal formed The Home Rule League in Bombay.

On Feb 30, 1933 CH Rehmat Ali formed The Home Rule League in Bombay.

On April 1, 1901 Lord Minto formed The Home Rule League in Bombay.

Question No: 27  ( Marks: 1 )  – Please choose one

Who was the president of Indian Home Rule League’?

Bal Gangadhar Tilak

Joseph Baptista

N.C. Kelkar

Annie Besant

Question No: 28  ( Marks: 1 )  – Please choose one

Who was the secretary of ‘Indian Home Rule League’?

Bal Gangadhar Tilak

Joseph Baptista

N.C. Kelkar

Annie Besant