Tribhuvan University
Bachelor of Science in Computer Science and Information Technology
Semester 1 · TU Board 2077
Course Title: C Programming (CSC115)
Full Marks: 60Pass Marks: 24Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.
Group A
Attempt any two questions: (2x10=20)(2 × 10 = 20)
- 1.10
What 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.
- 2.10
What are the benefits of using arrays? Compare one dimensional array with two dimensional array. Write a program to find transpose of a matrix.
- 3.10
What 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
Attempt any eight questions: (8x5=40)(8 × 5 = 40)
- 4.5
Explain flowchart with example. What are the benefits of using flowcharts?
- 5.5
What is data type? Why do we need it in programming? Explain any three basic data types with example.
- 6.5
What do you mean by unformatted I/O? Explain
- 7.5
Write a program to display first n prime numbers.
Answer comingAlso asked in 2081
- 8.5
Write a program to find product of two integers using your own function.
Answer comingAlso asked in 2078
- 9.5
Define pointer. Flow to you return pointers from functions? Explain with example.
- 10.5
Explain different file I/O functions with example.
- 11.5
Write a program to draw a circle using graphics function
Answer comingAlso asked in 2078, 2074
- 12.5
Write short notes On
- Compilation and execution
- Operator precedence and associativity
— The End —