WorksheetsNeo Coding Round 1 Set 3
Total questions: 25
Worksheet time: 13mins
Name
Class
Date
1.
Select the following which shows the correct constructor.
a)
()class_name
b)
-class_name
c)
class_name()
d)
~class_name()
2.
Which of the following is a correct identifier in C++?
a)
VAR_1234
b)
7var_name
c)
7VARNAME
d)
$var_name
3.
In a graph if e=[u,v], then u and v are called
a)
endpoints of e
b)
adjacent nodes
c)
neighbours
d)
all
4.
Asymptotic complexity of linear search with array in average case is
a)
O(1)
b)
O(n)
c)
O(n/2)
d)
log n
5.
Shell sort is also known as
a)
diminishing decrement sort
b)
diminishing increment sort
c)
partition exchange sort
d)
diminishing insertion sort
6.
Which of the following methods can be used to stop method overriding?
a)
final
b)
static
c)
default
d)
None of the above
7.
Which keyword is used for function in Python language?
a)
Function
b)
def
c)
Fun
d)
Define
8.
What function is used to append a character at the back of a string in C++?
a)
push()
b)
insert()
c)
append()
d)
push_back()
9.
Why is reusability a desirable feature?
a)
Reduces the compilation time
b)
Lowers maintenance cost
c)
Decreases the testing time
d)
None
10.
What will be the value of the following Python expression? 4 + 3 % 5
a)
7
b)
2
c)
4
d)
1
11.
What is encapsulation in OOP?
a)
It is a way of combining various data members and member functions that operate on those data members into a single unit
b)
It is a way of combining various data members and member functions into a single unit which can operate on any data
c)
It is a way of combining various data members into a single unit
d)
It is a way of combining various member functions into a single unit
12.
When recursive call is the last statement in the function, it is called………………….
a)
End Recursion
b)
Tail Recursion
c)
Base Case
d)
Indirect Recursion
13.
C++ Inheritance relationship is?
a)
Association
b)
Is-A
c)
Has-A
d)
None of above
14.
Which of the following is a linear data structure?
a)
AVL Trees
b)
Graphs
c)
Arrays
d)
Binary Trees
15.
_____ is the relationship between a class and one or more refined versions of it.
a)
Special inheritance
b)
Generalization
c)
Inheritance
d)
None
16.
What will happen if null pointer is converted to boolean___________.
a)
The boolean value is evaluated to true
b)
The boolean value is evaluated to false
c)
errror is raised
d)
None of these
17.
A static local variable is used to
a)
make a variable visible to several functions.
b)
make a variable visible to only one function.
c)
retain a value when a function is not executing.
d)
B and C
18.
int ++a = 100;
System.out.println(++a);
a)
101
b)
Compile error as ++a is not valid identifier
c)
100
d)
NONE
19.
The function abort() is declared in the header file
a)
<math.h>
b)
<iostream.h>
c)
<stdio.h>
d)
<stdlib>
20.
The term "Data independence" refers to____
a)
Data is defined separately and not included in the programs
b)
Programs are not dependent on the logical attributes of the data
c)
Programs are not dependent on the physical attributes of the data
d)
Both B & C
21.
Which is correct syntax ?
a)
myfile:open ("example.bin", ios::out);
b)
myfile.open ("example.bin", ios::out);
c)
myfile::open ("example.bin", ios::out);
d)
myfile.open ("example.bin", ios:out);
22.
The name of the operator function that overloads the / symbol is________.
a)
operator /()
b)
/op()
c)
/ operator()
d)
op/()
23.
The class___________provides the facilities for formatted and unformatted input.
a)
istream
b)
istream_withassign
c)
iostream
d)
streambuf
24.
Which of the following can be used to extract or filter the data & information from the data warehouse?
a)
Data redundancy
b)
Data recovery tool
c)
Data mining
d)
Both B and C
25.
Identify the infinite loop
a)
for(; ;)
b)
for(i=0; i<1; i--)
c)
for(int i=0; ; i++)
d)
All of the above
100 %
