Programming in C
Programming in C
F 0100EST1020s2003 igeT.?\es
RegNo.:
APJ ABDUL aKALAM TECHNOLOGICAL
Second Semester B.Tech Degree Examination June 2022 (201 (;H,.-9
PART B
Answer any one Questionfrom eoch module. Each question canies 14 Marks .
I I a) Explain hpear search with an example. Draw a flowchart and write pseudo code (14)
to perform linear search on an array of numbers
- .*o* '
T2 a) List five important registers in CPU. Also state the purpose of each register. (6)
b) Write an algorithm to find sum of digits of a number. (8)
l3 a) Explain different data types supported by C language with their memory Q)
requirements.
b) Write down a C program to check if a number is present in a given list of (7)
numbers. If present give location of the number otherwise insert the number in
Page 1 of 2
0100EsT102052003
14 a) Explain formatted and Unformatted VO functions of C language with syntax and (7)
example. t
b) Write'a C program to read a character from the user and check whether it is a (7)
vowel or consonant.
l5 a) Write a C program to find the transpose of a matrix. (7)
b) Explain any 4 string handling functions in C programming. (7)
OR
l6 a) Write a C program to reverse a string without using string handling functions. ' (7)
b) Write a C program to sort an array of numbers using bubble sort. (7)
t7 a) WriteaCprogramto: (7)
(i) Create a structure containing the fields: Name, Price, Quantity, Total Amount.
.l
(ii) Use separate functions to read and print the data.
b) What are different storage classes in C? Give examples for each. (7)
OR
18 a) What are the main differences between structures and unions? Which is preferred (7)
in what situation? Give examples.
b) What is recursion? Write a C program to display Fibonacci series using recursive (7)
firnction.
19 a) Write a C program to replace vowels in a text file with character 'x'. (7)
b) Explain how pointers can be passed to functions in C. (7)
OR
'zo a) Explain any 5 file handling functions in C? (7)
b) Write a C program to print the elements of an array in reverse order using (7)
. | ^_
pointers.
****
Page2of 2
,ECHNOLOGICAL UNIVERSITY
APJ ABDUL KALAM
Sccond Semester B.Tech Dcercc (S, E) Examination January 2024 (2019 Scheme)
1
0100FESTI02042.305
PART B
Answer any one Question from Cach module. Lach question carries 14 Marks
Draw the flowchart tlhe steps for the input |5,3.1,7.9|. (10)
of bubble sort. Trace
J2 a Write an algorithm for Jincar searcl. Demonstrate the working for the given array (10)
23,34,41,65,70 and element to be Searched is 65.
b Writes short notes on Von Neumann architecture. (4)
13 a With suitable exanmples describe the conditional statements in C. (8)
Write a Cprogram to check whether agiven number is perfect or not (A perfect (6)
number is a positive integer that is equal to the sum of its factors excluding the
number itself).
OR
a Explain different operators in C. (8)
b Write aC program to check whether a counting number is prime or not. o (6)
Write a Cprogram to multiplytwo matrices. The order and elements of each (10)
matrix should be accepted from the user.
(4)
b How can we concatenate two strings without using string handling functions?
OR
Symmetric matrix if (8)
16 a Matrix A is said to be symmetric if A=A and Skew
symmetric or skew
A= - A. Write a C program to check whether a matrix is
symmetric
user. Display the count of upper (6)
b Develop a Cprogram to accept a string from the
string.
case and lowercase characters in that
number and Name of N students in (8)
17 a Implement a C program to accept Admission
on the alphabetical order of their Names.
a class and to prepare a Roll List based
(6)
b Describe different methods of parameter passing in functions and implement a
using those methods.
program to swap two variables
OR
(6)
18 a What are function prototypes? Using functions develop a Cprogram to find " C,
(8)
b Explain different storage classes in C with suitable example. (8)
OR
Write aC program using pointers to coipute the
Sum and Mean of all elements
stored in an array of n real numbers. (8)
b With suitable example explain different modes for
opening a file in C? (6)
F 0100EsT102042307
Reg No.:
8 examples. (3)
Mention the difference between structure and union using suitable
,9 what is meant by the scale factor of a pointer variable? Explain using (3)
examples.
l0 List out the various modes of opening a fi!5$n C language. '(3)
PART B
Answer any one Question from each module. Each question carries 14 Marks
I I a) Write the algorithm and draw the flow chart to calculate the roots of a (10)
quadratic equation, take the coefficients as inputs.
b) ' Differentiate between system Software and application software. (4)
OR
l2 a) Explain bubble sort algorithm with an example. (10)
b) Explain differenttypes of memories used in a computer. (4)
Page 1 of 2
l-
01008STr02042307
13 a) Write a menu driven program to find the area of square, triangle, circle and (10)
OR
14 (a) Explain any four types of operators used in C. (7)
123
1234
15 a) Implement string concatenation without using built in functions. (8)
b) Write a C program to accept a 2-D integer matrix and check whether it is (6)
symmetric or not ( A matrix'A' is symmetric if A:Ar).
OR
16 a) Explain any four string handling functions used in C using example. Write the (6)
syntax also.
b) Write a program to print the product of two matrices. (8)
l7 a) Explain different storage classes used in C by providing suitable examples. (8)
b) What is meant by recursion? Write a program to find the factorial of a number
using recursion. (6)
OR
18 a) Implement linear search using function. Reading the inputs and printing the (10)
OR
20 a) What is meant by passing arguments into a function by reference? Write a (8)
program to swap two numbers using pass by reference.
Page2of 2
F 0100Esr10204230L
Sg'j;;
Course Code: EST 102
- Course Narne: PROGRAMMING IN C (Common to all programs)
Max. Marks: 100 Duration:3 Hours
PART A
Answer all Questions. Each question carries 3 Marks Marks
I Compare low level language and high level language with example. (3)
2 Differentiate between primary memory and secondary memory. (3)
3 Explain various datatypes used in C programming language. (3)
4 Write a C program to find the sum of digits of a given number. (3)
5 Write a C program to find average marks obtained by a class of 50 students in (3)
a test.
nb. Draw a flow chart to find the largest of three numbers. , (5)
OR*
t2 Illustrate bubble sort with an example. Write the algorithm and pseudocode for (14)
sorting an zuray of n numbers using bubble sort.
13a Explain the different types of arithmetic, relational and logical operators used (7)
in C.
b. Write a C program to implement basic arithmetic operations of a calculator (7)
using switch constructs.
OR
14 a. Differentiate between break and continue with an example for each. (7)
Page 1 of 2
0tmEsr10204.230t
b. Write a C program to check u'hether the given number is prime or not. (7)
l5 a. Write a C program to count.the number of occurrences of a given number in an (7)
array of n numbers.
b. Write a C program to concatenate two strings without using built in string (7)
functions.
OR
16 a. Write a C program to find the sum of two matrices. (7)
b. Write a C program to find the lenglh of a given string without using built in (7)
string functions.
17 a. - Write a C program to read and display data of n employees (Name, Employee (7)
Id and Salary) using structure.
.I 'b, Define recursive function. Write a recursive function in C to find the factorial (7)
of a given number.
OR
l8 a. Explain various storage classes in C with an example. (7)
b. Write a C program to swap two numbers using user defined functions. (7)
19 a.. C.
Explain any four file handling functions used in (7)
b. Write a C program to swap trvo numLers using pointers. (7)
OR
20 a. Write a C program to read the data in a given file and display the file content (7)
I on console.
b. Explain any three file Input and Output functions used in C. (7)
rtrt**
Page2ot 2