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

APR22 Problem Solving Using C

Uploaded by

Venkata satish
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)
17 views

APR22 Problem Solving Using C

Uploaded by

Venkata satish
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/ 2

H.T.No.

Code No: CT3501 SRGEC-R20


I B.Tech I Semester Regular/Supplementary Examinations, April 2022
PROBLEM SOLVING USING C
(Civil Engineering, Electrical and Electronics Engineering, Mechanical Engineering, Electronics
and Communication Engineering, Internet of Things)
Time: 3 Hours Max. Marks: 70
Note: Answer one question from each unit.
All questions carry equal marks.
5 × 14 = 70M
UNIT-I
1. a) Define a token. Explain the different tokens available in C language. (8M)
b) How data type conversion is done in an expression in C language? Explain with an
example. (6M)
(OR)
2. a) Develop an algorithm to calculate the roots of a quadratic equation ax2  bx  c  0 for all
possible combination values of a, b and c . (8M)
b) How the variables are declared and initialized in C? Illustrate about rules for variable
declaration. (6M)
UNIT-II
3. a) How can the following code be rewritten using conditional operator in C? (6M)
int m=1, n=2, min;
if (m<n)
min=m;
else
min=n;
b) Write a C program to Generate Fibonacci Series using while loop. (8M)
(OR)
4. a) Give the syntax and logic flow for “nested if-else” statement. (7M)
b) Which loop statement is executed at least once even if test condition is false? Explain with
a sample program. (7M)
UNIT-III
5. a) What is the default value of Array? And how to print elements of Array in C? (7M)
b) How to declare strings in C? Explain with an example. (7M)
(OR)

Page 1 of 2
6. a) Write a C-program to count the number of odd numbers and even numbers present in an
array. (7M)
b) Write a program in C to compare the length of two strings. (7M)
UNIT-IV
7. a) How you can use a pointer to read and print a string? Give an example. (7M)
b) Write a C recursive program to print Fibonacci numbers upto N. (7M)
(OR)
8. a) Write a C program to exchange values of two integers using call by reference. (6M)
b) Write a C program to create one block of memory of size is equal to four integers, read
four integer values and display them along with their address. (8M)
UNIT-V
9. a) Analyze the similarities and dissimilarities between array of structures and array within
structures in C. (8M)
b) Write a C program to count the number of vowels present in a file. (6M)
(OR)
10. a) Write a C Program that defines and access Union with members Book Name, Author,
Number of pages and Publisher. (7M)
b) Write a C program to read and print data present in a file. (7M)

*****

Page 2 of 2

You might also like