CP Set B
CP Set B
(UGC-Autonomous)
B.Tech I Year I Semester (R23) Model Question Paper Examinations January 2023
INTRODUCTION TO PROGRAMMING
(Common to All branches of Engineering)
Time: 3 hours Max. Marks: 70
PART – A (Compulsory Question)
*****
(a). List any two types of data type in C.
(b). Write an algorithm to find product of two integers using repetitive addition.
(c). Distinguish between break and goto.
(d). Give the comparison of Global and Local variables.
(e). What is a string? How to declare and initialize strings?
(f). List any two string manipulation functions along with the syntax.
(g). What are structures? Give an example
(h). What is the usage of strrev() and strcat()?
(i). What is the use of exit() function? Write the syntax
(j). What is file? Explain any 2 basic file operations in C programming?
PART – B
(Answer all five units, 5 X 10 = 50 Marks)
UNIT-1
2 Write a C program to find minimum number among three numbers using conditional operator.
OR
3 Write an algorithm and draw flow chart to find average marks for one subject in a class of 50
students.
UNIT-II
4 Write a program to find whether given number prime number or not.
OR
5 Write a C program to print digits in reverse order for a given number.
UNIT-III
6 Describe how a one-dimensional array is initialized in C with program.
OR
7 Explain about accessing of elements in a two-dimensional array using pointer variable(s).
UNIT-IV
8 What is pointer arithmetic? How to pass array to a function? Explain with an Example.
OR
9 Write a C program to find the factorial of a given number using pointers
UNIT-V
10 (a) Write a program using Function to find Fibonacci series.
(b) Write a program demonstrating Armstrong number.
OR
11 What is the difference between pass by value and pass by reference? Explain with example.