B.TECH. (Model Paper) : (Sem I) Theory Examination 2020-21 Programming For Problem Solving

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Printed Pages: 02 Sub Code: KCS 101

Paper Id: 110111 Roll No.

B.TECH.(Model Paper)
(SEM I) THEORY EXAMINATION 2020-21
PROGRAMMING FOR PROBLEM SOLVING
Time: 3 Hours Total Marks: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.

SECTION A

1. Attempt all questions in brief. 2 x 10 = 20


Qn. Questio Marks CO
n
a. What is Algorithm? List characteristics of an algorithm. 2 CO1
b. What is pseudo code? 2 CO1
c. Find the output of the statement printf("%d%d%d",n++,++n,--n);if n=3. 2 CO2
d. What do you mean by precedence and associativity while solving some 2 CO2
arithmetic expressions?
e. How to use break statement in C? Explain with some sort of code. 2 CO3
f. What is the difference between while loop and do-while loop? 2 CO3

g. Differentiate user defined functions and standard library functions. 2 CO4


h. What is function prototype? Why is it required? 2 CO4
i. What are subscripts? How are they specified? 2 CO5
j. Write the difference between structure and union. 2 CO5

SECTION B

2. Attempt any three of the following:


a. Explain selection sort and write a C program to sort 4,1,2,8,9,6 using selection 10 CO5
sort.
b. What is a role of SWITCH statement in C programming language? Give the 10 CO3
syntax of SWITCH statement with a suitable example.
c. What do you mean by call by value and call by reference? Write an 10 CO4
algorithm for swapping two numbers using call by reference technique. Also
write a C program for the above stated algorithm.
d. Explain different types of operators used in C language with examples. 10 CO2
e. Describe the basic components of computer system with neat and clean 10 CO1
block diagram.
SECTION C
3. Attempt any one part of the following:
a. What do you mean by operating system? Explain its functions. 10 CO1

b. Write an algorithm and draw flowchart to compare three numbers and 10 CO1
find out the largest number.

4. Attempt any one part of the following:


a. Explain different storage classes in detail. 10 CO2

b. What are different data types in C. Explain in terms of memory size, format 10 CO2
specifier and range.

5. Attempt any one part of the following:


a. CO3
Differentiate between nested If and the switch statement in C language 10
with suitable example.

b. Write a program in ‘C’ and Draw flow chart to find whether a given number is 10 CO3

prime or not.

6. Attempt any one part of the following:


a. What is a function? Why programmers use functions in code? While 10 CO4
executing a function, how the values are passed between calling and
called environment?
b. Write a function in C to calculate factorial of given number and also write 10 CO4

a program to calculate the sum of the following series using the above
function s=1! + 2! + 3! +…. +N!

7. Attempt any one part of the following:


a. What is dynamic memory allocation? Explain the calloc(), malloc(), 10 CO5
realloc() and free() functions in detail. What is lifetime of a variable,
which is created dynamically?
b. Write a program in C to multiply a matrix of dimension 4*4 and store 10 CO5
the result in another matrix.

You might also like