Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
2 views7 pages

POP Using C Model Questionpapers-2024-25

Model question paper for C

Uploaded by

shriyasm7
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)
2 views7 pages

POP Using C Model Questionpapers-2024-25

Model question paper for C

Uploaded by

shriyasm7
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/ 7

Model Question Paper- II with effect from 2024-25

USN

DAYANANDA SAGAR ACADEMY OF TECHNOLOGY & MANAGEMENT


(An Autonomous Institute under VTU, Belagavi)

First Semester B.E Semester End Examination Jan 2025/ Feb 2025

Course: Principles of Programming using C


Course Code: BESCS101
Max Marks: 100 Duration: 03 Hours
Note:
Answer any FIVE full questions, choosing at least ONE question from each MODULE

Module - 1 Marks BL CO
a Illustrate the basic structure of a computer with a neat diagram 5 L2 CO1

b List the rules of identifiers and Apply the rules of identifier 10 L3 CO1
Q.1 to classify the following as valid/invalid Identifiers.
i)num2 ii) $num1 iii) +add iv) a_2 v) 199_space
vi) apple vii)#12
c Explain the basic structure of a C program with an example. 5 L2 CO1

OR
a Discuss the data types available in C language with an example 10 L2 CO1

b Sketch an algorithm and flowchart to find roots of quadratic equation 10 L3 CO1


Q.2
Module – 2
a Summarize the following operators in C language 10 L2 CO1
i)Relational ii) Logical iii) Conditional iv)Unary v)Bitwise Operators
Q.3 b Design a C program that reads from the user an arithmetic operator and 10 L3 CO2
two operands, perform the corresponding arithmetic operation on the
operands using switch statement.
OR
Explain with syntax different loops in C Language.
a 10 L2 CO1
Q.4 b Design a C program to print the prime numbers with the limit specified 10 L3 CO2
from user
Model Question Paper- II with effect from 2024-25

Module – 3
4 L2 CO3
a Define array. Apply with suitable example how to declare and initialize 1D
array
Q5 6 L3 CO2
Write a program in C using functions to swap two numbers using global
b
variables concept and call by reference concept.
Implement Matrix multiplication and validate the rules of multiplication 10 L4 CO3
c
using C Program.
OR
Discuss the advantages and disadvantages of Recursion
a 4 L2 CO2
Q.6 b Write a program to print the largest and second largest element of the 6 L3 CO3
array.
Design inverse of a matrix using C Program.
c 10 L4 CO3
Module – 4
Define and explain the storage classes in C with an example
a 10 L2 CO2
b Explain about pointers and write the use of pointers in arrays with suitable 5 L2 CO3
example.
Q.7 Analyze the C syntax of structure declaration using example program.
c 5 L4 CO3
OR
Design any 4 different string operations with an example program.
a 10 L2 CO2
Illustrate Dynamic memory allocation functions with an example
b 5 L2 CO3
Q.8 Compare arrays and structures
c 5 L4 CO3
Module – 5
a Build Binary Search on the list of elements 20,50,55,65,75,90,98 and key 10 L4 CO4
Q.9 element if 50. Write the algorithm and draw the flowchart .
Design a C program to read employee information (Name, Designation,
b and Salary) from the user and write it to a file. 10 L3 CO4

OR
a Implement an algorithm and develop a C program that reads N integer 10 L4 CO4
numbers and arrange them in ascending order using selection Sort
Q.10 Design C program to merge two files into a third file(i.e., the contents of
b the first file followed by those of the second are put in the third file). 10 L3 CO4
Model Question Paper- I with effect from 2024-25

USN

DAYANANDA SAGAR ACADEMY OF TECHNOLOGY & MANAGEMENT


(An Autonomous Institute under VTU, Belagavi)

First Semester B.E Semester End Examination Jan 2025/Feb 2025

Course: Principles of Programming Using C


Course Code: BESCS101
Max Marks: 100 Duration: 03 Hours
Note:
Answer any FIVE full questions, choosing at least ONE question from each MODULE

Module - 1 Marks BL CO
List out the characteristics of computer.
a 4 L1 CO1
Illustrate the basic structure of the C program with an example.
b 6 L2 CO1
Define data type. Elaborate about various primitive data types
Q.1 c 10 L2 CO1
supported by C language with an example.

