Computer Programming
Multiple Choice Questions
Attempt all questions. Choose the correct option.
1. An operating system is:
o A) Application software
o B) Utility software
o C) System software
o D) Hardware
2. Which of the following is an example of an operating system?
o A) MS Word
o B) Windows
o C) Excel
o D) Photoshop
3. The main function of an operating system is to:
o A) Create documents
o B) Manage computer resources
o C) Edit images
o D) Play games
4. SDLC stands for:
o A) Software Development Life Cycle
o B) System Design Logic Control
o C) Software Data Link Control
o D) System Development Logical Code
5. Which phase of SDLC involves problem identification?
o A) Design
o B) Testing
o C) Analysis
o D) Maintenance
6. C++ is a:
o A) Low-level language
o B) Machine language
o C) High-level language
o D) Assembly language
7. Which symbol is used to end a C++ statement?
o A) :
o B) .
o C) ;
o D) ,
8. Which of the following is a valid C++ variable name?
o A) 2value
o B) value-1
o C) total_marks
o D) total marks
9. A constant in C++ is:
o A) A value that changes
o B) A fixed value
o C) A variable
o D) A data type
10. Which keyword is used to declare a constant in C++?
o A) var
o B) fixed
o C) const
o D) static
11. Which data type is used to store whole numbers?
o A) float
o B) char
o C) int
o D) double
12. The if statement is used for:
o A) Looping
o B) Decision making
o C) Input
o D) Output
13. Which statement is executed when the condition in if is false?
o A) if block
o B) loop
o C) else block
o D) break
14. Which operator is used for comparison?
o A) =
o B) ==
o C) +=
o D) ++
15. Which symbol is used for logical AND?
o A) &
o B) &&
o C) ||
o D) !
Short Answer Questions
1. Define an operating system. Write any two functions of an operating system.
2. What is System Development Life Cycle (SDLC)? Write any four phases of SDLC.
3. Differentiate between system software and application software.
4. Write the basic structure of a C++ program.
5. Define variable. Write rules for naming variables in C++.
6. What is a constant? Write two types of constants used in C++ with examples.
7. Explain the if statement with a simple example.
8. Write the difference between = and == operators in C++.
Long Answer
Explain the functions of an operating system in detail.
1. Describe all phases of the System Development Life Cycle (SDLC).
2. Explain different data types used in C++ with examples.
3. What is decision making in programming? Explain if-else statement with syntax and
example.
4. Write a C++ program to check whether a number is even or odd using if-else statement.
MCQs Key:
Correct Correct
Q# Q#
Answer Answer
1 C 2 B
3 B 4 A
5 C 6 C
7 C 8 C
9 B 10 C
11 C 12 B
13 C 14 B
15 B
Below is the complete Answer Key for the Grade 10 Computer Programming Question Paper,
covering all sections.
Answer Key – Computer Programming (Grade 10)
Section A: Multiple Choice Questions
Q# Correct Answer
1 C
2 B
3 B
4 A
5 C
6 C
7 C
Q# Correct Answer
8 C
9 B
10 C
11 C
12 B
13 C
14 B
15 B
Short Answer Questions
1. Operating System & Functions
An operating system is system software that manages computer hardware and software resources.
Functions (any two):
Memory management
File management
Process management
Device management
2. SDLC Definition & Phases
SDLC is a step-by-step process used to develop a system or software.
Phases (any four):
Analysis
Design
Development (Coding)
Testing
Implementation
Maintenance
3. System Software vs Application Software
System Software Application Software
Manages hardware Performs user tasks
Runs computer Runs on OS
Example: Windows Example: MS Word
4. Basic Structure of C++ Program
#include <iostream>
using namespace std;
int main()
// statements
return 0;
5. Variable & Naming Rules
A variable is a memory location used to store data.
Rules:
Must start with a letter or underscore
Cannot use keywords
No spaces allowed
Case-sensitive
6. Constant & Types
A constant is a value that does not change during program execution.
Types:
Integer constant → 10
Floating constant → 3.14
Character constant → 'A'
7. If Statement
The if statement executes code when a condition is true.
Example:
if (age >= 18)
cout << "Eligible to vote";
8. Difference between = and ==
= ==
Assignment operator Comparison operator
Assigns value Compares values
Example: x = 5 Example: x == 5
9. Flowchart
A flowchart is a graphical representation of program logic.
Advantages:
Easy to understand
Helps in problem analysis
Simplifies debugging
10. Decision Making in Programming
Decision making allows programs to choose different paths based on conditions.
Importance:
Makes programs logical
Helps solve real-world problems
Improves program control
Long Answer Questions
1. Functions of an Operating System
Process Management: Controls execution of programs
Memory Management: Allocates and deallocates memory
File Management: Manages files and folders
Device Management: Controls hardware devices
2. Phases of SDLC
1. Analysis: Identify problem and requirements
2. Design: Plan system structure
3. Development: Write program code
4. Testing: Remove errors
5. Implementation: Install system
6. Maintenance: Update and improve system
3. Data Types in C++
Data Type Use Example
int Whole numbers int x = 10;
float Decimal values float y = 3.5;
char Characters char ch = 'A';
double Large decimals double d = 5.678;
4. Decision Making & If-Else
Decision making allows program flow control.
Syntax:
if (condition)
statements;
else
statements;
Example:
if (marks >= 50)
cout << "Pass";
else
cout << "Fail";
5. C++ Program: Even or Odd
#include <iostream>
using namespace std;
int main()
int num;
cout << "Enter a number: ";
cin >> num;
if (num % 2 == 0)
cout << "Even Number";
else
cout << "Odd Number";
return 0;