0% found this document useful (0 votes)
33 views2 pages

Objective: Q1: Write Short Answers To Any NINE Questions

This document contains questions to test understanding of structured programming concepts like loops and control structures. For the objective questions, the answers are: (a) Three, (b) Four, (a) For, (b) do while, (d) Three, (a) Evaluated. For the subjective questions, it asks to write short answers explaining concepts like loops, nested loops, continue and break statements, and give examples. It also asks to write programs to reverse a number input, print a increasing pattern, and a pyramid pattern.

Uploaded by

Abdul Basit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Objective: Q1: Write Short Answers To Any NINE Questions

This document contains questions to test understanding of structured programming concepts like loops and control structures. For the objective questions, the answers are: (a) Three, (b) Four, (a) For, (b) do while, (d) Three, (a) Evaluated. For the subjective questions, it asks to write short answers explaining concepts like loops, nested loops, continue and break statements, and give examples. It also asks to write programs to reverse a number input, print a increasing pattern, and a pyramid pattern.

Uploaded by

Abdul Basit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Objective

1. In a structured programming, the logical flow is governed by __________ basic control


structures:
(a) Two (b) Three (c) Four (d) Five
2. There are ___________ essential elements to a loop
(a) Three (b) Four (c) Five (d) Six
3. _________ is primarily used for executing block of statements a predetermined number of
times:
(a) For (b) While (c) do whilw (d) None
4. In _________ loop, first the body of loop is executed and then the condition is checked:
(a) While (b) do while (c) For (d) All
5. There are ________ expressions given in the For loop to execute it:
(a) One (b) Two (c) Six (d) Three
6. When a while statement is encountered, expression is:
(a) Evaluated (b) Calculated (c) Controlled (d) Communicated

Subjective
Q1: Write Short Answers to any NINE Questions:
1. What is a loop? Why it is used?
2. What is Sentinel Controlled Loop? Give example.
3. Explain the syntax of the Nested loop. Give example.
4. Explain syntax of do-while loop. Give example.
5. Write the difference between continue and break statement.
6. Define Go-to Statement.
7. What is counter controlled loop? Explain with example.
8. Trace the output assuming m=3 and n = 5:
For(k=n; k>0;--k)
{
For(j=m; j>0; --j)
{
Printf(“%d”,j);
}
Printf(“\n”);
}
9. Write a program that takes input from user and print its factorial.
Q2: Attempt Any TWO Long Questions:
A Write a program that takes input from the user and Prints the number in reverse order.
For example (input : 654 and output : 456)
B Write the program that produces the following output:
0
01
012
0123
01234
012345
C Write the program that displays the following pattern
*
**
***
****
*****

You might also like