Topperworld - In: Time: 3 Hours Total Marks: 100
Topperworld - In: Time: 3 Hours Total Marks: 100
BTECH
(SEM I) THEORY EXAMINATION 2021-22
PROGRAMMING FOR PROBLEM SOLVING
SECTION A
1. Attempt all questions in brief. 2x10 = 20
Qno. Question Marks CO
a. Draw the Memory hierarchy representation. 2 1
b. Why is RAM called a Volatile memory? 2 1
c. Write down the output of following code. 2 2
#include <stdio.h>
int main()
{ int a=23;
;
;printf("%d",a);
;
return 0;
.in
}
d. Write down the output of following code. 2 2
ld
#include<stdio.h>
int main()
or
{ int a = 5;
a = 1, 2, 3;
w
printf("%d", a);
return 0;
er
}
e. Write the use of continue statement. 2 3
pp
f. What is the difference between entry control loop and exit control loop? 2 3
g. How the size of the structure defined in c programming? 2 4
To
SECTION B
2. Attempt any three of the following: 3x10 = 30
Qno. Question Marks CO
a. Differentiate between Compiler and Interpreter. Draw the flow chart of 10 1
swapping of two numbers.
b. What do you mean by Operands? Discuss the operator precedence and 10 2
associatively of all the operators.
c. Write the advantage of recursive function? Write a program to print the 10 3
Fibonacci series up to n number with recursive function.
d. Write short note on array. Write the program for matrix multiplication of 10 4
two matrix elements.
e. Explain the concept of pointer in self-referential structure with proper 10 5
example.
|Page
Printed Page: 2 of 2
Subject Code: KCS101
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
BTECH
(SEM I) THEORY EXAMINATION 2021-22
PROGRAMMING FOR PROBLEM SOLVING
SECTION C
3. Attempt any one part of the following: 1x10=10
1
23
w
456
er
7 8 9 10
b. Write a Program to find the entered number is Armstrong number or not. 10 3
pp
a. Write a program two find out the odd place and even place numbers 10 4
from the array elements and print the sum of these numbers respectively.
b. Write the program for bubble sorting an explain it with example list 5, 7, 10 4
2, 1, 3, 6.
|Page