Font size
WorksheetsTechnical Test
Total questions: 50
Worksheet time: 50mins
Which of the following prompts the user to enter a price?
cin >> "What is the price? ";
cin << "What is the price? ";
cout << "What is the price? ";
cout >> "What is the price? ";
Of the following which one is correct to find smallest element in an array?
lowest = numbers[0];
for (count = 1; count < SIZE; count++)
{ if (numbers[count] != lowest) lowest = numbers[count]; }
lowest = numbers[0];
for (count = 1; count < SIZE; count++)
{ if (numbers[count] == lowest) lowest = numbers[count]; }
lowest = numbers[0];
for (count = 1; count < SIZE; count++)
{ if (numbers[count] > lowest) lowest = numbers[count]; }
lowest = numbers[0];
for (count = 1; count < SIZE; count++)
{ if (numbers[count] < lowest) lowest = numbers[count]; }
What statement to you use to print something to the screen?
cin
cout
if
return
Of the following, which one is a valid variable name?
return
2020ichc
ichc2_020
ichb 2020
What is the meaning of modular programming
data type of the value that function returns to the part of the program that called it
breaking a program up into smaller, manageable functions or modules
one single program without breaking it into module
none of the above
Which of the following is the default return value of functions in C++?
int
char
float
void
Where should default parameters appear in a function prototype?
Middle of the parameter list
To the leftmost side of the parameter list
Anywhere inside the parameter list
To the rightmost side of the parameter list
What is the meaning of using Functions in Menu-Driven Programs?
A function that implement user choices from menu
A function that is called during compile time
A function that is not checked for syntax errors
A function that is not checked for semantic analysis
It is a type of variable that can only be used within a function
parameter variables
local variable
global variable
constant variable
When we define the default values for a function?
When a function is defined
When a function is declared
When the scope of the function is over
When a function is called
it is the statement that indicates a function will be used.
function declaration
function definition
function call
function name
If an argument from the parameter list of a function is defined constant then _______________
It can be modified inside the function
It cannot be modified inside the function
Error occurs
Segmentation fault
Which of the following is important in a function?
Return type
Function name
Both return type and function name
The return type, function name and parameter list
It is a return type that means no value is returned.
void
int
double
char
Which of the below is linear data structure?
stack
queue
list
all the above
Is list is organising the data in a Linear way?
Yes
No
What is the purpose of inheritance?
Extendability
Reusability
Modifiability
All the above
In C++ derived class is otherwise called as________________
Child class
sub class
base class
both option 1 & 2
Which access specifier/s used to allow one class to access the features/properties of another class?
public
private
protected
both option 1 & 3
Many functions with similar names but different arguments in a program is called as_______________________________
function overloading
operator overloading
Both option 1 & 2
None of the above
Runtime polymorphism is achieved through ______________
function overriding
function overlapping
function overloading
none of the above
Which of the below keyword is acheives the following statement: "function defined in a base class and redefined in the derived class"
final
static
virtual
all the above
A class that contains a pure virtual function is known as _____________
virtual
Abstract class
Concrete class
None of the above
One of the best method for handles run-time errors is called as _____________________
Exception
Exception handling
Errors
None of the above
Consider a relation scheme R = (A, B, C, D, E, H) on which the following functional dependencies hold: {A–>B, BC–>D, E–>C, D–>A}. Identify the candidate keys of R.
(a)
In a schema with attributes A, B, C, D and E, following set of functional dependencies are given:
A->B
A->C
CD->E
B->D
E->A
Identify the functional dependencies which is NOT implied by the above set.
CD->AC
BD->CD
BC->CD
AC->BC
How can you change "Dibyarup" into "Sayan" in the "LastName" column in the Users table?
UPDATE User SET LastName = 'Dibyarup' INTO LastName = 'Sayan'
MODIFY Users SET LastName = 'Sayan' WHERE LastName = 'Dibyarup'
MODIFY Users SET LastName = 'Dibyarup' INTO LastName = 'Sayan'
UPDATE Users SET LastName = 'Sayan' WHERE LastName = 'Dibyarup'
Suppose the following functional dependencies hold on a relation U with attributes P, Q,R, S, and T:
P → QR
RS → T
Which of the following functional dependencies can be inferred from the above functional dependencies?
P → R
PS → T
R → T
PS → Q
Which of the following FD is redundant. For R(A,B,C), the set of FDs F(A-> AB, B-> C, A->B, C->B, B->A).
A->AB
B->C
B->A
None of the above
What are the prime attributes for the R = {A,B,C,D,E} with set of Fds Z={D -> E , CE-> A}
BCD
AE
CDE
CE
Consider the given table Loan_Records. Select the output of the following SQL query.
3
9
5
6
The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list?
Titles of the four most expensive books
Title of the fifth most inexpensive book
Title of the fifth most expensive book
Titles of the five most expensive books
Complexity of Binary Search for an array of n numbers is
log2n
nlog2n
n2
n
In a stack, if a user tries to remove an element from empty stack it is called
Underflow
Overflow
Garbage Collection
Empty collection
LIFO Data structure is
(a)
Binart search requires sorted aaray
Yes
No
Example of non linear data structure
Array
Tree
Queue
Stack
int nums[ ] =
{2, 3, 5, 8, 9, 11};
How would you access the fourth element in nums
nums[8]
nums[3]
nums(4)
nums(3)
Time complexity of matrix multiplication:
O(n)
O(log n)
O(n3)
O(n2)
What is the data structure used to perform recursion?
Array
Stack
Queue
Linked list
A binary search tree whose left subtree and right subtree differ in height by at most 1 unit is called
AVL tree
Red-black tree
Lemma tree
None of the above
Which of the following applications may use a stack?
A parentheses balancing program
Postfix expression Evaluation
Process priority by OS
None
An indexing operation
(A) Establishes an index for a file
(B) Sorts a file using two keys
(C) Sorts a file using a single key
(D) Both (b) and (c)
ROLLBACK in a database is ____ statement.
(A) DDL
(B) DML
(C) DCL
(D) TCL
