wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

ByteBattle 2.0

Total questions: 30

Worksheet time: 23mins

Name
Class
Date
1.

I am a three-digit number. My second-digit is four times bigger than the third digit and my first digit is three less than the second digit. What number am I?

a)

148

b)

154

c)

141

d)

None of these

2.

What will be the output if a variable x is assigned the value 10 and then printed?

a)

10

b)

x

c)

error

d)

not defined

3.
The process of creating a new variable without value
a)
declaration
b)
naming
c)
instantiation
d)
assigning
4.

Which of the following is a correct comment?

a)

*/ Comments */

b)

** Comment **

c)

/* Comment */

d)

{ Comment }

5.

What does <= mean?

a)

less than

b)

greater than

c)

less than or equal to

d)

greater than or equal to

6.

The format identifier ‘%i’ is also used for _____ data type.

a)

char

b)

int

c)

float

d)

double

7.

Who invented C programming language ?

a)

Ken Thompson

b)

James Gosling

c)

Dennis Ritchie

d)

James Thompson

8.

Which data type is used to store whole numbers in C?

a)

char

b)

double

c)

int

d)

float

9.

What is the purpose of the printf function in C?

a)

To read user input

b)

To print text on the screen

c)

To declare variables

d)

To create loops

10.

In C, what symbol is used for a single-line comment?

a)
//
b)
--
c)
#
d)
/*
11.

Used by computer programmers to develop software programs, scripts and other set of instructions for computer to execute.

a)

Body Language

b)

Programming language

c)

Basic Language

d)

Colloquial Language

12.

The set of rules that defines the combinations of symbols and forms of the code.

a)

Virus

b)

Syntax

c)

Error

d)

Bug

13.

What is the output of (5%2)?

a)
0
b)
3
c)
2
d)
1
14.

If you have a mathematical expression x *y + y *x where x = 3 and y = 2, what is the result?

a)
6
b)
8
c)
10
d)
12
15.

What will be the output if you perform floor division of 7 by 3?

a)
1
b)
2
c)
3
d)
4
16.

Operator % in C Language is called.?

a)

Percentage Operator

b)

Quotient Operator

c)

Modulus

d)

Division

17.

int a = 3.5 + 4.5;

a)

a = 0

b)

a = 7

c)

a = 8.0

d)

a = 8

18.

The size of character variable in c

a)

2 byte

b)

5 byte

c)

8 byte

d)

1 byte

19.

Pickup odd one out

a)

a=a+1;

b)

a+=1

c)

a++

d)

a=+1

20.
How will you print \n on the screen?
a)
printf("\n");
b)
echo "\\n";
c)
printf('\n');
d)
printf("\\n");
21.

What will be the output if you perform ceil division of 7 by 3?

a)
4
b)
2
c)
3
d)
5
22.

C is a

a)

Low level language

b)

Assembly language

c)

Medium level language

d)

High level language

23.

Which punctuation ends most of the lines of C code?

a)

.

b)

;

c)

,

d)

" "

24.

Which of the following print format code is used to print float value?

a)

%d        

b)

%f       

c)

%c        

d)

%i        

25.

What is the extension of   a C program?

a)

.cpp

b)

.c

c)

.cp

d)

.f

26.

What will be the output if you print a string "Hello" followed by a space and then another string "World"?

a)
Hello World
b)

Hello_World

c)
Hello, World!
d)
HelloWorld
27.
A person who writes code and communicates instructions to a computer.
a)
Code
b)
Programmer
c)
Command
d)
Program
28.

What will be the output of the following C code?

a)

Its not zero

b)

Its zero

c)

Run time error

d)

None

29.

Rhombus shaped box in a flow chart is called-----

a)

Input box

b)

Decision box

c)

Processing box

d)

Start box

30.

A single command is called a statement.

a)

True

b)

False