You are on page 1of 1

Roll Number:

Thapar Institute of Engineering & Technology, Patiala


Department of Computer Science & Engineering
AUXILIARY EXAMINATION
BE - I Year, Semester I Course Code: UTA003
Aug 23, 2022 Course Name: Computer Programming
Time: 2 Hours M. Marks: 50
Name of Faculty: Dr Anshu Parashar

Note: Attempt all 5 questions. Assume missing data, if any, suitably. Solve all the parts of a question in order. Avoid
cutting.

Note:- Check your evaluated answer sheet before 29/08/2022.

Ql. (a) Explain the purpose of the flowchart and its different notations. Draw a flowchart for computing
the sum of 1 to 10 numbers. (6)

(b) Convert following as per mentioned number systems. (4)


I. (101101)2 =( )n)
11. (921)10 =( )16
m. (1010111100)2 =( )s
iv. (951)16 =( )8

Q2. (a) Differentiate between WHILE & DO-WHILE loops with a suitable example. (5)

(b) Write a program for a calculator that takes an arithmetic operator +, *, / & two integers
as an input and then, performs the calculation on the two operands depending upon the
operator entered by the user. (5)

Q3. (a) What do you mean by Call by value & Call by reference? Explain with suitable examples. (5)

(b) Write a program to compute the Factorial of a number using Recursion. (5)

Q4. (a) What do you mean by Pointers? Exaplain its applications through suitable example. (5)
(b) Discuss briefly file handling in C along with various file opening modes. (5)

Q5. (a) Differentiate between Structure and Union with a suitable example. (5)

(b) Write a C program using a structure i.e. EMP to store details of 05 employees. The structure should
have three members: emp name, emp_code, and emp_salary. (5)

You might also like