Code: 23A05101T R23
B.Tech I Year I Semester (R23) Regular & Supplementary Examinations December/January 2024/2025
INTRODUCTION TO PROGRAMMING
(Common to all Branches)
Time: 3 hours Max. Marks: 70
PART – A
(Compulsory Question)
*****
1 Answer the following: (10 X 02 = 20 Marks)
(a) Write the functions of program counter in computer. 2M
(b) Define the top-down approach in problem solving. 2M
(c) Write the output of the program given below 2M
main()
{
float a;
int x=6, y=4;
a = (float) x/y;
printf(“Value of a=%f”, a);
}.
(d) Show the general form of if – else – if statement. 2M
(e) How is an array stored in memory? 2M
(f) If str [ ] = “Welcome to the world of programming”, then SUBSTRING (str, 15, 5) =? 2M
(g) Write the benefits of pointers. 2M
(h) Differentiate between structure and union. 2M
(i) What is the difference between function declaration and function definition? 2M
(j) What is the use of fseek( ) function in files and Write its syntax. 2M
PART – B
(Answer all the questions: 05 X 10 = 50 Marks)
2 (a) What are keywords? List the rules for naming a variable in C. 5M
(b) Define flowchart. Explain with an example. 5M
OR
3 (a) What is an operator? List and explain various types of operators. 6M
(b) Compare pseudocode with an algorithm. 4M
4 Explain if, if else, and cascaded if-else with examples. 10M
OR
5 (a) Explain switch statement with syntax and example. 6M
(b) Write a C program to find the sum of n natural numbers using For loop. 4M
6 (a) Write a C program to sort the given array of n elements in ascending order. 5M
(b) Write a C program to add two 3 x 3 matrices. 5M
OR
7 Write a C program to find whether the given string is palindrome or not without using string 10M
functions.
Contd. in Page 2
Page 1 of 2
Code: 23A05101T R23
8 (a) Explain arithmetic operations on pointers with example. 5M
(b) Explain pointer to a function with example. 5M
OR
9 (a) Explain array of structure and structure within a structure with an example. 5M
(b) Describe how to declare and initialize Unions with an example. 5M
10 Explain different classification of user-defined functions based on parameter passing and 10M
return type with examples.
OR
11 (a) Explain how arrays are passed as function arguments with an example. 5M
(b) Write a C program to copy the content of one file to another file. 5M
*****
Page 2 of 2