This download link is referred from the post: JNTU Anantapur B-Tech 1-1 last 10 year question papers 2010 -2020 -All regulation- All branches- 1st Year 1st Sem
FirstRanker's choice
Code: 19A05101T
--- Content provided by FirstRanker.com ---
B.Tech I Year I Semester (R19) Regular Examinations January 2020
PROBLEM SOLVING & PROGRAMMING
(Common to all branches)
Time: 3 hours
Max. Marks: 70
--- Content provided by FirstRanker.com ---
PART - A
(Compulsory Question)
Answer the following: (10 X 02 = 20 Marks)
- What is a compiler? Give an example.
- Write an algorithm for finding the area of a given square.
- List the important steps in solving a problem.
- Give an example showing how redundant computations make an algorithm inefficient.
- What is type conversion? Give an example.
- Illustrate the use of break in loop statements with an example.
- What is a command line argument? How do you pass a command line arguments to a C-program?
- Let int a[5] = { 1, 3, 5, 7, 9}. What is the value output of: printf("%d", *(a+2)). Justify your answer.
- What is the use of typedef in C? Give an example.
- What are bit-fields? Give an example.
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
PART - B
(Answer all five units, 5 X 10 = 50 Marks)
--- Content provided by FirstRanker.com ---
UNIT - I
- (a) Explain in detail about the working of a computer.
(b) Write an algorithm to compute the roots of given quadratic equation.OR
- Explain in detail about the strategy for designing algorithms with suitable examples wherever necessary.
--- Content provided by FirstRanker.com ---
UNIT - II
- (a) Explain the top-down approach for problem solving.
(b) How do you measure the efficiency of an algorithm? Explain with an example.OR
- (a) Design an algorithm that reads a set of numbers from the user and makes a count of the number of negative and the number of non-negative members in the set.
--- Content provided by FirstRanker.com ---
(b) Write an algorithm for computing the sum of all even numbers in the range 1 to n (including both 1 and n). Trace you algorithm for n = 10.
UNIT - III
- Explain in detail about the arithmetic, relational and logical operators in C with suitable examples.
OR
- (a) What is function? What are the advantages of using functions in a C-program? Write C-function for exchanging the values of two given variables.
--- Content provided by FirstRanker.com ---
(b) Write a C-program for computing the sum of first n terms of the following series using for loop. S=1-3+7-9+11-13 + ... 'n' terms.
UNIT - IV
- Design and write algorithm for finding the square root of a given integer. Trace your algorithm for input value 16.
OR
- (a) What is a pointer and pointer to a pointer? Illustrate the declaration and use of pointers and pointer to a pointer in C with suitable example program.
--- Content provided by FirstRanker.com ---
(b) Write an algorithm for reversing the array elements. Trace your algorithm for the following array of size 10.
a[10] = { 12, 3, 4, 48, 87, 54, 67, 43, 78, 19}
UNIT - V
- Design and write an algorithm to sort a given set of randomly ordered integers into non-descending order using insertion method. Trace your algorithm for the following list of integers.
78 43 9 2 12 45 98 22OR
--- Content provided by FirstRanker.com ---
- (a) Explain the difference between structures and unions with the help of a C-program.
(b) Illustrate the passing of structures to functions through an example.
--- Content provided by FirstRanker.com ---
This download link is referred from the post: JNTU Anantapur B-Tech 1-1 last 10 year question papers 2010 -2020 -All regulation- All branches- 1st Year 1st Sem