0% found this document useful (0 votes)
17 views8 pages

INTRODUCTION-TO-PROGRAMMING-JAN-2024 [www.jntumaterials.co.in]

Uploaded by

chfelan
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 views8 pages

INTRODUCTION-TO-PROGRAMMING-JAN-2024 [www.jntumaterials.co.in]

Uploaded by

chfelan
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/ 8

www.jntumaterials.co.

in
Code No: R231107 R23 SET - 1

I B. Tech I Semester Regular Examinations, January- 2024


INTRODUCTION TO PROGRAMMING
(Common to All Branches)
Time: 3 hours Max. Marks: 70
Note: 1. Question paper consists of two parts (Part-A and Part-B)
2. All the questions in Part-A is Compulsory
3. Answer ONE Question from Each Unit in Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PART –A (20 Marks)
1. a) What is the difference between compiler and interpreter? [2M]
b) What are the essential steps in the development an algorithm? [2M]
c) Give the differences between while and do-while statements. [2M]
d) Define scope and life time of a variable. [2M]
e) How does the C language handle the values in an array internally? [2M]
f) What is an array variable? How it is different from ordinary variable? [2M]
g) Why addition of two pointers is impossible? [2M]
h) What is dangling pointer? [2M]
i) List the Dynamic memory management functions in C programming. [2M]
j) What are the advantages with bit fields? [2M]
PART – B (50 MARKS)
UNIT-I
2. a) Develop a flowchart for calculating area of an equilateral triangle. Area of [5M]
equilateral triangle is computed by formula A= (√3 ⁄4) a2, where ‘a’ is length of side
of triangle.
b) Explain different data types supported by C language with their memory [5M]
requirements.
(OR)
3 a) Develop an algorithm to print the Fibonacci series. [5M]
b) List out the various category of operators available in C? Give examples. [5M]
UNIT-II
4. a) Differentiate between while and for statement with an example. [5M]
n
b) Write a C program to calculate m value using while and do while loop. [5M]
(OR)
5. a) Differentiate between break and continue statements. [5M]
b) Develop a program to check whether the given number is Armstrong number or not. [5M]
UNIT-III
6. a) Explain how arrays are passed as function arguments with an example. [5M]
b) Define string. Explain about string operations with examples. [5M]
(OR)
7. a) Develop a program to find the length of the string without using predefined [5M]
functions.
b) Develop a program to read and print the element in the given array. [5M]
1 of 2
|'''|'|'|''||'''||||
www.jntumaterials.co.in
Code No: R231107 R23 SET - 1

UNIT-IV
8. a) Explain Pointer Arithmetic with suitable example. [5M]
b) Explain about declaration, initialization and accessing of structures. And also [5M]
discuss about complex structures.
(OR)
9. a) Write a C program to sort an array using pointers. [5M]

b) Explain the concepts used in the given program and write the output. [5M]
main() {
int m[2]={100,200};
int a,b,c,*p=m; a=*p;
b=*(p+1); c=(*p+1);
printf("%d %d %d", a,b,c);
}

UNIT-V
10. a) Write a C program to copy the contents of a text file to another file. Pass the [5M]
filename using command line arguments.
b) Differentiate the call by value and call by reference mechanism with examples. [5M]

(OR)
11. a) Develop a C program to find sum of ‘n’ Elements entered by user. To perform this [5M]
program, allocate memory dynamically Using malloc() function.
b) How do you define the scope of a variable? Illustrate with a Program. [5M]

*****

2 of 2

|'''|'|'|''||'''||||
www.jntumaterials.co.in
Code No: R231107 R23 SET - 2

I B. Tech I Semester Regular Examinations, January-2024


