Professional Documents
Culture Documents
Answer: efficiency
Answer: 0
5. Modules X and Y operate on the same input and output data, then the cohesion is
a. Sequential
b. Procedural
Answer: Communicational
dbl k = 0;
k = k + t + s;
}
a. O(B* Sqrt(B))
b. O(B*log(B))
c. O(B)
d. O(B*B)
Answer: O(B*B)
8. In unified modified language, the diagrams used in assessing class diagrams for precision
tendencies are called …………
a. Deployment diagrams
b. Object diagrams
c. Component diagrams
d. Package diagrams
12. In Unified Modelling language, the diagram which captures the system static structure and
provide foundation for other models is called ……………
a. Deployment diagrams
b. Component diagrams
c. Object diagrams
d. Class diagrams
14. Each time a defect gets detected and fixed, the reliability of a software product
a. remains constant.
b. cannot say anything.
c. decreases.
d. increases.
Answer: increases.
Answer: RE = P*L
struct node
int ele ;
};
}
a. the elements are sorted in non-descending order
b. the list has zero elements
c. the elements are sorted in non-ascending order
d. the elements are not sorted in any order
if(head==NULL)
head=tmp;
tail=tmp;
}
a. to insert elements into the list
b. to create a linked list
c. to create a node o
d. to check if the linked list is empty or not
Answer: design
20. Modifying the software to match changes in the ever changing environment is called
a. adaptive maintenance
b. perfective maintenance
c. corrective maintenance
d. preventive maintenance
21. Which class can have member functions without their implementation?
a. Abstract class
b. Default class
c. String class
d. Template class
22. The model that assumes that effort and development time are functions of product size
alone is
a. Intermediate COCOMO model
b. Detailed COCOMO model
c. All the three COCOMO models
d. Basic COCOMO model
23. If every requirement can be checked by a cost-effective process, then the SRS is
a. modifiable
b. complete
c. verifiable
d. traceable
Answer: verifiable
Answer: 20
Answer: Encapsulation
28. The feature of the object oriented paradigm which helps code reuse is
a. class.
b. inheritance.
c. object.
d. aggregation.
29. Changes made to an information system to add the desired but not necessarily the
required features is called
a. Adaptive maintenance.
b. Perfective maintenance.
c. Preventative maintenance.
d. Corrective maintenance.
31. Changes made to the system to reduce the future system failure chances is called
a. Corrective Maintenance
b. Perfective Maintenance
c. Preventive Maintenance
d. Adaptive Maintenance
33. When traversing a doubly linked list, how can traversal be performed?
a. In upwards direction
b. In forward direction only
c. both backward and forward direction
35. The tools that support different stages of software development life cycle are called:
a. CASE Tools
b. CAME tools
c. CAQE tools
d. CARE tools
38. If every requirement stated in the Software Requirement Specification (SRS) has only one
interpretation, SRS is said to be
Answer: unambiguous.
39. The problem that threatens the success of a project but which has not yet happened is a
a. error
b. failure
c. bug
d. risk
Answer: risk
40. Protection of member function and data member in a class is done by ……………….
a. Using Inheritance
b. Using Access specifiers
c. Using Abstraction
d. Using encapsulation
42. If the objects focus on the problem domain, then we are concerned with
a. Object Oriented Analysis & Design
b. None of the option mentioned
c. Object Oriented Analysis.
d. Object Oriented Design
dbl k = 0, l = 0;
k = k + richfield();
l = l + richfield();
48. In OOPs model such as C++ which among the option below reveals only important
information to users?
a. Encapsulation
b. Abstraction
c. Data hiding
d. Hiding complexity
Answer: Abstraction
49. The following C++ code snippet takes a singly- linked list of characters as a parameter and
reposition the elements in the lists. The function contains the characters A, B,C,D,E,F,G in
the given order. What will be the positions of the characters after the program compiles.
struct node
{
char data;
struct node* next;
};
void reposition (struct node* list)
{
struct node *x,y;
data temp;
y=list->next;
while(y)
{
temp=x->data;
x->data=y->data;
y->value=temp;
x=y->next;
y=x?x->next:0;
}
}
a. B, A, D, C, F, E, G
b. G, F ,E ,D ,C ,B ,A
c. C, D, A, E ,B ,F ,G
d. F, G ,E ,D ,A ,B ,C
Answer: B, A, D, C, F, E, G
51. In function point analysis, number of general system characteristics used to rate the
system are
a. 14
b. 10
c. 20
d. 12
Answer: 14
If (y==1)
return x;
else
perform_a_recursive_func(2,3);
a. 5
b. 4
c. 7
d. 3
Answer: 3
Answer: 3
void some_recursive_function();
some_recursive_function();
int main()
some_Recursive_function();
return 0;
}
a. It will give a runtime error
b. The code will be executed but it won’t show anything on the compiler afterwards
c. It will generate a random outcome
d. The code will run and afterwards it will stop because of a stack overflow
Answer: The code will run and afterwards it will stop because of a stack overflow
Answer: loop
58. What is the defualt type oof linkage that are available for identifires?
a. none of the option mentioned
b. internal
c. external
d. no linkage
Answer: external
Answer: Containers that implements data structures which can be accessed sequentially
Answer: static
62. Which of the following type does the container should define?
a. Vector type
b. Storage type
c. None of the option mentioned
d. Iterator type
Answer: Iterator
#include <iostream>
if(n == 0) return m;
int main()
return 0;
}
a. 3
b. None of the options
c. 4
d. 24
Answer: 3
66. Which one is used to refer to program elements in any translation units?
a. no linkage
b. none of the option mentioned
c. external linkage
d. internal linkage
#include <iostream>
*x = (*x) * --(*y);
int main ( )
square(&number, &number);
return 0;
}
a. 30
b. 9
c. 920
d. 870
Answer: 870
Answer: 842
Answer: std:map
72. Which are the parameters for the content of the buffer?
a. Two of these sections
b. closed
c. finish
d. start
Answer: 2
Answer: <iterator>
int a=23;
cout<<++a;
cout<<a;
a. 24 , 23
b. 23 , 24
c. 24 , 24
d. 23 , 23
Answer: 24 , 24
Answer: Recursion
Answer: extern
79. Which is used to use a function from one source file to another?
a. prototype
b. none of the option mentioned
c. code
d. declaration
Answer: prototype
Answer: #include<string>
class Example{
public: int a,b,c;
Example(){a=b=c=1;}
Answer: Constructor 4
Answer: std::bad_creat
Answer: std::bad_alloc
84. Which of the following below can perform conversions between pointers to related
classes?
a. static_cast
b. cast_static
Answer: static_cast
85. What is the implicit pointer that is passed as the first argument for nonstatic member
functions?
a. ‘Myself’ pointer
b. ‘self’ pointer
c. ‘this’ pointer
d. std::auto_ptr pointer
86. Which are the parameters for the content of the buffer?
a. start and finish
b. start
c. None of the option mentioned
d. finish
Answer: A shallow copy just copies the values of the data as they are.
88. Which of the following inserts an element at the beginning of the list?
a. public class insertFront(int n)
{
Node nd= new Node(data, head, head.getNext());
nd.getNext().setPrev(nd);
head.setNext(nd);
size++;
}
90. In which type of storage location are the vector members stored?
Answer: Number_of_elements
93. Which of the following functions below can be used Allocate space for array in memory?
a. malloc()
b. Realloc()
c. calloc()
d. calloc() and malloc()
Answer: When delete operator cannot delete the allocated (corrupted) object
p = getnode()
info (p) = 10
list = p
a. removal of a node
b. pop operation in stack
c. inserting a node
d. modifying an existing node
100. Which of the following is the most common way of implementing C++?
a. A C++ editor directly compiles and executes the program
b. C++ programs are directly compiled into native code by a compiler
c. C++ programs are first compiled to intermediate code by a compiler and then executed
by a virtual machine
d. C++ programs are interpreted by an interpreter
Answer: Virtual
105. Which of the following correctly describes the meaning of‘namespace’ feature in C++?
a. Namespaces refer to the memory space allocated for names used in a program
b. Namespaces provide facilities for organizing the names in aprogram to avoid name
clashes.
c. Namespaces refer to space between the names in a program
d. Namespaces refer to packing structure of classes in a program.
Answer: Namespaces refer to the memory space allocated for names used in a program
Answer: 10
107. Which of the following library function below by default aborts the program?
a. Terminate()
b. Abort()
c. end()
d. exit()
Answer: 3
109. What defines a general set of operations that will be applied to various types of data?
a. Function template
b. Template class and Class template
c. Template class
d. Class template
Answer: Records are loaded in ordered sequence defined by collating sequence by content of
the key
111. Which one of the following is not a valid reserved keyword in C++
a. Implicit
b. Private
c. Explicit
d. Public
Answer: Implicit
112. Which of the following is a valid destructor of the class name “Country”
Answer: Repositioning
114. Which of the following is not a valid conditional inclusions in preprocessor directives
a. #ifundef
b. #elif
c. #ifdef
d. #endif
Answer: #ifdef
Answer: xo
118. A stack is an abstract data structure which stores elements in a certain way. The
addition of new element to a stack is called……
a. Push
b. Pop
c. Create
d. Add
Answer: Push
119. What is the difference between overloaded functions and overridden functions?
a. Redefining a function in a friend class is called function overloading while Redefining a
function in a derived class is called as overridden function.
b. Redefining a function in a friend class is called function overriding while Redefining a
function in a derived class is called an overloaded function.
c. Overloading is a dynamic or run-time binding and Overriding is static or compile-time
binding
d. Overloading is a static or compile-time binding and Overriding is dynamic or run-time
binding
Answer: Redefining a function in a friend class is called function overriding while Redefining a
function in a derived class is called an/a overloaded function.
Answer: False
Answer: Protected
Answer: const members can be invoked only on const objects and not on nonconst objects
125. If class A is friend of class B and if class B is friend of class C, which of the following is
true?
a. Class C is friend of class A
b. Class A is friend of class C
c. Class A and Class C do not have any friend relationship
d. None of the option mentioned
126. In a group of nested loops, which loop is executed the most number of times?
a. the innermost loop
132. If a member needs to have unique value for all the objects of that same class, declare
the member as
a. Static variable inside class
b. Dynamic variable inside class
c. Local variable inside constructor
d. Global variable outside class
133. Which of the following is the most general exception handler that catches exception of
any type?
a. catch()
b. catch(std::exception)
c. catch(…)
d. catch(std::any_exception)
Answer: catch(std::exception)
134. What is the Difference between struct and class in terms of Access Modifier?
a. By default all the struct members are public while by default class members are
protected.
b. By default all the struct members are protected while by default class members are
private.
c. By default all the struct members are private while by default class members are public.
d. By default all the struct members are public while by default class members are private.
Answer: By default all the struct members are protected while by default class members are
private., By default all the struct members are public while by default class members are
private.
135. Which one of the following is not a fundamental data type in C++
a. wchar_t
Answer: float
137. Vtables
a. creates a dynamic table per class
b. creates a dynamic table per object
c. creates a static table per object
d. creates a static table per class
138. Which looping process is best used when the number of iterations is known?
a. for
b. all looping processes require that the iterations be known
c. while
d. do-while
Answer: for
a. 0
b. Hello World
c. Syntax error
d. Hello World!
#define MAX 12
Struct STACK
{
Int arr [MAX];
Int top = -1;
}
If the array index starts at 0 ,maximum top value that will not cause an overflow is?
a. 12
b. 10
c. 13
d. 8
Answer: 10
Answer: It is cost-effective
142. Which of the following is the most preferred way of throwing and handling
exceptions?
a. Throw by reference and catch by reference.
b. Throw the pointer value and provide catch for teh pointer type.
c. Throw by value and catch by reference.
d. Throw by value and catch by value
143. Which of the STL containers store the elements contiguously (in adjacent memory
locations)?
a. std::set
Answer: std::map
144. C++ provides facility to specify that the compiler should match function calls with the
correct definition at the run time. This process is called as
a. Dynamic Binding
b. Static binding
Answer: i to be incremented by 1
Answer: A deep copy just copies the values of the data as they are.
void deleteItem(){
if(head==NULL){
cout<<"List is empty!"<<endl;
return;
cout<<head->num<<" is removed."<<endl;
head=head->next;
150. How many copies of a class static member are shared between objects of the class?
a. No memory is allocated for static members of a class
b. A copy of the static member is shared by all objects of a class
c. A copy is created only when at least one object is created from that class
d. A copy of the static member is created for each instntiation of the class
Answer: A copy of the static member is created for each instntiation of the class
Answer: 20 10
Answer: ++*ptr
153. Which of the following functions will delete the first element from a linked list?
a. static Node delete(Node head)
{
if (head == null)
return null;
Node temp = head;
head = head.next;
return head;
}
b. static Node delete(Node head)
{
if (head == null)
return null;
if (head.next == null) {
return null;
}
c. static Node delete(Node head)
{
154. Which looping process checks the test condition at the end of the loop?
a. for
b. no looping process checks the test condition at the end
c. while
d. do-while
Answer: for
Answer: culmination
Answer: abstract
159. If there is more than one statement in the block of a for loop, which of the following
must be placed at the beginning and the ending of the loop block?
a. parentheses ( )
b. braces { }
c. brackets [ ].
d. arrows < >
Answer: braces { }
160. Which of the following language feature is not an access specifier in C++?
a. private
b. C protected
c. public
d. internal
162. Which of the following members do get inherited but become private members in
child class
a. Protected
b. All of the option mentioned
c. Private
d. Public
Answer: Private
Answer: Namespaces
166. The code snippet below shows a stack being initialized. What is the maximum number
of elements that this stack will store until overflow?
#include <stdio.h>
#define MAXSIZE 5
struct stack
int stk[MAXSIZE];
int top;
};
STACK s;
a. 10
b. 5
c. Infinity
d. 7
Answer: 5
167. If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const
member function)?
a. X* const
b. const X* const
c. X&
d. X*
169. Which of the STL containers store the elements contiguously (in adjecent memory
locations)?
a. std::vector
b. std::map
c. std::list
d. std::set
Answer: std::map
173. Minimum number of temporary variable needed to swap the contents of 2 variables
is:
a. 1
b. 2
c. 0
d. 3
Answer: 0
Answer: i = i + i;
177. What happens when we try to remove an element from an empty stack?
a. Underflow
b. Overflow
c. Null collection
d. It will return 0
Answer: Underflow
178. When class B is inherited from class A, what is the order in which the constructers of
those classes are called
a. Class B first Class A next
b. Class A’s only as it is the parent class
c. Class A first Class B next
d. Class B’s only as it is the child class
Answer: By providing at least one pure virtual method (function signature followed by ==0;) in
a class
180. Value of ix+j, if i,j are integer type and ix long type would be
a. long integer
b. double precision
c. integer
d. float
Answer: float
Answer: A digit
185. The two types of file structure existing in VSAM file are
a. Key sequence structure, exit sequenced structure
b. Key sequenced structure, entry sequenced structure
c. Entry sequence structure, exit sequenced structure
d. None of the option mentioned
Answer: language
189. Which of the following is not part of the Object Oriented Design?
a. Object diagrams
b. Polymorphism
c. Encapsulation
d. Inheritance