Chapter 11 Computer 2nd Year

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Computer Science

Smart Syllabus
2nd Year
Prepared by: Moin Yaqoob
Class : Cb-1 2nd year
Roll number:19501

Chapter#12 Loop Constructs


Topic Name #Page Description
Define loop 332 Short Question
Define while loop with
332,333 Long Question
example
Define for loop, its
342,343,344 Long Question
working with example
Difference b/w a while
351 Short Question
and for loop
Difference b/w counter
controlled and sentinel 351 Short Question
controlled loop
Describe sentinel
control loop with its 351,352 Long Question
1
situations
12.1.2.3.4.5.6.7.17.18.19.20.21
Programs
22.23.24.25.26.27.28.31.32.39.40
Important Short Questions
From Past papers(2014-19)
 Write any two uses of loop. (1-times)
 Define while loop. (3-times)
 Make a flowchart of while loop.(3-times)
 Define sentinel control loop.(6-time)
 Write syntax of while loop.(1-times)
 Define counter variable.(1-times)
 Define for loop.(1-time)
 Write syntax of for loop.(4-time)
 Write nested loop.(5-time)
 Difference b/w inner and outer loop.(2-times)
 What is infinite loop?(3-times)
Ans: A loop in which the ending condition never occurs is called infinite loop. It
represents forever until the user intervenes to stop loop.
 What is meant by loop?(1-time)
 What is counter controlled loop?(3-times)
 Define sentinal values.(2-time)
Ans: A special value used to terminate a sentinel controlled loop is called sentinel
value.For example, a loop may execute while the value of a variable is not -1.Here -1 is
sentinel value that is used to terminate the loop.
 Why is the sentinel value used in loop?(1-time)
Note:- Error finding and predict output question are not included in this segment.For
these questions follow it series book.

Important Long Questions


from past papers (2014-19)
 Define while loop. Explain its syntax and flow chart. Explain its working with
help of example.(13-times)

2
 Define for loop. Write its syntax and flow chart. Explain its working with
example.(8-times)
 Define nested loop. Write its syntax. Explain it’s working with the help of
example.(4-times)
 What is sentinel controlled loop and how it implemented? Discuss some of the
situations where it can be useful.(1-time)
 Write a program that inputs a number from the user and display it’s table.(4-
times)
 Write a program that inputs a number from the user and display the factorial
of that number.(2-times)
 Write a program that displays counting from 10 to 1 using for loop. (1-time)
 Write a program that print odd numbers from 11 to 49 using loop.(1-times)
 Write a program in C that displays the following series using while loop:
1,3,5,7,9,11,13,15,17,19,21,23.(1-time)
 Write a program that inputs marks and displays “Congratulation” if the marks
are 40 or more.(bwp-2014)
 What is if else statement? Draw its flowchart,also explain its working with an
example.(1-time)
 What is nested if statement? Draw its flowchart.Explain its working with an
example.(3-times)
 What is control structure? Briefly describe the basic control structures for
writing programs.(2-times)
 What is if-else-if statement? Write its syntax,also draw its flowchart.Describe
its purpose by example.(1-time)

You might also like