C Programming (CSC115) 2075 BS Past Questions & Solutions

Tribhuvan University (TU) 2075 BS board exam question paper with verified step-by-step solutions for BSc CSIT First Semester.

TRIBHUVAN UNIVERSITY

INSTITUTE OF SCIENCE AND TECHNOLOGY

2075 B.S.

Bachelor Level: B.Sc. CSIT

Semester: First Semester

Subject: C Programming (CSC115)

Full Marks: 60 / 80

Pass Marks: 24 / 32

Candidates are required to give their answers in their own words as far as practicable.

Group A

Long Answer Questions

Attempt any Two questions.

  1. 1
    What is looping statement? Discuss different looping statements with suitable example of each.
  2. 2
    Define array? What are the benefits of using array? Write a program to add two matrices using array.
  3. 3
    Why 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 Questions

Attempt any Eight questions.

  1. 4
    Discuss different logical operation in detail.
  2. 5
    What is break statement? Discuss with example. How the break statement is different from continue statement?
  3. 6
    Write a program to check whether a number entered is even or odd.
  4. 7
    Write a program to calculate sum of first 10 odd numbers.
  5. 8
    What is preprocessor directives? Discuss # define directive with example.
  6. 9
    Discuss any five string library functions.
  7. 10
    What is dynamic memory allocation? Discuss the use of malloc() in dynamic memory allocation with example.
  8. 11
    What is structure? Create a structure rectangle with data members length and breadth.
  9. 12
    Write short notes on: a. Benefits of data files b. Graphics functions