Pps Previous Papers
Pps Previous Papers
U
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech I Year II Semester Examinations, November/December - 2020
H
PROGRAMMING FOR PROBLEM SOLVING
(Common to CSE, IT, ITE)
Time: 2 hours Max. Marks: 75
U
Answer any five questions
All questions carry equal marks
SE
---
5. Which searching technique is best among linear search and binary search, justify your
S
answer. [15]
6.a) Write a C Program to find maximum number among three numbers using conditional
O
operator.
b) Define Flow Chart. List some commonly used symbols and specify its purpose. [7+8]
C
7.a) Write a C program to find given string is palindrome or not without using any string
T/
functions.
b) Define pointer. Write the advantages and disadvantages of using pointers. [7+8]
N
8. Write a C program to merge the contents given two existing files into new file. [15]
O
V
---ooOoo---
20
R18
Code No: 151AC
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech I Year I Semester Examinations, May/June - 2019
JN
PROGRAMMING FOR PROBLEM SOLVING
(Common to CE, ME, ECE, EIE, MCT, MMT, AE, MIE, PTM)
Time: 3 hours Max. Marks: 75
TU
Note: This question paper contains two parts A and B.
Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B
consists of 5 Units. Answer any one full question from each unit. Each question carries
10 marks and may have a, b, c as sub questions.
H
PART - A
(25 Marks)
U
1.a) Give a brief note on storage class. [2]
b) Give a note on unions. [2]
SE
c) How can we determine whether a file is successfully opened or not using fopen()
function? [2]
d) Give syntax to create a pointer to function. [2]
e) How binary search works? [2]
f) What is a flowchart? How it is different from an algorithm? [3]
D
g) Write the advantages and disadvantages of using pointers. [3]
h) Write a ‘C’ program to read a binary file and print it on console [3]
i) Write short notes on dynamic memory allocation. [3]
01
j) How linear search is different from binary search? [3]
-0
PART - B
(50 Marks)
6-
2.a) Explain typical steps for entering, compiling and executing ‘C’ programs.
20
b) Write an algorithm to find the roots of a quadratic equation considering all cases. [5+5]
OR
3.a) Distinguish between all loop statements along with a flowchart and with an example
program.
19
b) Write a program in ‘C’ to check whether a given integer number is odd or even. [5+5]
6.a) Explain Steps for file operations and different modes of files.
b) Explain about preprocessor commands define, undef. [5+5]
OR
7. Write a program to read a text file, convert all the lowercase characters into upper case
and re-write the uppercase characters in the file. [10]
8. What is Recursion? Write a ‘C’ Program for Towers of Hanoi. Also specify in diagram
for it. [10]
JN
OR
9.a) How to pass the structure to functions as an argument? Explain with a suitable example.
b) Explain about Allocating memory for arrays of different data types. [5+5]
TU
10.a) Give a brief note on insertion sort with an example.
b) Discuss the time complexity of the bubble sort. [5+5]
OR
11. Write a program in ‘C’ to print list of integers in ascending order using bubble sort and
H
selection sort techniques. [10]
U
SE
---ooOoo---
D
01
-0
6-
20
19
AM
Code No: 132AD
R16
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech I Year II Semester Examinations, May - 2019
JN
COMPUTER PROGRAMMING IN C
(Common to EEE, ECE, CSE, EIE, IT, ETM)
Time: 3 hours Max. Marks: 75
TU
Note: This question paper contains two parts A and B.
Part A is compulsory which carries 25 marks. Answer all questions in Part A.
Part B consists of 5 Units. Answer any one full question from each unit. Each
H
question carries 10 marks and may have a, b, c as sub questions.
PART- A
(25 Marks)
U
1.a) Explain the conversion of Decimal number to Hexadecimal number with an example. [2]
SE
b) Differentiate between declaration and definition of a variable. [3]
c) What is a user defined function? [2]
d) What is the use of type qualifier? [3]
e) Differentiate between *p++ and p++. [2]
D
f) What is a pointer? Explain how the pointer variable declared and initialized. [3]
g) Explain about the structures containing pointers with an example. [2]
h) Explain about self-referential structures. [3]
21
i) What is the usage of fget( ) and fput( ) functions. [2]
j) List the positioning functions in files. [3]
-0
PART-B
(50 Marks)
5-
2.a) Describe different Computing Environments.
b) Explain about type conversion mechanism available in C language. [5+5]
20
OR
3.a) Write an algorithm to find the factorial of a given number.
b) Differentiate between While and Do While with an example. [5+5]
19
4.a) Explain the different types of storage classes with an example.
b) Write a program to search the element in the given list by using the binary search. [5+5]
OR
AM
5.a) Write a program to sort the elements by using bubble sort.
b) What is recursion? Explain the limitations of recursion. [5+5]
PART - B
2-
(50 Marks)
2.a) Describe the various control structures available in ‘C’.
20
b) Write a program to find whether the given no is am strong or not. [5+5]
OR
3.a) Explain about different bit-wise operators with examples.
b) What are command line arguments? Explain with a complete ‘C’ program. [5+5]
18
4.a) Explain about Enumerated data types with an example.
b) Consider the array declaration: float a[5]; and the memory address of a[0] is 4056.
PM
What is the memory address of a[2]? [5+5]
OR
5.a) What is a structure? Explain how to declare, initialize and access the structure elements.
b) Write a program to find the string length by using string function. [5+5]
6.a) What is a file pointer? Explain the steps for sequential file operations.
b) Compare gets() and fgets() with an example. [5+5]
JN
OR
7.a) Write a program to copy the contents of one file to another file.
b) List and define the preprocessor statements in C. [5+5]
TU
8.a) What is a function prototype? Give an example.
b) Explain about different parameter passing mechanisms with examples. [5+5]
OR
9.a) Define Recursion. Write a recursive function for swapping of two numbers .
H
b) Write a program for printing Fibonacci series by using Recursive function. [5+5]