wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

technical round

Total questions: 90

Worksheet time: 45mins

Name
Class
Date
1.

What is the output of this statement "printf("%d", (a++))" ?

a)

The value of (a + 1)

b)

The current value of a

c)

Error message

d)

Garbage

2.

In the C language, the constant is defined _______.

a)

Before main

b)

After main

c)

Anywhere, but starting on a new line.

d)

None of the these.

3.

How many times will the following loop execute?

for(j = 1; j <= 10; j = j-1)

a)

Forever

b)

Never

c)

0

d)

1

4.

Which one of the following is a loop construct that will always be executed once?

a)

for

b)

while

c)

switch

d)

do while

5.

What will the result of len variable after execution of the following statements?

int len;

char str1[] = {"39 march road"};

len = strlen(str1);

a)

11

b)

12

c)

13

d)

14

6.

Which statement can print \n on the screen?

a)

printf("\\n");

b)

printf("n\");

c)

printf("n");

d)

- printf('\n');

7.

C is _______ type of programming language ?

a)

Object Oriented

b)

Procedural

c)

Bit level language

d)

Functional

8.

C language was invented to develop which Operating System?

a)

Android

b)

Linux

c)

Ubuntu

d)

Unix

9.

A pointer is a memory address. Suppose the pointer variable has p address 1000, and that p is declared to have type int*, and an int is 4 bytes long. What address is represented by expression p + 2?

a)

1002

b)

1004

c)

1008

d)

1006

10.

How many bytes does "int = D" use?

a)

0

b)

1

c)

2 or 4

d)

8

11.

void main()

{

​​​int color=2;

​​​switch(color)

​​​{

​​​​case 0: printf("black");

​​​​case 1: printf("blue");

​​​​case 2: printf("Green");

​​​​case 3: printf("aqua");

​​​​default:printf("other");

​​​}

}

(a)  

12.

Which of the function cannot be a structure member?

a)

Another structure

b)

Function

c)

Array

d)

None

13.

Which of the following is an invalid assignment operator?

a)

A%=10;

b)

A/=10;

c)

A|=10

d)

none

14.
a)

6

b)

7

c)

8

d)

9

15.

find output

a)

22

b)

23

c)

24

d)

25

16.

void main()

{

​​​int color=2;

​​​switch(color)

​​​{

​​​​case 0: printf("black");

​​​​case 1: printf("blue");

​​​​case 2: printf("Green");

​​​​case 3: printf("aqua");

​​​​default:printf("other");

​​​}

}

(a)  

17.

C++ is a _______ programming language

a)

Structured Query Language

b)

Scripting language

c)

Procedural

d)

Object Oriented

18.

Which of the following is not an OOPS concept?

a)

Encapsulation

b)

Pointers

c)

Inheritance

d)

Polymorphism

19.

//What is the value of a in below program?


int main()

{

int a, b=45;

a = 90/b;

return 0;

}

a)

90

b)

2

c)

45

d)

0

20.

Exception handling in C++ is used to handle

a)

Runtime Errors

b)

Logical Errors

c)

Syntax Errors

d)

Compilation error

21.

One of the following functions is not used with Python String

a)

Split

b)

Remove

c)

print

d)

Replace

22.

Choose the correct syntax of the split function:

a)

x.split[]

b)

split(x)

c)

x.split(",", 3)

d)

X.SPLIT(",", 3)

23.

Choose the correct syntax of the replace function:

a)

x.Replace(x)

b)

x.replace(y)

c)

x.replace(3,x)

d)

x.replace("j","3")

24.

Choose the correct code to print line of 10 stars using repetition operation:

a)

print("**********")

b)

print("*"*10)

c)

print("*"^10)

d)

print("*"+10)

25.

The correct syntax of the len function for string x:

a)

x.len()

b)

len[x]

c)

LEN[]

d)

len(x)

26.

The correct syntax for converting the string x to uppercase is :

a)

X.upper()

b)

upper(x)

c)

x.UPPER[ ]

d)

x.upper()

27.

The correct syntax for converting the string myname to lowercase is :

a)

myNAME.lower[ ]

b)

myname.lower( )

c)

myname.upper( )

d)

myname_lower(12 )

28.

To remove the spaces present at start and end of the string, you can use

a)

split()

b)

len()

c)

strip()

d)

remove()

29.

Let x= "Python", the output of print(x.upper()) is

a)

python

b)

PYTHON

c)

_PYTHON

d)

"PYTHON"

30.

