JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech I Year COMPUTER PROGRAMMING Previous Question Paper (March/April - 2023 - R13)
Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.
Part A
Define operator Precedence and Associativity.
Answer
Operator Precedence determines the order in which different operators are evaluated in an expression containing multiple operators. Operators with higher precedence are evaluated before those with lower precedence.
Operator Associativity defines the direction of evaluation (left-to-right or right-to-left) for operators that have the same precedence level. This ensures that expressions are evaluated consistently when multiple operators of the same priority appear together.
List out various data types used in C.
Answer
Data types in C define the type and size of data associated with variables. They are broadly classified into the following categories:
- Basic (Primary) Data Types: These include int (integer values), char (single characters), float (single-precision floating-point numbers), and double (double-precision floating-point numbers).
- Derived Data Types: These are constructed from basic types, including arrays, pointers, structures, and unions.
- Enumeration Data Type: The enum type is used to define variables that can only assign certain discrete integer values.
- Void Data Type: The void type specifies that no value is available or represents an empty set of values, commonly used in function return types.
What is a user defined function? Give example.
Answer
Sign in to view the complete answer paper.
How to initialize the elements of an array?
Answer
Sign in to view the complete answer paper.
Define Void Pointer?
Answer
Sign in to view the complete answer paper.
Write the syntax of calloc function.
Answer
Sign in to view the complete answer paper.
Write any two differences between text and binary file.
Answer
Sign in to view the complete answer paper.
Define self-referential structure?
Answer
Sign in to view the complete answer paper.
What is sorting?
Answer
Sign in to view the complete answer paper.
Give the importance of sorting.
Answer
Sign in to view the complete answer paper.
Part B
Define variable. List the rules for declaring variable. Give valid and invalid examples.
Answer
Sign in to view the complete answer paper.
Write a program to find the Pascal’s triangle for the given input.
Answer
Sign in to view the complete answer paper.
Write a C program to display Fibonacci series using while loop.
Answer
Sign in to view the complete answer paper.
Describe Switch statement. Write c program to read month number and display month name using switch case.
Answer
Sign in to view the complete answer paper.
How to pass parameters to functions? Explain each with an example.
Answer
Sign in to view the complete answer paper.
Differentiate iterative functions and recursive function and write the recursive function to find the solution to towers of Hanoi problem.
Answer
Sign in to view the complete answer paper.
With suitable examples, explain different dynamic memory management functions in C.
Answer
Sign in to view the complete answer paper.
How can you declare pointer variable? Differentiate a variable address and variable value. How to access variable value using pointers? Explain.
Answer
Sign in to view the complete answer paper.
Write c program to reverse the given string without using strrev() function.
Answer
Sign in to view the complete answer paper.
Write a program for addition of two complex numbers by passing structures to a function.
Answer
Sign in to view the complete answer paper.
Explain about the bit field in C.
Answer
Sign in to view the complete answer paper.
Write a ‘C’ program to read the content of source file and convert all upper case letters in source file into lower case letters.
Answer
Sign in to view the complete answer paper.
What are the file status functions? Explain their usage with a sample ‘C’ program.
Answer
Sign in to view the complete answer paper.
Write program to implement bubble sort.
Answer
Sign in to view the complete answer paper.
Explain the procedure to insert a node into single linked list.
Answer
Sign in to view the complete answer paper.
Describe the implementation of binary search.
Answer
Sign in to view the complete answer paper.
Write in detailed note on queue data structure.
Answer
Sign in to view the complete answer paper.