Csit Notes

C Programming (CSC115) 2079 BS Past Questions & Solutions

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

  • CSC115
  • Core Course
  • 6 Exam Years

Tribhuvan University

Institute of Science and Technology

2079 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. Question 1
    Difference between exit(0) and exit(1)? Discuss need for nested structure. Write program to find $x^y$ without using the POW function.
  2. Question 2
    Why do we need break and continue? Define formal and actual arguments. Identify and list errors in provided sum function code.
  3. Question 3
    Write a menu driven program for: A. Odd/Even B. Positive/Negative C. Factorial D. Exit. Repeat until choice D.

Group B

Short Answer Questions

Attempt any Eight questions.

  1. Question 4
    How do you swap two integers without a third variable? Justify with example.
  2. Question 5
    Write a program to find the sum of digits of a given integer using recursion.
  3. Question 6
    Differentiate between constant and literals. Why do we need to define data types?
  4. Question 7
    Write a program to find the second largest number in a given array.
  5. Question 8
    Create structure 'Employee' (Name, Address, Salary, Age). Display employees aged 40-50 living in Kathmandu.
  6. Question 9
    List advantage/disadvantage of pointers. How do you pass pointers as function arguments?
  7. Question 10
    Write a program to extract prime numbers from 'Num.txt' and write them to 'Prime.txt'.
  8. Question 11
    What is the advantage of union over structure? List four string library functions with prototypes.
  9. Question 12
    Write short notes on: a. Local, Global, and Static variables b. Conditional operator ($?:$).

All C Programming past papers