SRM Institute of Science and Technology College of Engineering and Technology
SRM Institute of Science and Technology College of Engineering and Technology
SRM Institute of Science and Technology College of Engineering and Technology
Number
ANSWER KEY
S.No Course PO PO2 PO3 PO4 PO5 PO6 PO PO PO9 PO1 PO11 PO12
Outcome 1 7 8 0
1 CO1 2 3 2
2 CO2 2 3 2
3 CO3 2 3 2
4 CO4 2 3 2
5 CO5 2 3 2
CO-1: Solve problems through computer programming. Express the basic data types and variables
in C
CO-2: Use appropriate data types in simple data processing applications. To create programs using
the concept of arrays.
Part A (10* 1 = 10 Marks)
Sl. Mark B C P PI
Question Code
No s L O O
1 C) bool 1 1 1 1 1.4.1
4 A) & 1 2 1 2 2.2.4
5 B) 10 1 2 1 2 2.4.1
6 A) 1 2 3 1 2 2 2 2.1.2
8 B) int x = 5; 1 2 1 2 2.4.2
9 C) 11 1 2 1 2 2.4.2
10 B) 15 1 2 1 2 2.4.2
Part B (5 * 4 = 20 Marks)
M
Sl. B PI
Question ar CO PO
No ks
L Code
Illustrate the concept of operator precedence in C
through an example.
14 Fill the code given and explain how the desired 4 3 2 2 2.4.2
output will be generated.
#include <stdio.h>
int main() {
int number;
printf("Enter a number: ");
scanf("%d", &number);
if (number> 0) { // Blank 1
printf("The number is positive.\n");
}
else if (number < 0) { // Blank 2
printf("The number is negative.\n");
}
else {
printf("The number is zero.\n"); // Blank 3
}
return 0;
}
You are working on a banking application that
requires a feature to help customers track their
daily expenses. The program should allow users to
input their daily expenses one at a time. When the
user enters a negative value, it indicates that they
have finished entering expenses for the day.
15 Implement using a C program to calculate and 4 3 2 4 2.4.2
display the total amount spent.
Algorithm(or)Program
User Input the expense (1)
Check for negative value to stop the input(1)
Find the total expense(1)
Display the final savings(1)
Part C (2 * 10 = 20 Marks)
M
a
Sl. PI
Question r BL CO PO
No k
Code
s
Design an algorithm and implement the same
using C program for carrying out the following
tasks
● Read yesterday’s and today’s temperature
CO Coverage %