Bachelor of Science in Information Technology (BSc IT) – Semester 1 BT0065 – C Programming and Data Structures – 3 Credits (Book ID: B0949)
Assignment Set (60 Marks)
Answer all questions 6 x 10 = 60
1.Define and explain flow chart with an example
Ans:-It is the pictorial representation of algorithm and the summary of the decisions and flows that make up aprocedures or process from the beginning to the and as one of the seven tools of quality a flow chart shows how the intire system function and where error occures this informatin is used in defining documenting, studying and improving the system There are some standard symbols to drow the follow chart ,
. Standard essential symbols ......
2. Write an algorithm to print all even numbers in descending order and draw the flowchart. 3. Explain while and do-while statement with an example.
Ans:-While statement:-It is another looping statement which checks the condition first and then executes the body of the loop the body of the loop may be executed depends on the condition if the condition is false during first check itself the body of the loop is executed zero time Syntax:-
EXAMPLE: Print first 20 natural numbers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
It is the third type of iterativ satement where the body of the loop will be executed first and then cheacks the condition for further execution. So the body of the loop will be executed atleast once . SYNTEX DO
EXAMPLE: PRINT FIRST 20 NATURUAL NUMBERS
INT I =1;