TRIBHUVAN UNIVERSITY
INSTITUTE OF SCIENCE AND TECHNOLOGY
2077 B.S.
Candidates are required to give their answers in their own words as far as practicable.
Group A
Long Answer QuestionsAttempt any Two questions.
- 1What do you mean by looping? Explain while loop with suitable example. Compare while loop with do-while loop. Write a program to find sum and average of first n natural numbers.
- 2What are the benefits of using arrays? Compare one dimensional array with two dimensional array. Write a program to find transpose of a matrix.
- 3What is structure? How is it different from union? Create a structure named course with name, code, and credit_hour as its members. Write a program using this structure to read data of 5courses and display data of those curses with credit_hour greater than 3.
Group B
Short Answer QuestionsAttempt any Eight questions.
- 4Explain flowchart with example. What are the benefits of using flowcharts?
- 5What is data type? Why do we need it in programming? Explain any three basic data types with example.
- 6What do you mean by unformatted I/O? Explain
- 7Write a program to display first n prime numbers.
- 8Write a program to find product of two integers using your own function.
- 9Define pointer. Flow to you return pointers from functions? Explain with example.
- 10Explain different file I/O functions with example.
- 11Write a program to draw a circle using graphics function
- 12Write short notes On a. Compilation and execution b. Operator precedence and associativity