OR
Draw the structure of basic computer organization.
a 4 L1 CO1

Explain the rules for constructing Variables in C language with suitable


b examples. 6 L2 CO1
Q.2
Define an algorithm. Describe an algorithm and flowchart to
c find the largest of three numbers. 10 L2 CO1

Module – 2
a Evaluate the following expressions: 4 L3 CO3

100% 20 < = 20 - 5 + 100% 10 - 20 - = 5 > = 1! = 20


a +=b *= c = 7 where a = 5 b = 7 and c = 10.
Q.3
Write a C program to illustrate ternary operator.
b 6 L3 CO3
Explain the following operators in 'C' language:
c 10 L2 CO1
i)Relational ii) Logical iii) Conditional. iv) Unary v) Bitwise
OR
Develop a C program to display a pyramid of stars pattern using nested
a loops. 4 L3 CO3
Q.4 Write a C program to simulate simple calculator that performs arithmetic
b operations using switch statement. Error message should be displayed, if 6 L3 CO3
any attempt is made to divide by zero.
Illustrate different loops used in C program with syntax and examples.
c 10 L2 CO1

Module – 3
Model Question Paper- I with effect from 2024-25

4 L1 CO1
a Illustrate with syntax and examples the concepts:
Q5 i) Function Declaration ii) Function Definition iii) Function Call.
Write a C program to pass the parameters using functions. 6 L3 CO3
b
Create a C program to print the Fibonacci series using recursion. 10 L3 CO3
c

OR
Define Array. Explain the declaration and initialization of one
a dimensional and two- dimensional array with example. 4 L1 CO1
Q.6 Write a C program to perform the addition with two 2*2 Matrices.
b 6 L3 CO3
c Create a C program to find sum of all elements of the array using 10 L3 CO3
functions.
Module – 4
Define string, also illustrate string declaration and initialization.
a 4 L3 CO3
Develop a C program on string operations such as compare,
b 6 L3 CO3
Q.7 concatenate, and find string length. Use the parameter passing
techniques.
Create a C program to maintain a record of "2" student details using
c 10 L3 CO3
Structures with four fields (Roll number, Name, Marks and Grade).
Each field is of an appropriate data type. Print the marks of the student
given student name as input.

OR
Define pointer. Explain with an example, the declaration and
a initialization of pointer variable. 4 L3 CO3

Create a C program to read two numbers and function to swap these


Q.8 b 6 L3 CO3
numbers using pointers.
Develop a C program to maintain Employee salary details using
c 10 L3 CO3
Unions. Each field is of an appropriate data type. Display the salary
details of 3 employees.

Module – 5
a Build a C program for Linear search & Binary Search. 10 L4 CO4
Q.9 Outline the following with respect to files with syntax and example:
b i.fopen() ii. fclose() iii. fscanf() iv. fprintf() 10 L3 CO3

OR
Implement a C program for Bubble Sort and Selection Sort.
a 10 L4 CO4
Q.10 Design a C program to read employee information (Name, Designation,
b Salary) from the user and write it to a file. 10 L3 CO3
Model Question Paper- III with effect from 2024-25

USN

DAYANANDA SAGAR ACADEMY OF TECHNOLOGY & MANAGEMENT


(An Autonomous Institute under VTU, Belagavi)

First Semester B.E Semester End Examination Jan 2025/Feb 2025

Course: Principles of Programming using C


Course Code: BESCS101
Max Marks: 100 Duration: 03 Hours
Note: Answer any FIVE full questions, choosing at least ONE question from each MODULE

Module - 1 Marks BL CO
a Enumerate different symbols used in the design of a flowchart with their purpose 5 L2 CO1
using suitable examples.

b Illustrate the general structure of the C program with an example program. 5 L2 CO2
Q.1
Analyze the following piece of code and the type of error. Write the proper code
c for the same. 10 L4 CO3
i) num1 + num2 = sum;
ii) printf(“This is Principles of programming in C\n”)
iii) #include<stdio.h>
void main()
{
Myfunction();
}
iv) int num1=10, num2=20, product;
printf(“The product of 2 numbers is %d”, num1+num2 );
v) int a=5, b=0;
int quotient = a/b;

