wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Bim1

Total questions: 15

Worksheet time: 5mins

Name
Class
Date
1.

Which of the following is NOT a valid data type in C?

a)

int

b)

string

c)

char

d)

float

2.

What is the syntax to declare a variable in C?

a)

var_name data_type;

b)

type var_name;

c)

variable data_type;

d)

data_type var_name;

3.

What does the 'scanf' function do in C?

a)

Clears the console screen

b)

Reads input from the user

c)

Prints output to the console

d)

None of the above

4.

Which of the following is the correct way to comment a single line in C?

a)

-- Comment

b)

# Comment

c)

/* Comment */

d)

// Comment

5.

What is the purpose of the "sizeof" operator in C?

a)

It returns the size of a pointer in bytes

b)

It returns the size of a data type in bytes

c)

It returns the size of a function in bytes

d)

It returns the size of a variable in bytes

6.

What is the correct way to initialize an array of integers in C?

a)

int arr{}(1, 2, 3, 4, 5);

b)

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

c)

int arr() = {1, 2, 3, 4, 5};

d)

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

7.

Which keyword is used to define a constant in C?

(a)  

8.

Which function is used to print formatted output in C?

a)

display()

b)

printf()

c)

console.log()

d)

print()

9.

Which of the following is not a programming language ?

a)

HTML

b)

Java

c)

SQL

d)

R

10.

What is the correct way to declare a character array in C?

a)

char arr{} = {'a', 'b', 'c'};

b)

char arr() = {'a', 'b', 'c'};

c)

char arr[] = {'a', 'b', 'c'};

d)

char arr{}('a', 'b', 'c');

11.

Which of the following is the correct way to include a header file in C?

a)

#include <stdio.h>

b)

include <stdio.h>

c)

import <stdio.h>

d)

require <stdio.h>

12.

What is the purpose of the 'break' statement in a switch case in C?

a)

To exit the loop immediately

b)

To skip the current iteration

c)

To jump to the next case

d)

To exit the switch case block

13.

Which component of a computer is responsible for storing data permanently?

a)

GPU (Graphics Processing Unit)

b)

HDD (Hard Disk Drive)

c)

CPU (Central Processing Unit)

d)

RAM (Random Access Memory)

14.

What does USB stand for?

a)

Universal Serial Bus

b)

Uniform System Bus

c)

Uninterruptible System Backup

d)

User System Backup

15.

'&' is used to perform 'AND' operation.

a)

True

b)

False