Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

NATIONAL INSTITUTE OF TECHNOLOGY

(Established by Ministry of Human Resource Development, Govt. of India)


Yupia, District Papum Pare, Arunachal Pradesh – 791112
End Semester Examination (Jan-June, 2020)
CSE - 112 (Introduction to Computer Programming)
Time: 3 Hrs Full Marks: 50

Instructions:
1.      Answers should be hand written on a plane A4 paper by the student.
2.      Every answer sheet should be signed by the student.
3.      Answer sheets should be scanned & converted into PDF and then e-mailed
to biriarun@nitap.ac.in (within 6 to 7 hours from the time of the issue of the question
paper) by the student.
4.      All questions are compulsory.

1. Develop a top-down modular program that will perform the following tasks:
a) Read two integer arrays with unsorted elements.
b) Sort them in ascending order.
c) Merge the sorted arrays.
d) Print the sorted list.

Use the function for carrying out each of the above tasks. The main function should have only
function call.

2. Define a structure that can describe a hotel. It should have the members that include the name.
address, grade, average room charge, and number of rooms.
Write a function to perform the following operations:
A) To print the hotel name of a given grade in order of charges.
B) TO print out hotels with room charges less than a given values.

3. Write a C Program to sort a set of names stored in a 2D-array, in alphabetical order (by first
character only).

4. Write a c program to store the record (Name, ROLL, BRANCH, TOTAL MARKS) of n
number of students and display the NAME and ROLL of the student who scored the highest
marks.

5. Write a C program that will read the value of x and evaluate the following function by using
conditional operator.

x2 + 3x + 4 for x>4
y= x3 + 7x + 1 for x=4
x+1 for x<4

You might also like