Let x= "java", the output of Print(x.replace("j","L") ) is

a)

LAVA

b)

Error

c)

lava

d)

Lava

31.

Let x= "python is a high level language", the output of print(x[5].replace("n","*")) is

a)

pytho* is a high level language

b)

python is a high level language

c)

*

d)

Error

32.

Let x= "python is a high level language", the output of print(len(x[-1])) is

a)

1

b)

31

c)

Error

d)

25

33.

Let x= "Python is a high level language", the output of print(x.replace(x[-3],"3")) is

a)

Error

b)

Python is 3 high level l3ngu3ge

c)

Python is a high l3v3l languag3

d)

Python is a high level language

34.

Let x= "Python is a high level language", the output of print(x[7].upper()) is

a)

Python is a high level language

b)

PYTHON IS A HIGH LEVEL LANGUAGE

c)

I

d)

S

35.

Let x= "Python is a high level language", the output of print(x[2].upper()+x[3].lower()+x[-1]) is

a)

THE

b)

The

c)

ThE

d)

the

36.

Let x= "Python is a high level language", the output of print(x[-4].upper()+x[8]+x[-1]) is

a)

Use

b)

Age

c)

USE

d)

Error

37.

Choose the correct python program that has the output 6

a)

print(len("Python"))

b)

Print(len("Python"))

c)

x= "Python"

print(x.replace("Python","6"))

d)

Both a and c

38.

Let x= "Python is a high level language", the output of

print(x.split("i", 2))

a)

['Pyth', 'n is a high level language']

b)

['Python is ', ' high level l', 'nguage']

c)

['Python ', 's a h', 'gh level language']

d)

Error

39.

Let x= "Python", the output of

print(x[0])

print(x[1])

print(x[2])

a)

PYT

b)

P

y

t

c)

T

h

o

d)

n

oh

40.

Let x= "Python", the output of

print(x[0])

print(x[-1])

print(x[-2])

a)

P

N

O

b)

p

O

n

c)

t

h

y

d)

P

n

o

41.

To display something on the screen, use this command:

a)

print()

b)

Print()

c)

screen()

d)

write()

e)

display()

42.

To display the following on screen

Hello World!

the following command should be used:

a)

print(Hello World!)

b)

print("Hello World!")

c)

print("Hello World" + !)

d)

print"(Hello World!)"

43.
Which symbol do we use if we want to add a comment to our code?
a)
@
b)
#
c)
*
d)
&
44.
What is a variable?
a)
A box(memory location) where you store values
b)
a type of graphics
c)
Data type
d)
a type of memory
45.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
46.
What will be the output?
name = 'Dave'
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
47.

Which operator performs a division?

a)

-

b)

+

c)

/

d)

*

48.

Which operator checks if a value is equal to another value?

a)

+

b)

=

c)

==

d)

!=

49.

Which operator checks if a value is not equal to another value?

a)

==

b)

+=

c)

!=

d)

=

50.
If you want more than one option for your code, what do you use (after if)?
a)
elif
b)
else
c)
ifif
51.
The character that must be at the end of the line for if, while, for etc.
a)
:
b)
;
c)
.
d)
,
52.
Converts a number to a string
a)
str()
b)
int()
c)
parseInt()
d)
convert
53.
a data type than can have one of two values: True or False
a)
boolean
b)
variable
c)
modulo
d)
interpreter
54.
What is the word (command) used to display numbers and text on the screen?
a)
print
b)
input
c)
output
d)
command
55.
Which of the following is a float?
a)
new_var = 1234
b)
new_var = True
c)
new_var = 1.234
d)
new_var = "True"
56.
Which of the following is not a string?
a)
new_var = "True"
b)
new_var = "3123"
c)
new_var = "3.123"
d)
new_var = False
57.
Numbers with a decimal point belong to a type called...
a)
pointing
b)
integers
c)
decimal
d)
float
58.
When you have an error in your code what is the term to summarise finding and fixing that error?
a)
Error checking
b)
Debugging
c)
Syntax finder
d)
Error finder
59.
Why is it called 'Python'?
a)
The guy who created it loves snakes
b)
The guy who created it loves Monty Python films
c)
You can create a game on python called snake
d)
It was created by someone called Mr Python
60.
Python is an example of a....
a)
Text-based programming language
b)
Object orientated programming language
c)
language written in java script
d)
Visual-based programming language
61.

Which of the following is correct?

a)

Comments are for programmers for better understanding of the program.

b)

Python Interpreter ignores comment.

