Tribhuvan University
Bachelor of Science in Computer Science and Information Technology
Semester 1 · TU Board 2075
Course Title: C Programming (CSC115)
Full Marks: 60Pass Marks: 24Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.
Group A
(2 × 10 = 20)
- 1.10
What is looping statement? Discuss different looping statements with suitable example of each.
Answer comingAlso asked in 2074
- 2.10
Define array? What are the benefits of using array? Write a program to add two matrices using array.
- 3.10
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
(8 × 5 = 40)
- 4.5
Discuss different logical operation in detail.
- 5.5
What is break statement? Discuss with example. How the break statement is different from continue statement?
- 6.5
Write a program to check whether a number entered is even or odd.
- 7.5
Write a program to calculate sum of first 10 odd numbers.
- 8.5
What is preprocessor directives? Discuss # define directive with example.
- 9.5
Discuss any five string library functions.
- 10.5
What is dynamic memory allocation? Discuss the use of malloc() in dynamic memory allocation with example.
Answer comingAlso asked in 2080, 2078
- 11.5
What is structure? Create a structure rectangle with data members length and breadth.
- 12.5
Write short notes on:
- Benefits of data files
- Graphics functions
— The End —