0% found this document useful (0 votes)
5 views

C PROGRAMing Question

Uploaded by

athirayanpericse
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

C PROGRAMing Question

Uploaded by

athirayanpericse
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Reg.

No:

SET A
DEPARTMENT OF ELECTRONICS ANN COMMUNICATION ENGINEERING
CAT 1 Examination - Sep 2024
CS3353- C PROGRAMMING AND DATA STRUCTURES
Year/Sem/Sec : II/III Date : 28.09.2024
Department : ECE Duration : 3 hours
Faculty Name : ATHIRAYAN.S Max. Marks : 100
PART A (10 x 2= 20)
CO
1. Give the length and range of the primitive data types. U
1
CO
2. State the use of void data types. R
1
CO
3. Differentiate between row and column major representation of arrays. U
1
What will be the output of the following program.
#include<stdio.h>
Int main()
{
Float x=0.1;
If(x==0.1) CO
4. A
Printf(“if “); 1
Else if (x==0.1f)
Printf (“else if”);
Else
printf(“else”);
}
What is the static variable? Give example. CO
5. R
1
Similarities between structure and union. CO
6. U
2
CO
7. Define preprocessor and list out a few examples. R
2
CO
8. Define structure within a structure R
2
CO
9. What is pointer to function? R
2
CO
10. Define Union. R
2
PART B (5X13=65)
11(A
Explain the various data types in C with example. (OR) R CO1
)
11
Describe the various operators in C with examples and the associativity R CO1
(B)
12(A Explain conditional statements in C U CO1
) i)while ii)do while iii)For loop (OR)
Explain the recursion and write a c program to the first ‘n’ number in U
12(B) CO1
the Fibonacci series using recursion
Write a C Program for Double Dimensional Array
13(A A) Find Smallest and Largest Value (5)
AP CO2
) B) Find Sum of Non-Diagonal Elements (4)
C) Find the Transpose of a Matrix (4) (OR)
How two-dimensional arrays are created in C? Write a C program to
13(B) generate a population survey having citizen’s record stored as a AP CO2
collection of year wise population.
14(A
Explain the structure concepts in details with example. (OR) U CO2
)
Define a structure to store details of 10 bank customers with customer
name, account no, balance and city. Write a C program to store the U
14(B) CO2
details of customers in the bank access and print the customer details
for a specified account no.
Illustrate the representation of structure and union for an employee
15(A record having empid, emp name, DOB, basic pay, allowances,
R CO2
) deduction gross pay and net pay. Examine the memory allocation.
(OR)
15(B) Explain about how to declare pointer to function with an example. R CO2

PART C (1 x15=15)

Write a C program using structures to store roll Num, name, marks in 10 subjects
of 100 students. Calculate the grade of each student and print the student
information .The grades are calculated as follows(Dec-19)
Letter Grade Grade points Marks
Range
O(outstanding) 10 91-100
16(
A+(Excellent) 9 81-90 AP CO2
A) A (Very Good) 8 71-80
B+ (Good) 7 61-70
B (Average) 6 50-60
U/RA 0 <50
(OR)
16( Write a c program to get two numbers and exchange these numbers
AP CO2
B) using pass value and pass by reference.
Reg.No:

SET B

DEPARTMENT OF ELECTRONICS ANN COMMUNICATION ENGINEERING


CAT 1 Examination - Sep 2024
CS3353- C PROGRAMMING AND DATA STRUCTURES
Year/Sem/Sec : II/III Date : 28.09.2024
Department : ECE Duration : 3 hours
Faculty Name : ATHIRAYAN.S Max. Marks : 100

PART A (10 x 2= 20)


CO
1. What are primitive data types? U
1
CO
2. Differentiate between while and do-while loops? R
1
CO
3. How ternary operator to be used in C? R
1
CO
4. Write the syntax for Two-dimensional array. U
1
How will you initialize array in C? CO
5. R
1
What is the use of dot operator in structures? CO
6. U
2
What does #include<header_name>do How it is possible to tell the CO
7. R
preprocessor where to look for header files. 2
CO
8. Define pointer. R
2
CO
9. What are preprocessor directives? R
2
10. How to initialize Pointers in C? U CO
2
PART B (5X13=65)
11(A Write a C program using Union to store roll Num, name, marks in 10
subjects of 100 students. Calculate the grade of each student and print AP CO1
)
the student information. (OR)
11 Write a program to perform the linear search operations on some AP CO1
(B) number of elements.
12(A Explain the recursion and write a c program to the first ‘n’ number in U CO1
) the Fibonacci series using recursion. (OR)
12(B) Explain the C functions for file handling operations. U CO1
13(A Explain decision making loop in C U CO1
) i) if ii) if –else iii) if else ladder. (OR)
State and explain single and Multi-Dimensional Array with Examples.
13(B) U CO1
Write both iterative and Recursive functions in C to evaluate ab

14(A Explain the various functions available in C programming with


example. U CO2
)
(OR)
14(B) How to declare pointers to function with example. U CO2
15(A Write a C program using Union to store roll Num, name, marks in 10
subjects of 100 students. Calculate the grade of each student and print R CO2
)
the student information. (OR)
What is a pointer variable? Explain declaration, initialization and R
15(B) CO2
accessing a pointer variable with an example

PART C (1 x15=15)

16( Write a C program to get a 10 student details using structures from the
U CO2
A) user and display these details on the screen. (OR)
16( Write a c program using pointer for searching desired element from
U CO2
B) the array

You might also like