wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Code Blitz 40

Total questions: 21

Worksheet time: 11mins

Name
Class
Date
1.

Who developed Linux OS?

a)

Richard Stallman

b)

Linus Torvalds

c)

Bill Gates

d)

Steve Jobs

2.

Which type of memory is non-volatile?

a)

RAM

b)

ROM

c)

Cache

d)

Register

3.

Which protocol is used to send emails?

a)

SMTP

b)

HTTP

c)

FTP

d)

POP3

4.

If 1010 in binary is converted to decimal, what is the value?

a)

8

b)

10

c)

12

d)

14

5.



Which tech company created the first commercial quantum computer?

a)

GOOGLE

b)

IBM

c)

MICROSOFT

d)

INTEL

6.

What does NFT stand for?

a)

Non-Fungible Token

b)

New Future Technology

c)

Non-Financial Transaction

d)

Neural Function Tracker

7.

How many bits are in a byte?

a)

4

b)

8

c)

16

d)

32

8.

Which of the following is NOT a data type in JavaScript?

a)

BOOLEAN

b)

FLOAT

c)

STRING

d)

UNDEFINED

9.

What will print(3**3) output in Python?

a)

9

b)

21

c)

27

d)

18

10.

Which data structure uses LIFO (Last In, First Out)?

a)

QUEUE

b)

STACK

c)

ARRAY

d)

LINKED LIST

11.

What is the purpose of a hash function in a hash table?

a)

To sort elements

b)

To map keys to indices

c)

To store duplicate values

d)

To create a queue

12.

What does HTML stand for?

a)

HyperText Makeup Language

b)

Hyper Transfer Machine Language

c)

HyperText Markup Language

d)

Hyperlink Text Management Language 

13.

What does the following C code do?

               int fun(int n) {

    if (n == 0) return 1;

    return n * fun(n - 1);

}

a)

Calculates the sum of numbers from 1 to n

b)

Calculates factorial of n

c)

Prints numbers from 1 to n

d)

Generates Fibonacci numbers

14.

Identify the error in the following C code:

#include <stdio.h>

int main() {

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

printf("%d", arr[5]);

return 0; }

a)

No error

b)

Array index out of bounds

c)

Syntax error

d)

Infinite loop

15.

What will happen when the following Python code is executed?

               print(1 == "1")

a)

True

b)

False

c)

Error

d)

None

16.

What will the following Python code output?

list1 = [1, 2, 3]

list2 = list1

list2.append(4)

print(list1)

a)

[1, 2, 3]

b)

[1, 2, 3, 4]

c)

[4, 2, 3]

d)

Error

17.

What will be the output of this C program?

#include <stdio.h>

int main()

{ int x = 10;

printf("%d %d %d", x++, x++, x);

return 0; }

a)

10 11 12

b)

12 11 10

c)

Undefined behavior

d)

10 10 10

18.

What does the following JavaScript function return?

function test() {

return typeof arguments;

} console.log(test());

a)

Object

b)

Array

c)

Undefined

d)

Function

19.

What will the output of this Python function be?

def fun(a, b=[]):

b.append(a)

return b

print(fun(1))

print(fun(2))

print(fun(3))

a)

[1] [2] [3]

b)

[1] [1, 2] [1, 2, 3]

c)

Error

d)

None

20.

What will be the output of the following Java code?

public class Test {

public static void main(String[] args) {

System.out.println(10 + 20 + "Hello" + 10 + 20);

}

}

a)

30Hello30

b)

30Hello1020

c)

Hello102030

d)

Compilation error

21.

What will be the output of this C++ code?

#include <iostream>

using namespace std;

int main() {

int arr[] = {10, 20, 30, 40, 50};

cout << *(arr + 3);

return 0;

}

a)

10

b)

20

c)

30

d)

40