c)

You can write multi-line comments in Python using triple quotes, either ''' or """.

d)

All of the above

62.

In the following code, n is a/an _______?


n = '5'

a)

integer

b)

string

c)

tuple

d)

operator

63.

What is used to take input from the user in Python?

a)

cin

b)

scanf()

c)

input()

d)

<>

64.

Python language was developed in what year?

a)

1985

b)

2001

c)

1991

d)

1820

65.

Is python an interpreter or compiler programming language?

a)

Compiler

b)

Interpreter

66.

Python is uses braces to block off code

a)

True

b)

False

67.

Python uses indentation to block code into chunks

a)

True

b)

False

68.

Python correct naming convention for constants is?

a)

firstName

b)

First_Name

c)

FIRST_NAME

d)

firstname

69.

Python correct naming convention for variables is?

a)

new_user25

b)

NewUser25

c)

25_new_user

d)

25NewUser

e)

NEWUSER25

70.

What output will the console show, if 15 and 30 are entered by the user?

a)

Syntax error

b)

The sum of the two numbers - 45

c)

The concatenation of the two numbers - 1530

d)

Complier error

71.

What result will display in the shell if 15 and 20 is entered by the user?

a)

"num1 + num2"

b)

1520

c)

35

72.

What datatype will the answer be if the user enters 15 and 30?

a)

Integer

b)

String

c)

Boolean

d)

Float

73.

Which one will display when this code is run?

a)
b)
c)
d)
74.
The number or word we give to a variable
a)
Value
b)
Bug
c)
Information
d)
Text
75.
What is the word (command) used to display numbers and text on the screen?
a)
print
b)
input
c)
output
d)
command
76.

A: Good morning.______________________?

B: It is eight o'clock.

a)

What time do you go to school?

b)

When do you play soccer?

c)

What time is it?

d)

How do you go to school?

77.

I have been living in Madrid ......

a)

since ten years.

b)

ten years ago.

c)

for ten years.

d)

ten years.

78.

This is the ...... thing I have ever done.

a)

harder

b)

hardest

c)

hard

d)

more hard

79.

Have you finished with the newspaper ......

a)

still?

b)

already?

c)

now?

d)

yet?

80.

If I want to pass my exam, I ...... study harder.

a)

will have to

b)

would have to

c)

had to

d)

want to

81.

Michael is ............ his sister.

a)

not so clever than

b)

not as clever than

c)

not as clever as

d)

not so clever as

82.

...... people eat healthy food.

a)

Very little

b)

Very less

c)

Very least

d)

Very few

83.

Choose the correct sentence

a)

We told him going to the doctor.

b)

We told him to go to the doctor.

c)

We told him he go to the doctor.

d)

We told that he goes to the doctor.

84.

He hasn't got ......time for a coffee.

a)

many

b)

few

c)

a lot

d)

much

85.

She's married to a doctor, doesn't she?

a)

Correct sentence

b)

Incorrect sentence

86.

The duty of the lighthouse keeper is to keep the light burning no matter what happens, so ships will be warned of the presence of dangerous rocks. If a shipwreck should occur near the lighthouse, even though he would like to aid in the rescue of it's crew and passengers, the lighthouse keeper must....

a)

Stay at his light

b)

Rush to their aid

c)

turn out the light

d)

quickly sound the siren

87.

In certain areas, water is so scarce that every attempt is made to conserve it. For instance, on one oasis in the Sahara Desert, the amount of water necessary for each date palm is carefully determined. How much water is each tree given?

a)

No water at all

b)

Exactly the amount required

c)

Water only if it is healthy

d)

Water on alternate days

88.

Twenty-five percent of all household burglaries can be attributed to unlocked windows or doors. Crime is the result of opportunity plus desire. To prevent crime, it is each individual's responsibility to ....

a)

Provide the opportunity

b)

Provide the desire

c)

prevent the opportunity

d)

prevent the desire

89.

From a building designer's standpoint, three things make a home livable are the client, the building site and the amount of money the client has to spend. According to the passage, to make a home livable......

a)

The prospective piece of land makes little difference

b)

It can be built on any piece of land

c)

The design must fit the owner's income and site

d)

The design must fit the designer's income

90.

A business letter has six parts instead of five. The extra part is called the inside address. It is placed just above the salutation. The other five parts are just the same as for the friendly letter.

What is the extra part of the business letter?

a)

The salutation

b)

A friendly letter

c)

The inside address

d)

The six parts instead of five