Code: 15A05101
B.Tech I Year II Semester (R15) Supplementary Examinations December 2019
--- Content provided by FirstRanker.com ---
COMPUTER PROGRAMMING(Food Technology)
Time: 3 hours Max. Marks: 70
--- Content provided by FirstRanker.com ---
PART ? A(Compulsory Question)
*****
1 Answer the following: (10 X 02 = 20 Marks)
--- Content provided by FirstRanker.com ---
(a) List the advantages and disadvantages of flowcharts over algorithms.(b) List out the basic data types and their sizes in C.
(c) Differentiate between while and do-while loop.
(d) List out any four string handling functions in C.
(e) Write the syntax and one example for any two dynamic memory allocation functions in C.
--- Content provided by FirstRanker.com ---
(f) List out the storage classes in C.(g) Write a recursive function to compute factorial of an integer.
(h) Differentiate between structures and unions.
(i) Write the syntax and one example for any two formatted console I/O statements in C.
(j) Write the syntax of fopen and fclose functions.
--- Content provided by FirstRanker.com ---
PART ? B
(Answer all five units, 5 X 10 = 50 Marks)
UNIT ? I
--- Content provided by FirstRanker.com ---
2 With a neat diagram, explain the software development method.
OR
3 Explain the arithmetic operators in C. Write a C program to test whether a given number is positive
or negative with and without using conditional operator.
--- Content provided by FirstRanker.com ---
UNIT ? II
4 Write the syntax of for, while and do-while loops. Write a C program to print the sum of first n natural
numbers.
--- Content provided by FirstRanker.com ---
OR5 Discuss two-dimensional array. Write a C program to calculate the sum of two matrices and obtain
the transpose of the resultant matrix.
UNIT ? III
--- Content provided by FirstRanker.com ---
6 What is a pointer? What are the problems with the pointers? Write a C program to print the elements
of a one-dimensional array using pointers.
OR
7 Discuss in detail about the scope of functions with suitable examples.
--- Content provided by FirstRanker.com ---
UNIT ? IV
8 Discuss in brief about the prototype of functions. Write recursive and non-recursive functions in C to
calculate the n
--- Content provided by FirstRanker.com ---
thFibonacci number defined below:
? ( ? ) = ? ( ? ? 2) + ? ( ? ? 1), ? ? ? 2 and ? (0) = ? (1) = 1
OR
9 How structures are passed to functions? Discuss bit fields and enumerations in brief.
--- Content provided by FirstRanker.com ---
UNIT ? V
10 Write a C program to open a text file. Read the contents of the file and write the content into a new
file by converting all the lower case letters into upper case letters.
--- Content provided by FirstRanker.com ---
OR11 Discuss the following pre-processor directives:
(i) #define. (ii) #if. (iii) #else. (iv) #include. (v) #elif.
*****
R15
--- Content provided by FirstRanker.com ---
FirstRanker.com - FirstRanker's Choice