Subject Code: CSF101/CS105 Printed Page 1 of 2
DIT UNIVERSITY , DEHRADUN
B.TECH (CSE) : END TERM EXAMINATION, EVEN SEM 2021-22 (SEM II)-Back paper
Roll No.
Subject Name: Programming for Problem Solving
Time: 3 Hours Total Marks: 1
Note: All questions are compulsory. No student is allowed to leave the examination hall before the completion of the exam.
______________________________________________________________________________________________________
Q.1) Attempt all Parts :
(a) Explain the bitwise operator with an example.
(b) Define different components used in ‘for’ the loop.
(c) What is the actual and formal parameter? Explain with an example.
(d) What is the difference between local and global variables?
[4 x 5= 20]
Q.2) Attempt all Parts :
(a) Which operator can be used to find out the size of the variable?
(b) What are the rules for the creation of an identifier?
(c) Write the name of any 3 input and output devices.
(d) What are the differences between GUI and CUI? List the name of any 2 CUI and GUI interfaces.
[4 x 5= 20]
Q.3) Attempt any two parts :
(a) Convert the following.
i) (244.40)6 = ( ? )2 ii) (3254.24)10 = ( ? )16 iii) (234)5 = ( ? )9
iv) (1101101.11)2 = (?) 16.
(b) Explain different storage classes used in C.
(c) Explain and draw the flow chart of for, do-while, and while loop. Also, explain the differences between while
and do-while.
[2 x 10= 20]
Q.4) Attempt any two parts :
(a) Write a program to calculate F(x) = X1 – X3 + X5 – X7 up to 10 terms.
(b) What do you mean by searching? Write a program to search for an element in the given array.
(c) Draw a neat schematic of the digital computer and explain the different roles of each unit. Also, explain
different types of Memory used in computers.
[2 x 10= 20]
Q.5) Attempt any two parts :
(a) Create a structure to specify data of 100 employee
emp_id, name, designation, salary, year_of_joining
i) Write a function to print names of all employee who are getting salary>25000.
ii) Write a function to print the data of an employee whose emp_id is given.
(b) Write a program to find out whether a given number is Armstrong’s number?
(c) What do you mean by function? Also, explain the function prototype. What are the differences between the
‘call by value’ and ‘call by reference’ method? Explain with a suitable example.
[2 x 10= 20]
-----END OF PAPER ----
Subject Code: CSF101/CS105 Printed Page 2 of 2