C Pyq3
C Pyq3
USN BESCK204E/BESCKE204
7
:1
Introduction to C Programming
3
Time: 3 hrs. Max. Marks: 100
:2
Note: 1. Answer any FIVE full questions, choosing ONE full question from each module.
U
01
2. M : Marks , L: Bloom’s level , C: Course outcomes.
-B
Module – 1 M L C
3
Q.1 a. Explain the major components of a computer and explain briefly. 8 L2 CO1
U
02
b. Explain the structure of a C program with an example. 6 L2 CO2
-B
c. Explain an identifier. What are the rules to define an identifiers?
-2 6 L2 CO2
OR
U
10
Q.2 a. Explain the different types of files used in C. 10 L2 CO2
-B
b. Discuss the following with an example: 10 L2 CO2
(i) Algorithm (ii) Flow chart (iii) Pseudo code
3-
Module – 2
U
-0
Q.3 a. Explain the logical operators and bitwise operators used in C with suitable 7 L2 CO2
-B
examples.
U
1
1 2 1 m
-B
7p
1 2 3 2 1
U
1 2 3 4 3 2 1
U
-B
:5
1 2 3 4 5 4 3 2 1
-B
33
c. Explain type casting and type conversion with suitable examples. 5 L2 CO2
U
OR
U
-B
:
01
Q.4 a. Explain the syntax of a switch statement. Write a C program to perform 10 L2 CO2
-B
b. Explain if, if else and nested if-else along with programming example. 10 L2 CO2
23
U
-B
Module – 3
-B
Q.5 a. Explain the need for functions in C. With an example code, explain the 10 L2 CO4
20
following :
U
-B
0-
OR
-B
functions.
-B
Q.7 a. Write a C program to find the transpose of a given n n matrix by passing 10 L2 CO3
-B
matrix to a function.
b. Explain the different functions used to read and write characters. 10 L2 CO4
U
-B
1 of 2
BU
BESCK204E/BESCKE204
pm
OR
Q.8 a. With pictorial representation, explain how a 1D and 2D arrays are stored in 10 L2 CO3
7
the memory. Give suitable examples.
:1
b. Write a C program to perform matrix multiplication, also validate the rules 10 L2 CO3
of matrix multiplication.
3
Module – 5
:2
Q.9 a. What is a reference and dereference operator used to access a pointer 10 L2 CO3
U
01
variable. Write a C program to test whether a given number is positive,
-B
negative or zero using pointers.
b. Write a C program using structures to read, display, add, subtract two 10 L2 CO3
3
complex numbers.
U
02
OR
-B
Q.10 a. Write a C program to reverse a string with or without built in function.
-2 10 L2 CO3
b. Explain the following with an example with respect to structures: 10 L2 CO3
U
(i) Structure name
10
-B
(ii) Member of a structure
(iii) Accessing a structure
3-
U
-0
-B
U
VT
m
-B
7p
U
U
-B
:5
-B
33
U
U
-B
:
01
-B
U
23
U
-B
-B
20
U
BU
-B
0-
-1
U
03
-B
U
-B
U
-B
U
-B
2 of 2
BU