Professional Documents
Culture Documents
Objective: Q1: Write Short Answers To Any NINE Questions
Objective: Q1: Write Short Answers To Any NINE Questions
Objective: Q1: Write Short Answers To Any NINE Questions
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
*
**
***
****
*****