Page 1 of 2
Printed Pages:02 Sub Code: KCS 201
Paper Id: 110265 Roll No.
B. TECH
(SEM II) THEORY EXAMINATION 2018-19
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.
Marks CO
a. What is the difference between .obj and .exe files in C? 2 2
b. List the components of C language. 2 1
c. Differentiate assignment and equality operators in C. 2 1
d. Correlate else if ladder and switch case statement. 2 3
e. Differentiate while and do while loop. 2 3
f. Differentiate recursion and iteration. 2 3
g. Explain the significance of null character in string. 2 5
h. Differentiate linear and binary search. 2 4
i
ar
i. Differentiate static and dynamic memory allocation. 2 5
2
w
j. Define the structure of a node in linked list. 2 5
1.
Te
24
SECTION B
h
5.
es
.5
2. Attempt any three of the following:
aj
17 Marks CO
R
|1
a. Draw the block diagram of a computer system. Explain its different 10 1
r.
components with suitable example.
D
b. Differentiate operator precedence and associativity. Write a program in 10 1
:5
C to elaborate the use of logical AND and logical OR operators in C.
57
c. What is the use of break statement in loops? Write a program in C using 10 3
:
08
while loop to elaborate the use of break statement.
d. Write a program in C to input two 3x3 matrix from the user and print 10 3
9
multiplication as the result in matrix form. (Write comments also at
1
appropriate places in the program)
20
e. Explain the importance of pointers in C. Write a program in C to swap 10 4
-
the values of two numbers entered by user using function call by
ay
reference method.
M
8-
SECTION C
|0
3. Attempt any one part of the following:
Marks CO
a. Write an algorithm and draw a flowchart to find the sum of digits of an 10 2
integer number entered by the user.
b. Write an algorithm and draw a flowchart to reverse an integer number 10 2
entered by the user.
KCS201
Dr. Rajesh Tewari | 08-May-2019 08:57:53 | 117.55.241.2
Page 2 of 2
4. Attempt any one part of the following:
Marks CO
a. Define the term mixed operands in an arithmetic expression with few 10 1
examples. Write a program in C to elaborate the use of type casting.
b. Explain the use of default in switch statement. Write a program that 10 3
takes two operands and one operator from the user and perform the
operation and prints the result by using switch statement.
5. Attempt any one part of the following:
Marks CO
a. Write a program in C to print following pattern with appropriate 10 3
comments:
10
98
765
4321
b. Discuss the concept of assembler. Explain complier, interpreter, loader 10 3
and linker with example.
i
ar
2
w
6. Attempt any one part of the following:
1.
Te
24
Marks CO
a. Write the importance of sorting in problem solving. Write a program in 10 4
h
5.
es
C using bubble sort technique to sort 10 numbers entered by the user.
.5
b. Explain the importance of structure in C programming. Write a program 10 5
aj
17
in C using structure to enter and print the record of 10 books available in
R
|1
your library. Following fields may be included in the record: -
r.
book_title, book_price and number_of_pages.
D
3
:5
57
7. Attempt any one part of the following:
:
Marks CO
08
a. Define various file operations in C. Write a program in C to count and 10 5
9
print the number of characters in a file.
1
b. Explain the following: 10 5
20
(i) Macros. (ii) Union (iii) Enumerated data types (iv) Type conversion
-
ay
M
8-
|0
KCS201
Dr. Rajesh Tewari | 08-May-2019 08:57:53 | 117.55.241.2