Introduction to Programming (1)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

H.T.No.

Code No: CT4501 SRGEC-R23


I B.Tech I Semester Regular Examinations, January 2024
INTRODUCTION TO PROGRAMMING
(Common to All Branches)
Time: 3 Hours Max. Marks: 70
Note: All questions from PART-A are to be answered at one place.
Answer one question from each unit of PART-B. All questions carry equal marks.

PART-A
10 × 2 = 20M
1. a) Name a problem-solving strategy that involves breaking a problem into smaller sub-
problems.
b) Explain the role of pseudo code in the software development process.
c) What is the purpose of the "break" statement in a loop?
d) List different conditional control statements.
e) How is a specific element accessed in a 2D array?
f) Define String. How to insert and access a string at a specific position.
g) How to initialize a structure. Explain with an example.
h) Define pointer. What are dereferencing and address operators?
i) Elucidate the concept of call by value with an example.
j) What is a file? What are the types of files in C?

PART-B
5 × 10 = 50M

UNIT-I
2. a) Discuss basic data types and mention number of bytes required for each data type. (5M)
b) Calculating time and space complexity for simple problems. (5M)
(OR)
3. a) Explain the I/O functions: getch(), getche(), getchar() with their syntax. (5M)
b) Describe in detail about characteristics of an algorithm. Write an algorithm to check
whether the given number is EVEN or ODD. (5M)
UNIT-II
4. a) Write a C program to print all even numbers in Fibonacci series. (5M)
b) Develop C code to check whether given number is Strong number or not. (Strong Number:
145=1!+4!+5!=145) . (5M)
(OR)

Page 1 of 2
5. a) Why Do-While loop is considered as exit controlled loop? Justify your answer with an
example. (5M)
b) Write a C program to find the sum of integers from 1 to 10. (5M)
UNIT-III
6. a) Write the syntax for gets () and puts () functions and explain their usage with an example.
(5M)
b) Write a C Program to perform addition of two matrices by checking the compatibility.
(5M)
(OR)
7. a) How strings can be initialized? Give an example. (5M)
b) Write a C program to read 6 subject marks of a student and calculate Total marks and
Percentage(Assume Total Maximum marks:600). (5M)
UNIT-IV
8. Write a C program using structures to read the employee name, id, salary and display them.
(10M)
(OR)
9. a) Write a C program to access elements of an array using pointers. (5M)
b) Define structure. Illustrate on how structure members can be declared and accessed. (5M)
UNIT-V
10. a) Explain how the Arrays can be passed as parameters to the function. (4M)
b) Explain about the storage classes: auto, static, extern and register in detail. (6M)
(OR)
11. a) Write a C program to find the average of n numbers using functions. (5M)
b) Explain usage of putc( ) and getc( ) with an example program. (5M)

*****

Page 2 of 2

You might also like