You are on page 1of 2

Code No: R201110 R20 SET - 1

I B. Tech I Semester Supplementary Examinations, December - 2021


PROGRAMMING FOR PROBLEM SOLVING USING C
(Common to EEE, ME, ECE, CSE, CSE-CS&T, EIE, IT, ECT, Auto Eng, Min Eng, Pet Eng, CSE-AI&ML, CSE-AI,
CSE-DS, CSE-AI&DS, CSE-CS, CSE-IOT &CS Incl BCT, CSE-CS & BS, CSE-IOT, Food Eng, AI&DS)
Time: 3 hours Max. Marks: 70
Answer any five Questions one Question from Each Unit
All Questions Carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1. a) Explain the step-by-step procedure for creating and executing a C program. (7M)

b) What do you mean by storage class in C programming? How many storage classes (7M)
are there in C programming? Explain the importance of each one.
Or
2. a) What do you mean by number system in computer? Explain about various types (7M)
of computer number systems.
b) Explain about Implicit and Explicit Type Conversion in ‘C’ programming. (7M)
UNIT-II
3. a) Write a C program to check whether the given number N can be expressed as (7M)
Power of 2 or not. (For example, 7 cannot be expressed as power of 2 but 8 can
be expressed as 23 ).
b) Write the syntax of 'Switch' statement in C programming. Mention the importance (7M)
of 'default' case and 'break' statements.
Or
4. a) Explain about various loop control statements in C programming. (7M)

b) What is the output of the following C code? Give Explanation. (7M)


#include <stdio.h>
int main()
{
int h = 8;
int b = 4 * 6 + 3 * 4 < h*5 ?4 : 3;
printf(“%d”, b);
return 0;
}
UNIT-III
5. a) Why do we need to create self-referential structures in C programming? Explain (7M)
with an example.
b) Write a C program to print lower triangle of a square matrix. (7M)
For example the output of a given matrix
2 3 4 will be 2 0 0
567 560
456 456
Or
6. a) Explain about the enumeration data type in C programming with a suitable (7M)
example.
1 of 2

||''|'''|''|''|||'||
Code No: R201110 R20 SET - 1

b) Write a C program to find the length of a string without using String handling (7M)
functions.
UNIT-IV

7. a) What is Dangling pointer in C programming? Why dangling pointers are (7M)


dangerous? Explain.
b) Write a C program to sort a set of strings in alphabetical order using pointers. (7M)
Or
8. a) What is meant by Dynamic memory allocation in C programming? Discuss the (7M)
advantages and disadvantages of dynamic memory allocation.

b) Differentiate between array of structures and array of pointers to structures with (7M)
suitable diagrams.
UNIT-V

9. a) What are various types of parameter passing techniques in ‘C’ programming? (7M)
Explain with an example program.

b) Write a C Program to print Binary Equivalent of an Integer using Recursion (7M)


Or

10 a) Write about ‘fprintf()’ and ‘fscanf()’ functions in C programming. (7M)

b) Compare and contrast Text and Binary stream. (7M)

2 of 2

||''|'''|''|''|||'||

You might also like