OR
a Explicate different tokens available in the C language with suitable examples. 7 L2 CO1

b Summarize the rules governing construction of identifiers in C. Give examples 6 L2 CO1


Q.2 for valid and invalid identifiers
Analyze the following output statements and write the output for each
c i) printf(“Name:XYZ Age:23 %c”,’a’);
ii) printf(“Name:XYZ\tAge:23\n %c”,’a’);
iii) printf(“The number %6d is greater than 10”,15); 7 L4 CO3
iv) printf(“The number %06d is greater than 10”,15);
v) printf(“The number %5.2f is greater than 10”,15.3442);
Module – 2
Distinguish between the following
a i) break and continue 7 L4 CO2
ii) while and do-while
Model Question Paper- III with effect from 2024-25

Develop a C program to display the grade based on following data:


b Marks Grade
Q.3 0 to 39 F
40 TO 49 E
50 TO 59 D 7 L6 CO5
60 TO 69 C
70 TO 79 B
80 TO 89 A
90 TO 100 O
Evaluate the following expressions given a=5, b=2, c=10. Write the values of a,
c b, and c for each expression after evaluation 6 L5 CO3
i) x = ++a-b++*c--
ii) x = (a>=b)&& -b*a==c
iii) x = a+2 > b && !c || a! = b && a <= c
OR
Determine the value of the variable i and the number of times the body of the
a loop is executed for the code below. Justify your answer. 6 L5 CO3
Q.4 i) for(i=1;i<=10;i++);
ii) i=10;
while(i>=10)
i-=2;
iii) i=1;
do
{
i++;
} while(i>1);
Develop a program to enter a number from 1 to 7 and display the
b corresponding day of the week using switch 7 L6 CO5
Develop a program in C to print the following pattern using looping statements
c 1
23 7
456 L6 CO5
7 8 9 10
11 12 13 14 15
Module – 3
Illustrate function declaration, function definition, and function call with syntax
a and examples. 5 L2 CO1
Q5 Develop a program in C using functions to swap two numbers using global variables
b concept and call by reference concept.. 10 L2 CO1
Develop a program to multiply two matrices using two-dimensional arrays.
c Display appropriate messages for different cases 5 L6 CO5

OR
a Explain the different ways of passing parameters to functions with examples 6 L2 CO1
Q.6 b Illustrate different types of recursion in C with suitable examples for each 10 L2 CO1
c Develop a program to display the Fibonacci Series of n numbers. Show the 4 L6 CO5
recursive call for Fibonacci(5)
Module – 4
a Develop user-defined functions to implement the following operations on stings 6 L6 CO5
i) String reverse ii) String concatenation iii) Finding String length

b Illustrate the declaration and initialization of a pointer variable with proper 7 L2 CO1
Q.7 memory representations. Illustrate how arguments can be passed to functions
Model Question Paper- III with effect from 2024-25

using pointers.

Develop a C program to define a structure to represent a cricketer's information


c (name, runs, average). Read the data corresponding to N Cricketer's in a 7 L6 CO5
structure array. The space for the array of structures should be determined at
run-time by user input.
OR
a Develop a program in C to read and print the names of n students of a class 6 L6 CO5

b Explain different dynamic memory allocation functions with syntax and examples 7 L2 CO1
Q.8
c Develop C constructs to implement struct, union, and self-referential structures. 7 L6 CO5
Module – 5
a Develop a program in C to sort the elements in an array using Selection sort 7 L6 CO4
Q.9 Illustrate the working of insertion sort for the following set of elements
b 50 40 70 20 15 35 75 10 5 7 L2 CO4
Develop a C program to read employee information (Name, Designation, Salary)
c from the user and write it to a file. 6 L6 CO4

OR
a Implement a C program to search an element in an array using binary search. 5 L6 CO4
Q.10 b Develop a program in C to sort the elements in an array using Bubble sort 7 L6 CO4
Explicate with syntax and examples different functions available in C to do the
c following operations on files 8 L2 CO4
i) read
ii) open
iii) close
iv) write

You might also like