0% found this document useful (0 votes)
175 views

Pps Previous Papers

Uploaded by

gopin2660
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)
175 views

Pps Previous Papers

Uploaded by

gopin2660
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

Code No: 152AF R18

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
---

1.a) Explain in detail about relational operators with examples.


b) In C if any variable is auto storage class by default, then why auto keyword introduced in
D
C? Explain. [7+8]

2. Write a C program that performs the following operations (Use structures)


PA
a) Reading a complex number
b) Writing a complex number
c) Addition of two complex numbers. [5+5+5]
PE
3.a) Discuss the random access using fseek( ) function.
b) Give a brief note on ftell( ) and rewind( ) function. [7+8]

4.a) Write a recursive function in C to find the sum of array elements.


R
b) Explain the passing parameters to functions. [7+8]

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]

4.a) Give a brief note on Enumeration data type.


Write a ‘C’ program to find the biggest number and smallest number of given ‘n’
AM
b)
numbers using arrays. [5+5]
OR
5.a) Why structures are necessary? Explain Nested Structures with a valid example.
b) Give a detailed note on pointer expressions. [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]

6.a) Write a program to find the length of the given string.


b) Explain the memory allocation functions with an example. [5+5]
OR
7.a) Explain the concept of pointers to pointers with an example.
b) Write a ‘C’ program to append a string to the end of other string by using string
manipulation function. [5+5]
8.a) Explain about the enumerated data types with an example.
b) Explain about bit fields with an example. [5+5]
OR
JN
9.a) Explain how the structure variable passed as a parameter to a function with example.
b) Explain the Command line arguments with an example. [5+5]
TU
10.a) Differentiate between text and binary files with an example.
b) Write a ‘C’ program to append the contents of one file to another. [5+5]
OR
11.a) Write a ‘C’ program to count number of words and lines in the given text file.
b) Explain about file i/o operations in ‘C’.
H
[5+5]
U
SE
---ooOoo---
D
21
-0
5-
20
19
AM
R18
JN
Code No:151AC
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD
B.Tech I Year I Semester Examinations, December – 2018
PROGRAMMING FOR PROBLEM SOLVING
TU
(Common to CE, ME, ECE, EIE, MCT, MMT, AE, MIE, PTM)
Time: 3 hours Max. Marks: 75

Note: This question paper contains two parts A and B.


H
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.
U
PART- A
SE
(25 Marks)

1.a) What is a flowchart? Explain with one example. [2]


b) Discuss about Strlen() function with an example. [2]
D
c) Explain fseek() function with example. [2]
d) Explain about the parameter passing using copy by address. [2]
e) Write an algorithm to find the given number is prime or not. [2]
12
f) C is a structured programming language? Justify. [3]
g) How pointer can be used for accessing multi dimensional arrays? Discuss. [3]
h) Name few preprocessor directives. [3]
i) Write Recursive function for towers of honoi. [3]
-1
j) Find out no. of comparisons to sort {2,1,7,4,8,6}. [3]

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]

10.a) Apply linear search on {22,11,66,44,99,55,88}.


U
b) Apply bubble sort on the above given data. [5+5]
OR
SE
11.a) What do you mean by sorting? Mention the different types of sorting.
b) Explain quick sort in detail on {24,12,11,76,39,12,67,34,88,91,26,45,78}. [5+5]
D
12
---ooOoo---
-1
2-
20
18
PM

You might also like