Class 10 Chapter 4 Solution SEBA Computer Science Solution
Looking for Class 10 Chapter 4 notes and solutions? You’ve come to the right place! Our website offers well-structured, easy-to-understand study materials that align perfectly with the latest CBSE syllabus. These notes are crafted by subject matter experts to provide clear explanations and step-by-step solutions to help you master even the most challenging topics. Whether you’re preparing for exams or need a quick revision, our resources ensure you’re always ready. Access our Class 10 Chapter 4 solutions now and take your learning to the next level!
1. Why do we use a loop in a C program?
2. Do we need to use only one type of loop in a C program? Justify your answer by writing a C program.
3. What will happen if we write a while loop with 1 in place of the condition ? Try it in a simple C program. Hint:
while (1)
{
printf(“We must raise our voice against corruption \n”);
}
4. Name different portions of a for loop. Can we put more than one statement within a portion?
5. Answer with TRUE or FALSE.
(i) If the condition of the while loop is false, the control comes to the second statement inside the loop.
Ans. FALSE.
(ii) We can use at most three loops in a single C program.
Ans . FALSE.
(iii) The statements inside the do-while loop executes at least once even if the condition is false.
Ans. TRUE.
(iv) Only the first statement inside the do-while loop executes when the condition is false.
Ans. FALSE.
(v) In a do-while loop, the condition is written at the end of the loop.
Ans. TRUE.
6. Programming exercises:
A. Write a C program to find the summation of the following series
(a). 12 + 22 + 32 + 42 + . . . + N2
(b). 13 + 23 + 33 + 43 + . . . + N3
(c). 1*2 + 2*3 + 3*4 + . . . + N*(N+1)
C. Write a C program to display the following pattern.
1
1 1
1 1 1
1 1 1 1
1 1 1 1 1
D. Write a C program to display the following pattern.
5
5 4
5 4 3
5 4 3 2
5 4 3 2 1
E. Write a C program to display the following pattern.
5 4 3 2 1
5 4 3 2
5 4 3
5 4
5