TRIBHUVAN UNIVERSITY
INSTITUTE OF SCIENCE AND TECHNOLOGY
2075 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 is looping statement? Discuss different looping statements with suitable example of each.
- 2Define array? What are the benefits of using array? Write a program to add two matrices using array.
- 3Why do we need data files? What are the different file opening modes? Write a program that reads data from a file “input.txt” and writes to “output.txt” file.
Group B
Short Answer QuestionsAttempt any Eight questions.
- 4Discuss different logical operation in detail.
- 5What is break statement? Discuss with example. How the break statement is different from continue statement?
- 6Write a program to check whether a number entered is even or odd.
- 7Write a program to calculate sum of first 10 odd numbers.
- 8What is preprocessor directives? Discuss # define directive with example.
- 9Discuss any five string library functions.
- 10What is dynamic memory allocation? Discuss the use of malloc() in dynamic memory allocation with example.
- 11What is structure? Create a structure rectangle with data members length and breadth.
- 12Write short notes on: a. Benefits of data files b. Graphics functions