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)
- 2.5
What type of programming approach is followed by the C program? Write the necessary steps for the Program Development Life Cycle (PDLC).
- 3.5
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.
- 4.5
What is nested loop? Write the difference between formatted and unformatted I/O operations in C.
- 5.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.
- 6.5
Write a C program to read a string from the keyboard and reverse it without using string handling function.
- 7.5
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.
Answer comingAlso asked in 2022
- 8.5
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.
Answer comingAlso asked in 2020
Group C
Attempt any TWO questions(2 × 10 = 20)
- 9.10
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.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.
- 11.10
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.
— The End —