Time: 3 Hours Total Marks: 100
Time: 3 Hours Total Marks: 100
BTECH
(SEM I) THEORY EXAMINATION 2021-22
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
2
2
f. Differentiate between scope and lifetime of variable. 2 3
1.
03
24
g. Write limitations of subscript operator in an array. 2 4
2_
5.
2P
.5
void main()
P2
{ 17
Q
|1
int a ,*p;
//value of a is input by the user and assumed it is equal to 7.
17
p = &a;
5:
scanf(“%d”, p);
:5
printf(“%d”,a);
08
}
j. Explain the significance of End of File (EOF). 2 5
2
02
SECTION B
-2
ar
brief.
b. Differentiate between type conversion and typecasting. Write a program 10 2
to input a floating-point number and find leftmost digit of integral part of
a number.
c. Write a program to find the sum of series using function 10 3
1! + 2! + 3! + 4! +----------- n terms.
d. Write a program to find transpose of matrix. 10 4
e. Why are preprocessor required? Explain any two preprocessor directives 10 5
1 | P a g e
QP22P2_032 | 28-Mar-2022 08:55:17 | 117.55.241.2
Printed Page: 2 of 2
Subject Code: KCS101T
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
Qno. Question Marks CO
a. Define flowchart and draw a flowchart to find largest among three 10 1
numbers.
b. Explain in detail about all storage classes with proper example. 10 1
2
2
Qno. Question Marks CO
1.
03
24
2_
recursion.
5.
b. Differentiate between call by value and call by reference with proper 10 3
2P
.5
example.
P2
17
Q
|1
6. Attempt any one part of the following: 1x10=10
Qno. Question Marks CO
17
sequence:
:5
any file and display the number of lines and words in that file.
2 | P a g e
QP22P2_032 | 28-Mar-2022 08:55:17 | 117.55.241.2