19AI305 -Advanced c programming-nov 2024updated (1)
19AI305 -Advanced c programming-nov 2024updated (1)
Common To
Course Code 19AI305 Course Name Advanced C Programming
Mention the
Faculty Name Mr. Nagendran Department AI&DS Branches here
(PART A – 2 Marks)
UNIT - I
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
Write a program to initialize the value as 7680 & display the value CO
QA102 on the monitor. 1 K6 2
CO
Illustrate the C Programming Structure.
QA103 1 K2 2
CO
QA105 Write a C program to find area and circumference of circle. K6 3
1
CO
QA106* How to declare a constant in C? K2 2
1
How to modify the loop control variable within the loop body? CO
QA107* K2 2
Provide an example. 1
UNIT – II
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
CO
Discuss the types of arguments passing in C.
QA201 2 K2 2
CO
Describe the process of accessing the value stored at the memory
QA206* 2 K2 2
address indicated by a pointer.
CO
QA207* How to return multiple values from a function? 2 K2 2
CO
QA208* List the two main components of a recursive function. 2 K2 2
UNIT - III
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
CO
Determine 3-Dimensional Array and indexing with neat diagram.
QA302 3 K2 2
CO
Create a C program to read n elements as input and print the sum of
QA304 3 K6 3
all elements of the array (integer).
List the differences between searching and sorting techniques CO
QA305 K2 2
3
CO
QA308* Distinguish between int[] a and int a[]? K2 2
3
UNIT - IV
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
CO
QA401 Define structure with an example. K2 2
4
CO
QA403 Define self-referenced structure with an example. 4 K2 2
CO
Describe whether structures can include other structures as
QA406* 4 K2 2
members and explain the method for doing this.
CO
Mention the method for determining the length of a linked list using
QA407* 4 K2 2
a recursive approach
CO
QA408* How to modify a singly linked list into doubly linked list? 4 K4 2
UNIT - V
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
CO
QA501 Write a program to find sum of two fraction values K2 62
1
CO
QA502 Write a C program to find the length of the string “saveetha” . K2 2
1
CO
QA503 Define Conditional Operator with an example? K2 2
1
CO
QA505 Write a C program to find the ASCII value of &. K6 2
2
CO
QA506* How to find the first occurrence of a character in a string in C? K2 2
2
CO
QA507* What are the consequences of not initializing an array? K2 2
3
CO
QA508* What does the `&` operator do when used with a variable? K2 2
2
(PART B – 13 Marks - Either Or Type)
UNIT - I
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
Write a program in C to read any Month Number in integer and
display Month name in the word.
For example:
Inp
Result CO
QB101 (a) ut K6 3
1
12 December
7 July
(Or)
Write a program to find if a given number is positive or negative
or zero using ladder if.
(Or)
Write a C program to read the value of an integer m and display
the value of n as follows.
n is 1 when m > 10
n is 0 when m is 10
n is -1 when m < 10
For example:
CO
QB102 (b) Inp K6 3
Result 1
ut
10 The value of m
= 10
The value of n
=0
Write a C Program to simulate the bitwise operators(&, | ) using
the switch statement
For example:
Input Result
CO
QB103 (a) K6 4
10 & Result = 1
40 8
10 | Result =
40 42
(Or)
QB103 (b) Write a C program for the following pattern: CO K6 4
% 1
%%
%%%
%%%%
%%%
%%
%
(Or)
UNIT - II
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
Given a string consisting of alphabets and digits, write a C
program to find the frequency of each digit in the given string CO
QB201 (a) K6 3
using functions. 2
(Or)
(Or)
Given three integers A, B, and N, develop a C code to find the Nth
term of the modified Fibonacci sequence, where each term is the CO
QB202 (b) K6 3
sum of the squares of the previous two terms using recursive 2
function.
(Or)
UNIT - III
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
Given an array of integers, write a C program to calculate the
fractions of its elements that are positive, negative, and are CO
QB301 (a) K6 3
zeros. 3
(Or)
Given an array of n integers and a number, d, develop a C
program to perform d left rotations on the array. Then print the
CO
QB301 (b) updated array. K6 3
3
(Or)
Given an array of n integers ,develop a C program to reorder the
array such that the even integers appear first followed by the odd CO
QB302 (b) K6 3
integers, while maintaining the relative order of even and odd 3
integers.
Write a C Program to arrange the following values 15, 22, 30, 10,
18, 64 in descending order using bubble sorting technique.
Before bubble sorting the elements are: CO
QB303 (a) K6 3
15 22 30 10 18 64 3
After bubble sorting the elements are:
64 30 22 18 15 10
(Or)
Write a C Program to arrange the given array 125, 181, 130, 25,
61, 887 in ascending order using merge sorting technique.
Before merge sorting the elements are: CO
QB303 (b) K6 3
125 181 130 25 61 887 3
After merge sorting the elements are:
25 61 125 130 181 887
Write a C program to implement a function that receives an
CO
QB304 (a)* array of integers as input and calculates the frequency of each K6 3
3
element.
(Or)
Given an array of integers and implement a C program to
implement a function that receives an array of integers as input CO
QB304 (b)* K6 3
and calculates the sum of the absolute differences between 3
consecutive elements.
UNIT - IV
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
(Or)
Create a C Program for reverse the doubly linked list and return CO
QB402 (a) K6 4
the head pointer of the reversed list 4
(Or)
(Or)
UNIT - V
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
Write a C Program to take two numbers as input from the user
and then calculating the following with ternary operator. CO
QB501 (a) K6 3
1. check whether the numbers are equal or not. 1
2. find the smallest of two numbers
(Or)
Write a C program to read temperature in centigrade and display
a suitable message according to temperature state below : Temp CO
QB501 (b) K6 3
< 0 then Freezing weather, Temp 0-20 then Very Cold weather, 1
Temp 20-30 then Cold weather, Temp 30-40 then Normal in
Temp, Temp 40-50 then Its Hot, Temp >=50 then Its Very Hot
(Or)
Create a C program to check whether the given number is
Armstrong number and or not and find and print all Armstrong CO
QB502 (b) K6 3
numbers between two given numbers using for loop. 2
(Or)
Given an unordered array of consecutive integers from 16 to n
with no duplicates, develop a C program to find the minimum CO
QB503 (b) K6 3
number of swaps required to sort the array in ascending order. 3
UNIT - I
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
Write a C program to compute the average distance traveled per
day, given the total distance traveled and the number of days CO
QC101 (a)* K6 4
over which the distance was traveled. 1
(Or)
Implement a C program which calculates the income tax for an
individual based on the following tax slab rates in India for the fi-
nancial year .
UNIT - III
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
Write a C program that accepts an array of strings, generates all
possible permutations of each string by reversing characters, CO
QC301 (a)* K6 5
and then prints each permutation 3
(Or)
(Or)
Design and implement a C program for an order management
QC401 system using a doubly linked list. Implement methods to add an CO
K6 5
(b)* order, delete an order and process an order. Use a doubly linked 4
list where each node represents an order.
UNIT - V
Knowledge
Difficulty
Q. No Questions CO Level
Level (1-5)
(Blooms)
Design a C program to manage student records using a singly
linked list. Each student record should contain the student ID,
CO
QC501 (a)* name, and grade. Implement methods to add a student, delete a K6 5
4
student, update a student's grade, and display all student
records.
(Or)
Write a C program to find the longest common prefix string
among an array of domain names. If the list is empty, return an CO
QC501 (b)* empty string. If there is no common prefix, return "No common K6 4
3
prefix”
General Instructions
(ii) For each Question, mention CO1, CO2 etc. for Course Outcomes.
Verify the COs with the Syllabus (Avl in Website) before framing the Questions.
An Either or type Question should have same CO in both (a) and (b) parts.
(iii) For each Question, mention any number from 1 to 5 for Difficulty Level
(iv) Mark with * near the Q.No for those Questions which are framed newly and were not included
in the QRs of LAST TWO SEMESTERs. Ensure minimum 2 new updations per unit in all Parts - PartA,
PartB & PartC. Hods are requested to maintain the QRs of each semester in a common drive and the same shall
be shared to all Faculty members of their Dept. If any subject is NEW (Introduced First time) or if all the
Questions are totally new , kindly mention that on the TOP of the Question Repository.
(v) Kindly Mention NOV 2024 on the Top without fail and allot split up of marks for subdivisions.
(vii) Type the Answer Key in the same QR template across the respective Q.Nos and delete the last 3 columns