Class 10 – Computer Syllabus
Introduction to C Programming
Topics
What is a Programming Language?
Features of C Language
Structure of a C program
Header files
main() function
Statements & Blocks
Compilation and Execution Process
Data Types, Variables & Operators
Topics
Character set & Tokens
Keywords and Identifiers
Data Types
int, float, char, double, long
Variables and Constants
Operators
Arithmetic (+, –, *, /, %)
Relational (>, <, ==, !=)
Logical (&&, ||, !)
Assignment (=, +=, -=)
Increment/Decrement (++ , --)
Address (&) and Pointer (*) Operators
Control Statements
Topics
Decision-making
if, if-else, nested if
switch-case
Looping
for loop
while loop
do-while loop
Jump Statements
break
continue
Arrays
Topics
Definition and Declaration of Arrays
One-dimensional arrays
Accessing array elements
Use of arrays in storing multiple values
String as character arrays
Searching Techniques
Topics
Definition of Searching
Sequential/Linear Search
Binary Search (with conditions: sorted array)
Comparison between Linear & Binary Search
Sorting Techniques
Topics
Definition of Sorting
Bubble Sort – logic and steps
Selection Sort – logic and steps
Insertion Sort – logic and steps
Comparison between sorting methods
Pointers
Topics
Definition of a Pointer
Pointer declaration and initialization
Address-of (&) operator
Value-at (*) operator
Pointer vs Normal variable
String Handling & Functions
Topics
Character arrays (strings)
Null character (‘\0’)
String library functions (string.h)
strcpy()
strlen()
strcmp()
strcat()
Use of header file string.h
Assessment Pattern
Part A: Objective Questions (20 marks)
MCQs from data types, operators, arrays, searching, sorting, strings, pointers
Part B: Subjective Questions (50 marks)
Very Short Answer Questions
Short Answer Questions (Set 1 & Set 2)
Descriptive Questions (Sorting, Searching, String Functions)
Model Paper 1
Objective Questions (20 × 1 =
20 Marks)
Attempt all
20 questions. Choose the correct option.
- Who invented the C language?
A) Steve Jobs B) Mark Zuckerberg C) Dennis Ritchie D) Bill Gates - C language was developed in
which year?
A) 2000 B) 1995 C) 1972 D) 1980 - Which of the following is a
keyword in C?
A) value B) if C) main D) start - Which symbol is used to end a
statement in C?
A) : B) ; C) . D) , - Which of the following is a
correct variable name?
A) -name B) float C) name1 D) 1name - What is the data type used to
store numbers without decimal in C?
A) string B) int C) float D) char - What is an array in C?
A) A single value storage
B) A collection of variables with different data types
C) A collection of variables of the same data type
D) A type of loop - What is the index of the first
element in a C array?
A) 10 B) -1 C) 1 D) 0 - Which of the following is a
correct declaration of an integer array with 5 elements?
A) int[5] arr; B) array int[5];
C) int arr; D) int arr[5]; - Which sorting algorithm compares
adjacent elements and swaps them if needed?
A) Binary Sort B) Bubble Sort C) Insertion Sort D) Selection Sort - Which operator is used for
logical AND in C?
A) & B) && C) | D) || - sizeof() is a…
A) Function B) Keyword C) Operator D) Constant - Which of the following is NOT a
data type in C?
A) int B) real C) double D) char - Which operator is used to
access value stored at an address in C?
A) & B) * C) % D) # - Which of the following is a
string function?
A) scanf() B) strlen() C) print() D) len() - What does strcmp() return when
two strings are equal?
A) 0 B) 1 C) -1 D) 10 - Which search algorithm works
only on sorted arrays?
A) Linear Search B) Binary Search C) Bubble Search D) Selection Search - Which symbol is used for
single-line comments in C?
A) #comment B) // C) * * D) /**/ - Which format specifier is used
to print a float value?
A) %d B) %f C) %c D) %s - What is the default value of an
uninitialized local variable?
A) 0 B) Garbage value C) -1 D) NULL
Part B: Subjective Questions
(50 Marks)
Section 1: Very Short Answer Questions (10 × 1 = 10
Marks)
Answer the
following questions in one or two lines.
I. Who is
the father of the C programming language?
II. How many keywords are there in C (ANSI standard)?
III. Write any two data types used in C.
IV. Which symbol is used to end a statement in C?
V. Is int a keyword or an identifier?
VI. What is a constant in C?
VII. Write the syntax of declaring an array in C.
VIII. Give one example of a logical operator.
IX. Write any one string function.
X. What is the purpose of the return statement?
Section 2: Short Answer Questions – Set 1 (5 × 2 = 10
Marks)
11. Answer
the following:
I. What is
an identifier in C? Give an example.
II. Differentiate between a ‘keyword’ and an ‘identifier’.
III. What is a loop? Name any two types of loops in C.
IV. What is a constant? Write an example.
V. What is the use of sizeof() operator?
Section 3: Short Answer Questions – Set 2 (5 × 2 = 10
Marks)
12. Answer
the following:
I. How do
you declare a pointer to an integer in C?
II. What does the strcmp() function do?
III. Write the purpose of the strcpy() function.
IV. What is Binary Search?
V. What is the difference between = and == in C?
Section 4: Descriptive Answer Questions (3 × 4 = 12
Marks)
13. Answer
the following in brief:
A. Explain
what a pointer is in C and how it is declared. Give an example.
B. Describe the difference between Sequential Search and Binary Search in
arrays.
C. Explain Bubble Sort with an example.
Model Paper 2
Part A: Objective Questions (20 × 1 = 20 Marks)
Attempt all 20 questions. Choose the correct option.
-
Which operator is used to assign a value to a variable in C?
A) == B) = C) := D) => -
Which of the following is not a valid data type in C?
A) long B) double C) real D) char -
Which operator is used to get the address of a variable?
A) # B) % C) & D) * -
Which header file is required for string functions like strcpy() and strlen()?
A) stdlib.h B) string.h C) stdio.h D) conio.h -
Which of the following represents the correct syntax to declare a character array?
A) char name(); B) char name[]; C) char name{}; D) char name<>; -
What is the size of an int data type in most C compilers?
A) 1 byte B) 2 bytes C) 4 bytes D) 8 bytes -
Which operator has the highest precedence?
A) + B) * C) = D) && -
The expression 5 > 2 && 3 < 1 evaluates to:
A) true B) false C) 2 D) 3 -
Which function is used to compare two strings in C?
A) strcmp() B) strcpy() C) strlen() D) strrev() -
How is a one-dimensional array declared?
A) int a; B) int a{}; C) int a[]; D) int a<>; -
Which sorting algorithm repeatedly finds the minimum element and places it at the beginning?
A) Selection Sort B) Merge Sort C) Insertion Sort D) Bubble Sort -
Which sorting method inserts elements in their correct position in a sorted part of the array?
A) Quick Sort B) Selection Sort C) Bubble Sort D) Insertion Sort -
What is the worst-case time complexity of Bubble Sort?
A) O(n log n) B) O(n²) C) O(log n) D) O(n) -
In which search method do we check each element one by one?
A) Linear Binary Search B) Quick Search C) Sequential Search D) Binary Search -
What is the main condition for Binary Search to work?
A) The array must be of float type
B) The array must be sorted
C) The array must be of fixed size
D) The array must be two-dimensional -
In Binary Search, what happens after each comparison?
A) The entire array is checked again
B) The search space is doubled
C) The search space is divided into half
D) The array is reversed -
What does a pointer variable store in C?
A) Type of a variable
B) Size of a variable
C) Address of another variable
D) Data value -
Which symbol is used to declare a pointer in C?
A) & B) # C) % D) * -
Which operator is used to increment a value by 1?
A) += B) ++ C) -- D) *= -
Which function is used to copy one string into another?
A) strcpy() B) strcmp() C) puts() D) strlen()
Part B: Subjective Questions (50 Marks)
Section 1: Very Short Answer Questions (10 × 1 = 10 Marks)
Answer the following in one or two lines.
I. Define an array.
II. What is sorting?
III. Name any two types of searching techniques.
IV. What is a pointer in C?
V. Name the function used to find the length of a string in C.
VI. What is an operator?
VII. Write the syntax of declaring a pointer.
VIII. Give one example of an integer data type.
IX. What is a character array?
X. What is the meaning of ++i?
Section 2: Short Answer Questions – Set 1 (5 × 2 = 10 Marks)
I. What is a control statement? Give one example.
II. Write any two differences between Bubble Sort and Selection Sort.
III. What is the purpose of relational operators?
IV. Write two uses of arrays in C.
V. What is a library function? Give one example.
Section 3: Short Answer Questions – Set 2 (5 × 2 = 10 Marks)
I. How does the & operator work with pointers?
II. What is the difference between a pointer and a normal variable?
III. Explain the term searching in arrays.
IV. What are string functions? Give any two examples.
V. What is the importance of a null character ('\0') in strings?
Section 4: Descriptive Answer Questions (3 × 4 = 12 Marks)
A. Explain the working of Insertion Sort with an example.
B. Describe the difference between Sequential Search and Binary Search in arrays.
C. What is the purpose of the strcpy() and strlen() functions in C? Explain with examples.
No comments:
Post a Comment