wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

BRAIN BUSTERS (ROUND2)

Total questions: 20

Worksheet time: 30mins

Name
Class
Date
1.

What is the output of the following code snippet?

#include <stdio.h>

int main() {

int a[] = {1, 2, 3, 4};

int sum = 0;

for(int i = 0; i < 4; i++) {

sum += a[i];

}

printf("%d", sum);

return 0;

}

a)

10

b)

20

c)

15

d)

12

2.

what is the average Time Complexity of binary search using recursion?

a)

O(nlogn)

b)

O(logn)

c)

O(n)

d)

O(n^2)

3.

Which one of the following is not the application of the stack data structure

a)

String reversal

b)

Recursion

c)

Backtracking

d)

Asynchronous data transfer

4.

What will be the output of the following code snippet?

#include <stdio.h>

void solve() {

int first = 10, second = 20;

int third = first + second;

{

int third = second - first;

printf("%d ", third);

}

printf("%d", third);

}

int main() {

solve();

return 0;

}

a)

10 30

b)

30 10

c)

10 20

d)

20 10

5.

Which of the following is known as a set of entities of the same type that share same properties , or attributes?

a)

Relation set

b)

Tuples

c)

Entity set

d)

Entity Relation Model

6.

Which of the following is not a valid C variable name?

a)

int number;

b)

float rate;

c)

int variable_count;

d)

int $main;

7.

Which of the following is not a function of the database?

a)

Managing stored data

b)

Manuplating data

c)

Security for stored data

d)

Analysing code

8.

Which of the following methods can be used to search an element in a linked list ?

a)

Iterative linear search

b)

Iterative Binary search

c)

Recursion Binary search

d)

Normal binary search

9.

what is the best case and worst case complexity of ordered linear search?

a)

O(nlogn),O(logn)

b)

O(logn),O(nlogn)

c)

O(n),O(1)

d)

O(1),O(n)

10.

which data structure is used for implementing recusion?

a)

Queue

b)

Stack

c)

Array

d)

List

11.

Which of the following is not the utility of DBMS?

i) Backup ii) Loading iii) Process Organization iv) File organization

a)

i, ii, and iv only

b)

i, ii and iii only

c)

i, iii and iv only

d)

All i, ii, iii, and iv

12.

Procedural language among the following is __________

a)

Domain relational calculus

b)

Tuple relational calculus

c)

Relational algebra

d)

Query language

13.

What will be the output of the following code snippet?

#include <stdio.h>

void solve() {

int a[] = {1, 2, 3, 4, 5};

int sum = 0;

for(int i = 0; i < 5; i++) {

if(i % 2 == 0) {

sum += *(a + i);

}

else {

sum -= *(a + i);

}

}

printf("%d", sum);

}

int main() {

solve();

return 0;

}

a)

2

b)

15

c)

syntax Error

d)

3

14.

this extra information is usually maintained in the form of a ____ at the client

a)

cookie

b)

history

c)

remainder

d)

none

15.

which data structure is needed to convert infix notation to postfix notation?

a)

branch

b)

tree

c)

queue

d)

stack

16.

the prefix form of A-B/(C*D^E) is?

a)

-/*^ACBDE

b)

-ACBD*^DE

c)

-A/B*C^DE

d)

-A/BC*^DE

17.

Which of the following is not an application of artificial intelligence?

a)

computer vision

b)

Natural Language Processing

c)

Database management system

d)

Digital Assistants

18.

How does an AI agent interacts with its environment?

a)

Using sensors and Percives

b)

Using only sensors

c)

using only percivers

d)

None of the above

19.

what will be the number of passes to sort the elements using insrtion sort?

14,12,16,6,3,10

a)

6

b)

5

c)

7

d)

1

20.

which of the following devices provides the communication between a computer and outer world?

a)

compact

b)

i/o

c)

drivers

d)

storage