Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

C-programming Test-1

Total questions: 15

Worksheet time: 33mins

Name
Class
Date
1.

What is problem solving in computer science?

a)

Writing code directly

b)

Understanding and solving a problem step by step

c)

Using only a computer

d)

Memorizing programs

2.

Which of the following is the correct definition of an algorithm?

a)

A finite set of step-by-step instructions to solve a problem

b)

A programming language

c)

A computer hardware device

d)

A software application

3.

What will the following C statement print?

printf("Hello World");

a)

Hello

b)

Error

c)

Hello World

d)

World

4.

Which step comes first in problem solving?

a)

Understanding the problem

b)

Testing the program

c)

Debugging

d)

Writing code

5.

Which of the following is NOT a characteristic of an algorithm?

a)

Ambiguity

b)

Definiteness

c)

Input

d)

Finiteness

6.

Which symbol is used in printf to print a new line?

a)

\n

b)

/n

c)

\t

d)

/t

7.

Which of the following languages needs a compiler?

a)

Mathematics

b)

Hindi

c)

English

d)

C

8.

An algorithm must stop after a finite number of steps. This property is called:

a)

Input

b)

Finiteness

c)

Effectiveness

d)

Definiteness

9.

Which of the following is an example of an algorithm?

a)

Newspaper

b)

Dictionary

c)

English grammar

d)

Cooking recipe

10.

Which of the following is an online compiler?

a)

Calculator

b)

OnlineGDB

c)

MS Word

d)

Notepad

11.

Select all the correct characteristics of algorithms

a)

Effectiveness

b)

Infiniteness

c)

Definiteness

d)

Step-by-Step

12.

Which of these allows you to write, compile, and run C programs without installing software?

a)

Online compiler

b)

Text editor

c)

Offline compiler

d)

Printer

13.

What is the main use of printf() in C?

a)

To take input

b)

To print output on the screen

c)

To compile the program

d)

To stop execution

14.

What will be the output of the following code? printf("10 + 5");

a)

Nothing

b)

10 + 5

c)

15

d)

Error

15.

Write all the 5 steps involved in Problem Solving.
(Hint: The first step is "Read")

4 lines