0% found this document useful (0 votes)
10 views9 pages

Programming in C

The document outlines the structure and content of the B.Tech Degree Examination for the Programming in C course, including various questions categorized into Part A and Part B. Part A consists of short answer questions covering fundamental concepts in C programming, while Part B includes more detailed questions requiring algorithms, programs, and explanations. The exam assesses knowledge on topics such as data types, control structures, file handling, and memory management.

Uploaded by

Sravana Ps
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)
10 views9 pages

Programming in C

The document outlines the structure and content of the B.Tech Degree Examination for the Programming in C course, including various questions categorized into Part A and Part B. Part A consists of short answer questions covering fundamental concepts in C programming, while Part B includes more detailed questions requiring algorithms, programs, and explanations. The exam assesses knowledge on topics such as data types, control structures, file handling, and memory management.

Uploaded by

Sravana Ps
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/ 9

soLtp)\i

F 0100EST1020s2003 igeT.?\es

RegNo.:
APJ ABDUL aKALAM TECHNOLOGICAL
Second Semester B.Tech Degree Examination June 2022 (201 (;H,.-9

Course Code: EST102


Course Name: 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 What are the functions of ALU and CU? (3)


2 Draw a flowchart to find the sum of first N numbers. (3)
a
J Differentiate between while and do-while loops using an example. (3)
4 Why is the use of goto statement discouraged in C programs? (3)
) Write a C program to compare any two strings using string handling functions. (3)
6 Write a C program to find the largest element in an array. (3)
7 Name the different types of parameter passing. Illustrate each of them with an (3)
example.
8 What are the advantages of modular programming? (3)
9 Distinguish between text mode and binary mode operation of a file. (3)
l0 What do you mean by a pointer variable? How is it initialised? (3)

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

the list at the end.


OR

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)

Course Code: EST 102


Possed
Course Name: PROGRAMMINU NC(Common to all programs)
Max. Marks: 100 Duration: 3 Hours
PART A
Marks
Answer all Questions. Each question carries 3 Marks
Describe the memory hierarchy of a computer with the help of a diagram. (3)
What is the purpose of flow charts in problem solving? Draw a flow chart to find (3)
the largest of three numbers.
Explain the syntax of ternary operator in C. Write a program for evaluating the (3)

function Y using ternary operator.


1

to check whether a given (3)


Give the syntax of switch statement. Write a program
number is positive, negative or zero using switch.
-Dimensional and 2-Dimensional array can be
(3)
List the different ways in which a l
initialized.
is present in a string. (3)
Developa Cprogram tocheck whetlher acharacter
(3)
Compare and contrast structure with union.
Write a recursive procedure in C to (3)
Listout the merits and demerits of recursion.
lindthe factorial of' á number.
in C and how the member (3)
Explain lhow a pointer is assigned withastructure
variable of structure is accessed using pointer?
scenarios with tseck(). assume (3)
What is the role of fseek()) in C? SoBve the given
characters in the file.
file pointer is at l0 " character and there are l 00
(a) Set ile pointer to the last character in the file.
(b) Set file pointer to the beginning of the tile.

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

List out the


diflerence r and interpreter.
between coupile (4)
OR

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)

19 a from a file and write odd numbers to


numbers
Develop a c program to read
file and even numbers to another file.
0100ESTI020.42305
Explain with suitable exnmples, how & nd *
Operators are used with
Variable. pointer (3)
Predict the output of the following C progran code.
void main () (3)
int al] =30, 20. 10}:
printtod od od\n",*a, *tl, *(at+));

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.:

APJ ABDUL KALAM TECHNOLOGICAL


Second Semester B.Tech Degree Regular and Supplementary Examination June

Course Code: EST 102


Course Name: 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 Differentiate among compiler, interpreter and assembler. (3)


2 what is a flowchart? Draw the flow chart to check whether the given number (3)
is positive or negative.
J Write the difference between 'while' and 'do -while, statemenrs. (3)
4 Explain various formatted I/O statements in C. (3)
5 What are the different ways of declaring and initialising a single dimensional (3)
anay?
6 write a c program to check whether the given number is Armstrong or not. (3)
(A number is Armstrong if the sum of the cubes of the digits equals to the
number)
Define function prototype. Why is it used? Diflerentiate formal and actual (3)
parameters.

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)

rectangle according tothe choice given.


(b) Differentiate between break and continue statements using an example. (4)

OR
14 (a) Explain any four types of operators used in C. (7)

(b) Write a program to generate the following pattern


I
t2 (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)

result must be done in the main function.


b) Compare User defined functions with library functions. (4)
19 a) Write a program to read and store the details (the name, employee code (14)
(integer) and salary) of 'n' employeefin a company into a file using structure.
Print the details of the employee whose employee code is given as input.

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.

b) Write a program to copy the content of a file to another. (6)


****

Page2of 2
F 0100Esr10204230L

Reg No.: Name:


APJ ABDUL KALAM TECHNOLOGICAL UNIVE
Second Semester B.Tech Degree (R, S) ExaminationMay 2024

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.

6 Explain different ways of initializing a2D anay with example. (3)


7 Compare formal parameters and actual parameters with an example. (3)
8 Differentiate between structure and union with an example. (3)
9 Explain call by reference in C with an example. (3)
l0 Explain different modes of opening a file in C. (3)
t
PART B
Answer ony onefull Questionfrom each module. Each question carries I4 Marks
I I a. Explain the basics of computer architecture with the help of a diagram. (9)

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy