wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PRO-LETS-1ST-ROUND

Total questions: 45

Worksheet time: 23mins

Name
Class
Date
1.

WHAT IS THE OUTPUT OF THIS C++ CODE?

a)

0

b)

1

c)

2

d)

INVALID

2.

WHAT IS THE OUTPUT OF THIS C++ CODE

a)

ERROR

b)

4

c)

3

d)

2

3.

Exit function in 'c' is defined in which header file ?

a)

stdio.h

b)

conio.h

c)

stdlib.h

d)

iostream.h

4.

C++ programming language is discovered by____?

a)

Dennis M. Ritchie

b)

Bjarne Stroustrup

c)

James Gosling

d)

Guido van Rossum

5.

An uninitialized pointer in 'c' is called?

a)

void pointer

b)

null pointer

c)

wild pointer

d)

this pointer 

6.

int **ptr is ?

a)

pointer

b)

pointer to integer

c)

invalid

d)

pointer to pointer

7.

Recursive functions are executed in  ?

a)

in parallel sequence

b)

FIFO order

c)

LIFO order

d)

 Load Balancing    

8.

Which of the following data structures can handle updates and queries in log(n) time on an array?

a)

Linked list

b)

Stack

c)

Segment Tree

d)

Queue

9.

'new' keyword in c++ create memory space in ??

a)

stack memory

b)

heap memory

c)

text memory

d)

register

10.

Which function in C ++ is used to append one string at the end of another string ?

a)

strcat()

b)

stradd()

c)

strappend()

d)

strset()

11.

A binary search tree whose leftsubtree and rightsubtree differ in height by atmost 1 unit

a)

AVL Tree

b)

Red-Black Tree

c)

Full Tree

d)

Lemma Tree

12.

Choose the option below which is shown by function overriding

a)

Abstraction

b)

Encapsulation

c)

Polymorphism

d)

Inheritance

13.

Another name of the generic class is?

a)

Template class

b)

Final class

c)

Abstract class

d)

Efficient code

14.

Which of the following statements is correct?

a)

Pointer to derived class cannot be created.

b)

Base class pointer cannot point to derived class.

c)

Derived class pointer cannot point to base class.

d)

Pointer to base class cannot be created.

15.

Of the following data structures, which has a Last in First Out ordering? In other words, the one that

came in last will be the first to be popped.

a)

Stack

b)

Queue

c)

Vector

d)

Array List

16.

Which data structure is used in Breadth First Search of graph

a)

stack

b)

queue

c)

Linked List

d)

Heap

17.

What will be the final value of x in the following C code?

#include <stdio.h>

void main( ){

int x = 5 * 9 / 3 + 9;

}

a)

3.75

b)

3

c)

24

d)

6

18.

subsequence of string is____

a)

always continuous.

b)

always non continous

c)

may or may not be continous

d)

neither continous nor discontinues

19.

Which function in c++ allows accepting and reading single and multiple line strings from the input stream

a)

putline()

b)

setline()

c)

getline()

d)

fixline()

20.

Which of the following is not an OOPS concept?

a)

Encapsulation

b)

Polymorphism

c)

Exception

d)

Abstraction

21.

Worst Case Time complexity for bubble sort is ________?

a)

O(n)

b)

O(n^2)

c)

O(nlogn)

d)

O(2^n)

22.

Which of the following is NOT a characteristic of dynamic programming?

a)

Memoization, which involves storing the results of expensive function calls and reusing them

b)

Breaking a problem into smaller overlapping subproblems

c)

Solving problems in a sequential manner.

d)

Dynamic programming can be used for problems where the solution has an optimal substructure.

23.

Time Complexity of merge sort is_______?

a)

O(nlogn)

b)

O(n)

c)

O(n^2)

d)

O(1)

24.

In which form data is present at data link layer of osi model?

a)

packet

b)

frame

c)

bits

d)

segment

25.

IN(64-BIT) SYSTEM WHAT IS THE OUTPUT OF THIS CODE??

a)

0

b)

4

c)

8

d)

2

26.

In a microprocessor , the address of next executable instruction is stored in____

a)

stack pointer

b)

program counter

c)

accumulator

d)

Genral purpose register

27.

IN 64-BIT SYSTEM THE OUTPUT OF THIS CODE IS

a)

20

b)

0

c)

8

d)

2

28.

exception handling header file in c++

a)

#include <exception>

b)

#include <iostream>

c)

#include <cmath>

d)

#include<stdio.h>

29.

When fopen() is not able to open a file, it returns

a)

EOF

b)

NULL

c)

RUN TIME ERROR

d)

NONE OF THE ABOVE

30.

The only basic built-in immutable data structure in Python is

a)

LIST

b)

DATAFRAMES

c)

DICTIONARY

d)

TUPLE

31.

What is the full form of OSI?

a)

optical service implementation

b)

open service Internet

c)

open system interconnection

d)

operating system interface

32.

Which of the following entity does not occupy memory when created?

a)

class

b)

object

c)

variable

d)

pointer

33.

which of the following operator cannot be overloaded?

a)

( :: )

b)

( + )

c)

( - )

d)

( * )

34.

which of the given does not show compile time polymorphism?

a)

function overloading

b)

operator

overloading

c)

virtual function

d)

constuctor overloading

35.

Exception occur due to which type of error?

a)

compile time error

b)

run time error

c)

semantic error

d)

logical error

36.

vector in c++ stl is

a)

dynamic array

b)

static array

c)

list

d)

queue

37.

What’s happen if base condition is not defined in recursion ?

a)

stack overflow

b)

stack underflow

c)

none

d)

L-value Error

38.

predict the outout of this c++ code

a)

5 4 3 2 1

b)

1 2 3 4 5

c)

5 5 5 5 5

d)

1 1 1 1 1

39.

______________ is a set of one or more attributes taken collectively to uniquely identify a record.

a)

Primary Key

b)

Foreign key

c)

Super key

d)

Candidate key

40.

predict the output of this c++ code

a)

0

b)

9

c)

15

d)

10

41.

What is meant by the classes and objects that dependents on each other?

a)

Tight Coupling

b)

Cohesion

c)

Loose Coupling

d)

None of the above

42.

choose the correct option

a)

compile time error

b)

compile but not executed

c)

hello

d)

run time error

43.

What is the use of toupper() function in C?

a)

conversion from lowercase to uppercase

b)

conversion from uppercase tolowercase

c)

no function exist

d)

typecasting

44.

predict the output ??

a)

2, 1, 15

b)

1, 2, 5

c)

3, 2, 15

d)

2, 3, 20

45.

predict the output of this code

a)

42

b)

49

c)

7

d)

error