INTRODUCTION TO PROGRAMMING
(Common to All Branches)
Time: 3 hours Max. Marks: 70
Note: 1. Question paper consists of two parts (Part-A and Part-B)
2. All the questions in Part-A is Compulsory
3. Answer ONE Question from Each Unit in Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PART –A (20 Marks)
1. a) Define flowchart. Explain with an example. [2M]
b) Write the general structure of C. [2M]
c) List all conditional control statements used in C. [2M]
d) Write syntax of if, if-else and nested if-else statements in C program. [2M]
e) What is array? Explain the declaration and initialization of one dimensional array. [2M]
f) Define string. How string is declared and initialized? [2M]
g) What is function? List the type of functions available in C Language. [2M]
h) Define a recursion give one example function. [2M]
i) What is structure? Explain the C syntax of structure declaration. [2M]
j) What is pointer? Explain how the pointer variable declared and initialized? [2M]
PART – B (50 MARKS)
UNIT-I
2. a) Explain the features following: [5M]
(i) Machine language (ii) Assembly level language (iii) High level language
(iv) Basic Computer Program
b) Write algorithm and draw a flow chart for reversing a given number. [5M]
(OR)
3 a) Write about basic input output operations and determine the value of the following ‘C’ [5M]
expressions.
int x = 5,y,z;
y = x + +;
z = + + x;
print f(“%d %d ”, x, y, z);
b) Write a short notes on the following Problem solving strategies [5M]
i) Top down Approach ii) Bottom Up Approach.

UNIT-II
4. a) Develop a program to check whether the given number is prime number or not. [5M]
b) Differentiate between counter control and conditional control statements in C. [5M]
(OR)
5. a) Develop a program that asks user an arithmetic operator (‘+’, ‘-‘, ‘*’ or ‘/’) and two [5M]
operands and perform the corresponding calculation on the operands. Use a switch
statement.
b) How does a switch statement works? List the difference between switch and if else [5M]
ladder statement.
1 of 2
|'''|'|'|''||'''||||
www.jntumaterials.co.in
Code No: R231107 R23 SET - 2

UNIT-III
6. a) Develop program to find the average of smallest and largest numbers in a given array. [5M]
b) What is string palindrome? Develop a program to check whether the given string is [5M]
palindrome or not.
(OR)
7. a) Develop a program to search the key element in the given list. [5M]
b) Develop a program to implement string operations by using string handling functions. [5M]
UNIT-IV
8. a) Develop a C program to swap two numbers using pointers. [5M]
b) What is a pointer variable? How is a pointer variable different from an ordinary [5M]
Variable?
(OR)
9. a) How to pass pointer variables as function arguments? Explain with examples. [5M]
b) Develop a C program to declare a structure with the following elements and for [5M]
accessing them. 1. Name. 2. Age. 3. University.
UNIT-V
10. a) Define dynamic memory. Describe the functions to allocate dynamic memory. [5M]
b) What is a File? Explain fopen() and fclose() functions with suitable examples. [5M]
(OR)
11. a) Develop a program to calculate the factorial of a given number using recursion. [5M]
b) Write a note on File and briefly explain various operations on files with examples. [5M]

*****

2 of 2

|'''|'|'|''||'''||||
www.jntumaterials.co.in
Code No: R231107 R23 SET - 3

I B. Tech I Semester Regular Examinations, January- 2024


INTRODUCTION TO PROGRAMMING
(Common to All Branches)
Time: 3 hours Max. Marks: 70
Note: 1. Question paper consists of two parts (Part-A and Part-B)
2. All the questions in Part-A is Compulsory
3. Answer ONE Question from Each Unit in Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PART –A (20 Marks)
1. a) What is the variable? Illustrate with an example. [2M]
b) What are the basic steps involved in writing a computer program? [2M]
c) What are the types of looping statements available in C. [2M]
d) Give the differences between entry controlled and exit controlled loops. [2M]
e) Explain about Actual and Formal parameters. [2M]
f) Why is it necessary to give the size of an array in an array declaration? [2M]
g) Mention the various String Manipulation Functions in C. [2M]
h) What is the difference between a pointer and dangling pointer? [2M]
i) Compare structures and unions. [2M]
j) What is the difference between fscanf() and fprintf()? Give an example. [2M]
PART – B (50 MARKS)
UNIT-I
2. a) Give the block diagram of a computer. Explain functionality of each component. [5M]
b) Define algorithm? Write the characteristics of an algorithm. Give example. [5M]

(OR)
3 a) Write a program to find the factorial of a given number and analyze its time [5M]
complexity.
b) Explain about relational and logical operators and write a C program by using these [5M]
operators.

UNIT-II
4. a) Write about nested for loop statement with examples. [5M]
b) Write program to check whether the given integer is palindrome or not by using for [5M]
loop.

