wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Round 1

Total questions: 15

Worksheet time: 5mins

Name
Class
Date
1.

Which keyword is used for function in Python language?

a)

def

b)

definition

c)

function

d)

func

2.

What is #include<>?

a)

preprocessor directive

b)

inclusion directive

c)

file inclusion directive

d)

None of the mentioned

3.

Which of the following is the correct extension of the Python file?

a)

.python

b)

.py

c)

.pl

d)

.p

4.

Is python code compiled or interpreted?

a)

Python code is both compiled and interpreted

b)

Python code is neither compiled nor interpreted

c)

Python code is only compiled

d)

Python is only interpreted

5.

What is a static method in Java?

a)

A method that can be call on an instance of a class

b)

A method that cannot be overridden by subclasses

c)

A method that belongs to the class rather than to any specific instance

d)

A method that is defined inside another method

6.

What will be the value of the following Python expression?

4+3%5

a)

2

b)

0

c)

8

d)

7

7.

What is the numerical range of a char data type in java?

a)

0 to 256

b)

0 to 65535

c)

0 to 32767

d)

-128 to 127

8.

Which of the following cannot be checked in a switch-case statement?

a)

Character

b)

Integer

c)

Float

d)

enum

9.

what would be the equivalent pointer expression for referring the array element

a[i][j][k][l]

a)

((((a+i)+j)+k)+l)

b)

(((a+i)+j)+k+l)

c)

*(*(*(*(a+i)+j)+k)+l)

d)

((a+i)+j+k+l)

10.

In the above code snippet, what is "x"?

a)

character pointer

b)

Pointer to function

c)

pointer to char pointer

d)

pointer to char

11.

Extern keyword is used to declare a variable without defining it that is no memory is allocated. Where extern keyword is used?


a)

In library files

b)

In static function

c)

In function

d)

In Global variable

12.


What does the '->' operator do in C?

a)

It is used to access elements of array

b)

It is used to access elements of a structure through a pointer

c)

It is used to perform bitwise operations.

d)

It is used to declare a pointer

13.

“Stderr” is a standard error.

a)

Yes

b)

Standard error stream

c)

Standard error function

d)

Standard error function

14.

Choose the function that is most appropriate for reading in a multi-word string?

a)

strnset()

b)

scanf()

c)

strchr()

d)

gets()

15.

What is the special symbol permitted with in the Identifier name?

a)

$

(dollar symbol)

b)

@

(at symbol)

c)

_

(underscore symbol)

d)

.

(dot)