www.FirstRanker.com www.FirstRanker.
com
,.../
USN 18CPS13/23
11
First/Second Se B.E. egree Examination, Dec.2019/Jan.2020
C Programming for Problem Solving
Time: 3 hrs. Max. Marks: 100
Note: Answer any FIVE full questions, choosing ONE full question front each module.
Module-1
How would you explain the components of a computer with the block diagram? (08 Marks)
Describe the types of computers. (06 Marks)
Convert the following mathematical expression into C equivalent statements.
4
Y
i) m = x + X + — — 4x +6
k
— b + \r/ b 2 —4ac
ii) x=
2a
2
iii) Area = irr + 27trh (06 Marks)
OR
2 a. How can you write the basic structure of a C program? Explain with examples. (08 Marks)
b. Define a token. Explain the different tokens available in C language. (08 Marks)
om
c. How would you explain logical operator in a C language. (04 Marks)
r.c
Module-2
ke
3 a. With examples how would describe the formatted input and thrmatted output statements in
C language. (08 Marks)
an
b. How would you explain if— else statement in C language? Give the relevant ex ample.
tR
(06 Marks)
irs
c. Write a program in C to display the grade based on the marks as follows :
Marks Grades
.F
0 to 39 F
w
40 to 49 E
w
D
w
50 to 59
60 to 69 C
70 to 79 B
80 to 89 A
90 to 100
(06 Marks)
OR
4 a. How would you explain switch statement with an example? (08 Marks)
b. How the while loop differs from do-while loop? (06 Marks)
c. Write a program to check whether a given integer is palindrome or not? (06 Marks)
CC Module-3
0
5 a. Define an array. How would you explain declaration and. initialization of one dimensional
C array? (06 Marks)
b. Write a program in C to implement binary searching technique. (06 Marks)
c. How would you explain with examples, the string manipulation functions? (08 Marks)
www.FirstRanker.com
www.FirstRanker.com www.FirstRanker.com
1 8CPS13/2.3
OR
6 a. Write a program to read N integers and to arrange them in ascending order using bubble sort
technique. (06 Marks)
b. How would you explain the declaration and initialization of string variables? (06 Marks)
c. Write a program to multiply 2 matrices, by ensuring their multiplication compatit )ility.
(08 Marks)
Module-4
7 a. How would you illustrate the elements of user defined functiOns with examples? (10 Marks)
b. Write a program in C to find the factorial of a given integer using functions. (05 Marks)
c. Explain how call by value differs from call by reference while invoking a functio n.
(05 Marks)
OR
8 a. How would you explain the categories of user defined functions? (10 Marks)
b. Write a program in C to compute the Fibonacci series up to n terms using recursi on.
(06 Marks)
c. List the storage class specifiers. Explain any one of them. (04 Marks)
om
Module-5
9 a. Define a structure. How would you declare and initialize structure variables? Give examples.
r.c
(07 Marks)
b. Define a Pointer. How the pointers are declared and initialized?
ke
(06 Marks)
c. Write a C program to read details of 10 students and to print the marks of the student if his
an
name is given as input. (07 Marks)
tR
irs
OR
10 a. Write a program in C to add two numbers using pointers. (05 Marks)
.F
b. How would you explain the categories of preprocessor directives in C? (10 Marks)
w
C. How would you explain nested structures? (05 Marks)
w
w
www.FirstRanker.com