(OR)
5. a) What are selection statements? What is the necessity of selection statements? Explain. [5M]
b) Develop a C program to check whether a number entered by user is even or odd. Use [5M]
if else statement.

UNIT-III
6. a) Develop a program to count sum of even numbers in a given array. [5M]
b) Develop a program to append the one string to another string without using predefined [5M]
functions.

1 of 2
|'''|'|'|''||'''||||
www.jntumaterials.co.in

Code No: R231107 R23 SET - 3

(OR)
7. a) Write the concepts of arrays and illustrate different dimensions defined on array with [5M]
example.
b) Develop a C program to multiply two ‘m × n’ matrices. Cover all necessary [5M]
conditions.
UNIT-IV
8. a) Define Structure? Explain how to declare a structure, accessing structure members [5M]
with an example program.
b) Explain the array of pointers with example. [5M]

(OR)
9. a) Develop a program using pointers to read in an array of integers and print its elements [5M]
in reverse order.
b) Define the union and write a program to declare and access the union members. [5M]
Consider employee details as an example.
UNIT-V
10. a) Develop a C program to count the number of characters in a file. [5M]
b) What is the difference between iterative and recursive functions. Explain with finding [5M]
factorial.

(OR)
11. a) Illustrate the concepts of functions calls and return types. [5M]
b) Define File? Briefly explain various operations on files with examples. [5M]

*****

2 of 2

|'''|'|'|''||'''||||
www.jntumaterials.co.in
Code No: R231107 R23 SET - 4

I B. Tech I Semester Regular Examinations, January-2024


INTRODUCTION TO PROGRAMMING
(Common to All Branches)
Time: 3 hours Max. Marks: 70
Note: 1. Question paper consists of two parts (Part-A and Part-B)
2. All the questions in Part-A is Compulsory
3. Answer ONE Question from Each Unit in Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PART –A (20 Marks)
1. a) What is Ternary operator and Conditional operator? [2M]
b) Define keyword, constant and variable. [2M]
c) How switch case works without break statement? [2M]
d) Write the syntax of looping statements. [2M]
e) What is multi-dimensional array? [2M]
f) Write and explain the syntax of function? [2M]
g) What is pointer to pointer? [2M]
h) Discriminate putchar() and getchar() [2M]
i) Define Union? How to represent a union? [2M]
j) Write about different error handling functions on files. [2M]
PART – B (50 MARKS)
UNIT-I
2. a) What is a programming language? Why C language is called as Middle level [5M]
programming language? Explain
b) Define flowchart? How it is useful in writing the programs? Explain about different [5M]
symbols in Flow chart? Give Example.

(OR)
3 a) Explain about Compiler, Interpreter, and Assembler. [5M]
b) Define variable? What are the rules for declaring the variables? [5M]

UNIT-II
4. a) Differentiate between While and do-While loops with an example. [5M]
b) Develop a program to calculate the sum of digits in a given number by using while [5M]
loop.
(OR)
5. a) Differentiate the conditional operator with if else statement. Explain with the help of [5M]
an example.
b) Illustrate the use of special control constructs goto, break, continue and return. [5M]

UNIT-III
6. a) Write a C program to calculate the sum and difference of two 2-dimensional Matrices. [5M]
b) Explain the following string handling functions: [5M]
(i) strcpy( ) (ii) strlen( ) (iii)strcat( ) (iv) strcmp( )

1 of 2

|'''|'|'|''||'''||||
www.jntumaterials.co.in

Code No: R231107 R23 SET - 4

(OR)
7. a) Write a program to find second highest and smallest number in the given array. [5M]
b) Illustrate the string operations: i) Copying the string ii) Reversing the string iii) [5M]
Update the Characters in string iv) Finding the string length

UNIT-IV
8. a) List the difference between structures and unions. Explain with an example. [5M]
b) Write a program to show the subject registration for an exam by the student using [5M]
structures.
(OR)
9. a) Define a pointer in C language? Explain about NULL character. [5M]
b) How structure is different form an array? Explain with program. [5M]

UNIT-V
10. a) Distinguish user defined and predefined function. Explain with one example. [5M]
b) Develop a C program to append the contents of one file to another file. [5M]

(OR)
11. a) Develop a program to find the given number is prime or not using functions. [5M]
b) List out modes of operations to open a file. [5M]

*****

2 of 2

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

You might also like