BITM 1st Semester
C Programming Board Question Paper 2022


TRIBHUVAN UNIVERSITY
FACULTY OF MANAGEMENT
Office of the Dean
August 2022
Full Marks:60 Pass Marks:30 Time:3 Hrs.
BIM /
First Semester /
IT 232:
C Programming

Candidates are required to give their answers in their own words as for as practicable.
The figures in the margin indicate full marks

Long Answer Questions
Section "A"

Brief Answer Questions:

[10 × 1 = 10]
1.

Define algorithm.

2.

List any two modes for opening a file.

3.

What is the use of printf() function?

4.

List arithmetic and logical operators available in C.

5.

Define iteration.

6.

Write a syntax to initialized 2D array in C.

7.

What are the differences between array and structure?

8.

What is the advantage of global variable?

9.

What is the use of malloc() function?

10.

Define string.

Section "B"

Short Answer Questions: (Attempt any FIVE Questions)

[5 × 3 = 15]
11.

Write a program to find the greatest of three number using functions. The function should expect three integers and return the greatest of them.

12.

Read a string from the user and find the length of that sting using strlen() function.

13.

Differentiate between while and do-while loop. Write a program to print the multiples of 5 less than 100.

14.

Write a program that prints the following pattern:
1
1 2
1 2 3
1 2 3 4
1 2 3 5

15.

Write a program to find the factorial of a number N read from the user using recursive function.

16.

Write a program to sort the numbers in an array.

Section "C"

Long Answer Questions: (Attempt any THREE Questions)

[3 × 5 = 15]
17.

What does nested loop mean? Write a program to find the area of the rectangle after taking length and breadth as input from the user.

18.

Write a program to read a string and copy it to another string in reverse format. Finally display the original string and the reversed string, without using string handling function.

19.

Write a program to read an integer from the user. If the given integer is odd then write it into the file named "Odd.dat", otherwise write it into "Even.dat".

20.

Give the syntax of the function in graphics that is used to draw a circle. Draw a flowchart to find the average of n numbers given by the user.

Section "D"

Comprehensive Answer / Case / Situation Analysis Questions:

[2 × 10 = 20]
21.

What do you mean by enumerations? Explain call by value and call by reference. Write a program to swap two floating type numbers using call by reference.

22.

Create a structure that can hold the information of Book with bookID, title and price. Read and store N books in "book.dat" from the user. Display the title of the books having price<1000.