wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Technical Test

Total questions: 50

Worksheet time: 50mins

Name
Class
Date
1.

Which of the following prompts the user to enter a price?

a)

cin >> "What is the price? ";

b)

cin << "What is the price? ";

c)

cout << "What is the price? ";

d)

cout >> "What is the price? ";

2.

Of the following which one is correct to find smallest element in an array?

a)

lowest = numbers[0];

for (count = 1; count < SIZE; count++)

{ if (numbers[count] != lowest) lowest = numbers[count]; }

b)

lowest = numbers[0];

for (count = 1; count < SIZE; count++)

{ if (numbers[count] == lowest) lowest = numbers[count]; }

c)

lowest = numbers[0];

for (count = 1; count < SIZE; count++)

{ if (numbers[count] > lowest) lowest = numbers[count]; }

d)

lowest = numbers[0];

for (count = 1; count < SIZE; count++)

{ if (numbers[count] < lowest) lowest = numbers[count]; }

3.
which is not user defined data type
a)
class
b)
structure
c)
typedef
d)
int
4.
Which is features of CPP
a)
Encapsulation
b)
abstraction
c)
polymorphism
d)
all
5.
main(){ int i=11,j=10; cout<<i&&j; } Output of program
a)
1
b)
0
c)
11
d)
10
6.
Correct statement regarding Member function of class treat as inline function
a)
defined inside the class
b)
defined as static function
c)
defined outside the class
d)
none of the above
7.
Function prototype means
a)
functiion declaration
b)
function calling
c)
function definition
d)
All
8.
Which is not Property of array
a)
Static memory allocation
b)
Size must be give at the time declaration
c)
Non contigeous memory
d)
ALL
9.

What statement to you use to print something to the screen?

a)

cin

b)

cout

c)

if

d)

return

10.

Of the following, which one is a valid variable name?

a)

return

b)

2020ichc

c)

ichc2_020

d)

ichb 2020

11.

What is the meaning of modular programming

a)

data type of the value that function returns to the part of the program that called it

b)

breaking a program up into smaller, manageable functions or modules

c)

one single program without breaking it into module

d)

none of the above

12.

Which of the following is the default return value of functions in C++?

a)

int

b)

char

c)

float

d)

void

13.

Where should default parameters appear in a function prototype?

a)

Middle of the parameter list

b)

To the leftmost side of the parameter list

c)

Anywhere inside the parameter list

d)

To the rightmost side of the parameter list

14.

What is the meaning of using Functions in Menu-Driven Programs?

a)

A function that implement user choices from menu

b)

A function that is called during compile time

c)

A function that is not checked for syntax errors

d)

A function that is not checked for semantic analysis

15.

It is a type of variable that can only be used within a function

a)

parameter variables

b)

local variable

c)

global variable

d)

constant variable

16.

When we define the default values for a function?

a)

When a function is defined

b)

When a function is declared

c)

When the scope of the function is over

d)

When a function is called

17.

it is the statement that indicates a function will be used.

a)

function declaration

b)

function definition

c)

function call

d)

function name

18.

If an argument from the parameter list of a function is defined constant then _______________

a)

It can be modified inside the function

b)

It cannot be modified inside the function

c)

Error occurs

d)

Segmentation fault

19.

Which of the following is important in a function?

a)

Return type

b)

Function name

c)

Both return type and function name

d)

The return type, function name and parameter list

20.

It is a return type that means no value is returned.

a)

void

b)

int

c)

double

d)

char

21.

Which of the below is linear data structure?

a)

stack

b)

queue

c)

list

d)

all the above

22.

Is list is organising the data in a Linear way?

a)

Yes

b)

No

23.

What is the purpose of inheritance?

a)

Extendability

b)

Reusability

c)

Modifiability

d)

All the above

24.

In C++ derived class is otherwise called as________________

a)

Child class

b)

sub class

c)

base class

d)

both option 1 & 2

25.

Which access specifier/s used to allow one class to access the features/properties of another class?

a)

public

b)

private

c)

protected

d)

both option 1 & 3

26.

Many functions with similar names but different arguments in a program is called as_______________________________

a)

function overloading

b)

operator overloading

c)

Both option 1 & 2

d)

None of the above

27.

Runtime polymorphism is achieved through ______________

a)

function overriding

b)

function overlapping

c)

function overloading

d)

none of the above

28.

Which of the below keyword is acheives the following statement: "function defined in a base class and redefined in the derived class"

a)

final

b)

static

c)

virtual

d)

all the above

29.

A class that contains a pure virtual function is known as _____________

a)

virtual

b)

Abstract class

c)

Concrete class

d)

None of the above

30.

One of the best method for handles run-time errors is called as _____________________

a)

Exception

b)

Exception handling

c)

Errors

d)

None of the above

31.

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)  

32.

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.

a)

CD->AC

b)

BD->CD 

c)

BC->CD   

d)

AC->BC

33.

How can you change "Dibyarup" into "Sayan" in the "LastName" column in the Users table?

a)

UPDATE User SET LastName = 'Dibyarup' INTO LastName = 'Sayan'

b)

MODIFY Users SET LastName = 'Sayan' WHERE LastName = 'Dibyarup'

c)

MODIFY Users SET LastName = 'Dibyarup' INTO LastName = 'Sayan'

d)

UPDATE Users SET LastName = 'Sayan' WHERE LastName = 'Dibyarup'

34.

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? 

a)

P → R

b)

PS → T

c)

R → T

d)

PS → Q

35.

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)

A->AB

b)

B->C

c)

B->A

d)

None of the above

36.

What are the prime attributes for the R = {A,B,C,D,E} with set of Fds Z={D -> E , CE-> A}

a)

BCD

b)

AE

c)

CDE

d)

CE

37.

Consider the given table Loan_Records. Select the output of the following SQL query.

a)

3

b)

9

c)

5

d)

6

38.

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?

a)

Titles of the four most expensive books

b)

Title of the fifth most inexpensive book

c)

Title of the fifth most expensive book

d)

Titles of the five most expensive books

39.

Complexity of Binary Search for an array of n numbers is

a)

log2n

b)

nlog2n

c)

n2

d)

n

40.

In a stack, if a user tries to remove an element from empty stack it is called

a)

Underflow

b)

Overflow

c)

Garbage Collection

d)

Empty collection

41.

LIFO Data structure is

(a)  

42.

Binart search requires sorted aaray

a)

Yes

b)

No

43.

Example of non linear data structure

a)

Array

b)

Tree

c)

Queue

d)

Stack

44.

int nums[ ] =

{2, 3, 5, 8, 9, 11};

How would you access the fourth element in nums

a)

nums[8]

b)

nums[3]

c)

nums(4)

d)

nums(3)

45.

Time complexity of matrix multiplication:

a)

O(n)

b)

O(log n)

c)

O(n3)

d)

O(n2)

46.

What is the data structure used to perform recursion?

a)

Array

b)

Stack

c)

Queue

d)

Linked list

47.

A binary search tree whose left subtree and right subtree differ in height by at most 1 unit is called

a)

AVL tree

b)

Red-black tree

c)

Lemma tree

d)

None of the above

48.

Which of the following applications may use a stack?

a)

A parentheses balancing program

b)

Postfix expression Evaluation

c)

Process priority by OS

d)

None

49.

An indexing operation

a)

(A) Establishes an index for a file

b)

(B) Sorts a file using two keys

c)

(C) Sorts a file using a single key

d)

(D) Both (b) and (c)

50.

ROLLBACK in a database is ____ statement.

a)

(A) DDL

b)

(B) DML

c)

(C) DCL

d)

(D) TCL