Tribhuvan University

Institute of Science and Technology


Bachelor Level / first-semester / Science

Computer Science and Information Technology( CSC115 )

C Programming

Full Marks: 60 + 20 + 20

Pass Marks: 24 + 8 + 8

Time: 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.

Section A

Attempt any two questions: (2x10=20)


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.


What are the benefits of using arrays? Compare one dimensional array with two dimensional array. Write a program to find transpose of a matrix.


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.

Section B

Attempt any eight questions: (8x5=40)


Explain flowchart with example. What are the benefits of using flowcharts?


What is data type? Why do we need it in programming? Explain any three basic data types with example.


What do you mean by unformatted I/O? Explain


Write a program to display first n prime numbers.


Write a program to find product of two integers using your own function.


Define pointer. Flow to you return pointers from functions? Explain with example.


Explain different file I/O functions with example.


Write a program to draw a circle using graphics function


Write short notes On

  1. Compilation and execution
  2. Operator precedence and associativity