Programming for Problem Solving Octobernovember-2020
Programming for Problem Solving Octobernovember-2020
U
Code No: 151AC
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
H
B.Tech I Year I Semester Examinations, October/November - 2020
PROGRAMMING FOR PROBLEM SOLVING
(Common to CE, ME, ECE, EIE, MCT, MMT, AE, MIE, PTM)
Time: 2 hours Max. Marks: 75
U
Answer any five questions
All questions carry equal marks
SE
---
1.a) List the basic data types, their sizes and range of values supported by ‘C’ language.
b) Describe the purpose of commonly used conversion characters in scanf() function.
D
[7+8]
2.a) Explain about gets( ) and puts( ) functions with example.
b) Write a C program for addition of given two matrices. [7+8]
PA
3.a) Explain Creating Reading and writing text and binary files.
b) Write the syntax and example for fseek, ftell and rewind functions. [7+8]
PE
4.a) Define Recursion. Write a recursive function for factorial of a given number n.
b) Explain about standard library function used in C. [7+8]
5.a) Apply Binary search on {23, 71, 66, 44, 89, 65, 98, 33}.
R
b) Write an algorithm to check whether a given number n is prime or not. [7+8]
S
6.a) What are the arithmetic operators that are permitted on pointers?
b) Write a ‘C’ function to reverse the string passed as an argument that cannot be altered
without using string function. [7+8]
O
7.a) Define Structure and write the general format for declaring and accessing structure
members with an example.
C
b) Discuss pointers to arrays and structures with its syntax and example. [7+8]
T/
8.a) Describe File handling in C.
b) Write the syntax for opening and closing a file. [7+8]
N
O
---ooOoo---
V
20