JNTU
JNTU B.Tech I Year PROGRAMMING FOR PROBLEM SOLVING Previous Question Paper (December – 2018 - R18)
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.
Part A
What is a flowchart? Explain with one example.
Answer
A flowchart is a graphical representation of an algorithm or process using standard symbols like ovals for start/end, parallelograms for input/output, and rectangles for processing. For example, a flowchart to find the sum of two numbers would start, accept two inputs, add them using a process box, display the result, and stop.
Discuss about Strlen() function with an example.
Answer
The strlen() function, defined in <string.h>, calculates the length of a string excluding the null terminator. Example: int len = strlen("Hello"); returns 5.
Explain fseek() function with example.
Answer
Sign in to view the complete answer paper.
Explain about the parameter passing using copy by address.
Answer
Sign in to view the complete answer paper.
Write an algorithm to find the given number is prime or not.
Answer
Sign in to view the complete answer paper.
C is a structured programming language? Justify.
Answer
Sign in to view the complete answer paper.
How pointer can be used for accessing multi dimensional arrays? Discuss.
Answer
Sign in to view the complete answer paper.
Name few preprocessor directives.
Answer
Sign in to view the complete answer paper.
Write Recursive function for towers of honoi.
Answer
Sign in to view the complete answer paper.
Find out no. of comparisons to sort {2,1,7,4,8,6}.
Answer
Sign in to view the complete answer paper.
Part B
Describe the various control structures available in ‘C’.
Answer
Sign in to view the complete answer paper.
Write a program to find whether the given no is am strong or not.
Answer
Sign in to view the complete answer paper.
Explain about different bit-wise operators with examples.
Answer
Sign in to view the complete answer paper.
What are command line arguments? Explain with a complete ‘C’ program.
Answer
Sign in to view the complete answer paper.
Explain about Enumerated data types with an example.
Answer
Sign in to view the complete answer paper.
Consider the array declaration: float a[5]; and the memory address of a[0] is 4056. What is the memory address of a[2]?
Answer
Sign in to view the complete answer paper.
What is a structure? Explain how to declare, initialize and access the structure elements.
Answer
Sign in to view the complete answer paper.
Write a program to find the string length by using string function.
Answer
Sign in to view the complete answer paper.
What is a file pointer? Explain the steps for sequential file operations.
Answer
Sign in to view the complete answer paper.
Compare gets() and fgets() with an example.
Answer
Sign in to view the complete answer paper.
Write a program to copy the contents of one file to another file.
Answer
Sign in to view the complete answer paper.
List and define the preprocessor statements in C.
Answer
Sign in to view the complete answer paper.
What is a function prototype? Give an example.
Answer
Sign in to view the complete answer paper.
Explain about different parameter passing mechanisms with examples.
Answer
Sign in to view the complete answer paper.
Define Recursion. Write a recursive function for swapping of two numbers .
Answer
Sign in to view the complete answer paper.
Write a program for printing Fibonacci series by using Recursive function.
Answer
Sign in to view the complete answer paper.
Apply linear search on {22,11,66,44,99,55,88}.
Answer
Sign in to view the complete answer paper.
Apply bubble sort on the above given data.
Answer
Sign in to view the complete answer paper.
What do you mean by sorting? Mention the different types of sorting.
Answer
Sign in to view the complete answer paper.
Explain quick sort in detail on {24,12,11,76,39,12,67,34,88,91,26,45,78}.
Answer
Sign in to view the complete answer paper.