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.

      What type of programming approach is followed by the C program? Write the necessary steps for the Program Development Life Cycle (PDLC).

      5
    2. 3.

      Is the break keyword mandatory in the switch statement? List the operators used in C based on utility. Explain the concept of a logical operator with an example.

      5
    3. 4.

      What is nested loop? Write the difference between formatted and unformatted I/O operations in C.

      5
    4. 5.

      What is DMA? List out the memory management function used in the C program. Using DMA, write a program to find the sum of N numbers.

      5
    5. 6.

      Write a C program to read a string from the keyboard and reverse it without using string handling function.

      5
    6. 7.

      What is the difference between a binary file and a text file? Write a C program to copy the contents of a student.txt file into another file called info.txt.

      5
    7. 8.

      What is the use of initgraph() in the C program? Write a C program to draw a circle, rectangle and ellipse using the graphics functions with a green background and red foreground.

      5

    Group C

    Attempt any TWO questions(2 × 10 = 20)

    1. 9.

      Explain different method of passing argument to a function. Write a C program to print Fibonacci sequence up to n- terms using Recursive function.

      10
    2. 10.

      What is pointer? Write a C program that uses pointers to store cricket player's data(name, age, position and height) and display them.

      10
    3. 11.

      What do you mean by nested structure? Create a structure named Book with members ISBN, Title, author and price. Use this structure to read records of 10 books and display the record of book having highest and lowest price.

      10

    — The End —