CACS151 C Programming

C Programming TU Board 2024 question paper

10 questionsSit this paper (timed)

Tribhuvan University

Bachelor of Computer Application

Semester 2 · TU Board 2024

Course Title: C Programming (CACS151)

Full Marks: 60Pass Marks: 24Time: 3 hours

Candidates are required to answer the question in their own words as far as possible.

Group A

    Group B

    Attempt any SIX question.(6 × 5 = 30)

    1. 2.

      Define software process model. Explain software development life cycle.

      5
    2. 3.

      Explain call by value and call by reference with suitable example.

      5
    3. 4.

      What is dynamic memory allocation? What are the limitations of static memory allocation? Explain malloc( ) and calloc( ) function with example.

      5
    4. 5.

      What is recursion? Write a program to display Fibonacci series up to 15th term using recursion.

      5
    5. 6.

      Explain null pointer and void pointer with suitable example.

      5
    6. 7.

      Write a program to draw a circle and rectangle with output text "BCA Exam 2081" using graphics function.

      5
    7. 8.

      What do you mean by conditional statement? Write a program to calculate sum and average of weight of five persons using an array.

      5

    Group C

    Attempt any TWO questions(2 × 10 = 20)

    1. 9.

      Define cohesion and coupling. What do you mean by keywords, operators and header files? Describe the types of operator used in C programming.

      10
    2. 10.

      Why do we need a break and continue statement? Differentiate between binary file and text file? Suppose a file named "Number.txt" contains a list of integers. Write a program to extract the prime numbers from that file and write them on "Prime.txt" file.

      10
    3. 11.

      Differentiate between structure and union. Create a structure "Employee" having Name, Department, Address, Salary, and Age as member functions. Display the name of the employee having aged between 30 and 50 are living in Kathmandu.

      10

    — The End —