WorksheetsC-programming Test-1
Total questions: 15
Worksheet time: 33mins
What is problem solving in computer science?
Writing code directly
Understanding and solving a problem step by step
Using only a computer
Memorizing programs
Which of the following is the correct definition of an algorithm?
A finite set of step-by-step instructions to solve a problem
A programming language
A computer hardware device
A software application
What will the following C statement print?
printf("Hello World");
Hello
Error
Hello World
World
Which step comes first in problem solving?
Understanding the problem
Testing the program
Debugging
Writing code
Which of the following is NOT a characteristic of an algorithm?
Ambiguity
Definiteness
Input
Finiteness
Which symbol is used in printf to print a new line?
\n
/n
\t
/t
Which of the following languages needs a compiler?
Mathematics
Hindi
English
C
An algorithm must stop after a finite number of steps. This property is called:
Input
Finiteness
Effectiveness
Definiteness
Which of the following is an example of an algorithm?
Newspaper
Dictionary
English grammar
Cooking recipe
Which of the following is an online compiler?
Calculator
OnlineGDB
MS Word
Notepad
Select all the correct characteristics of algorithms
Effectiveness
Infiniteness
Definiteness
Step-by-Step
Which of these allows you to write, compile, and run C programs without installing software?
Online compiler
Text editor
Offline compiler
Printer
What is the main use of printf() in C?
To take input
To print output on the screen
To compile the program
To stop execution
What will be the output of the following code? printf("10 + 5");
Nothing
10 + 5
15
Error
Write all the 5 steps involved in Problem Solving.
(Hint: The first step is "Read")
