0% found this document useful (0 votes)
73 views2 pages

Time: 3 Hours Total Marks: 100

This document contains the questions and instructions for a BTech programming exam. It is divided into 7 sections with a total of 100 marks. Section A contains 10 short answer questions worth 2 marks each. Section B contains 3 out of 5 long answer questions worth 10 marks each. Section C contains 2 long answer questions worth 10 marks each to choose from. Sections D-G each contain 2 long answer questions worth 10 marks each to choose from. The questions cover topics related to algorithms, C programming basics, functions, arrays, sorting, searching and file handling.

Uploaded by

Aditya Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views2 pages

Time: 3 Hours Total Marks: 100

This document contains the questions and instructions for a BTech programming exam. It is divided into 7 sections with a total of 100 marks. Section A contains 10 short answer questions worth 2 marks each. Section B contains 3 out of 5 long answer questions worth 10 marks each. Section C contains 2 long answer questions worth 10 marks each to choose from. Sections D-G each contain 2 long answer questions worth 10 marks each to choose from. The questions cover topics related to algorithms, C programming basics, functions, arrays, sorting, searching and file handling.

Uploaded by

Aditya Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Printed Page: 1 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
 
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


Qno. Question Marks CO
a. Differentiate between algorithm and pseudocode. 2 1
b. What are header files? Why are they important? 2 1
c. Find the output of the following code: 2 2
void main()
{
int x=3 , y = 4 , a=6 , z=7,result ;
result = (x>y) + ++a || !c ;
printf(“%d”, result);
}
d. Write limitations of switch case. 2 2
e. Show the usage of break statement. 2 3

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_

h. Compare linear and binary search in terms of complexity. 2 4

5.
2P

i. Find the output of the following code: 2 5

.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

2. Attempt any three of the following: 3x10=30


M

Qno. Question Marks CO


8-

a. Draw block diagram of computer and explain each of its components in 10 1


|2

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

4. Attempt any one part of the following: 1x10=10


Qno. Question Marks CO
a. Explain Logical, Unary and Bitwise operators in detail. 10 2
b. Compare if-else-if ladder and switch case. Write a menu driven program 10 2
to perform basic functions of calculator.

5. Attempt any one part of the following: 1x10=10

2
2
Qno. Question Marks CO

1.
03

a. Define recursion. Write a program to find sum of Fibonacci series using 10 3

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

a. Implement sorting technique using bubble sort on the following 10 4


5:

sequence:
:5

34,78 ,12, 5 ,3, 98, 101, 15


08

b. What is searching? Write a program to implement linear search. 10 4


2
02

7. Attempt any one part of the following: 1x10=10


-2

Qno. Question Marks CO


ar

a. Define dynamic memory allocation. Differentiate between malloc () and 10 5


M

calloc () with proper example.


8-

b. Explain different file opening modes. Write a program to read content of 10 5


|2

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

You might also like