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

C and Data Structures

papaer

Uploaded by

rajasekharjv
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

C and Data Structures

papaer

Uploaded by

rajasekharjv
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

FOR 2000 AND 2001 BATCH

Set No.

Code : NR-10203 I-B.Tech. Supplementary Examinations April/May, 2003 C AND DATA STRUCTURES (Common to Electrical and Electronics Engineering, Electronics and Communication Engineering, Computer Science Engineering, Computer Science and Information Technology, Electronics and Instrumentation Engineering, BioMedical Engineering, Electronics and Control Engineering, Electronics and Telematics, Electronics and Computer Engineering, Computer Science and Systems Engineering.) Time : 3 hours Max. Marks : 80 Answer any FIVE questions All questions carry equal marks --1.a) What are the different data types available in C language? Explain with examples. b) Write a C program to accept integer values and to find no. of odd values and even values entered. The program must exit if a negative value is entered. Use while loop only. 2.a) b) 3.a) b) c) 4.a) b) c) 5. 6.a) b) 7. 8. Write a C program to convert the given characters into other case and display the number of character in the string. Write a C program to find the given number is palindrome or not. Write a C program to print the given number in reverse order using dowhile loop only. What is the difference between structure and union? Explain with examples. List out different file related functions and explain at least three of them. Write a C function to check whether the given MxN matrix is upper matrix or not. Explain about bitwise operators. Where these operators are used? What are the differences between arrays and linked lists? Write a C Program to insert, delete, and display the data of a Stack whose head node is given. Using linked list concept. How many way the output can be formatted? Explain with examples. Write a C function to return a value if the insertion of a node is happening in a queue. Use arrays method. Write a C program to search for a number using binary search method from an unsorted data. Write algorithms for the following: (a) Heap sort (b) Depth first search of a graph. ***

FOR 2000 AND 2001 BATCH

Set No.

Code : NR-10203 I-B.Tech. Supplementary Examinations April/May, 2003 C AND DATA STRUCTURES (Common to Electrical and Electronics Engineering, Electronics and Communication Engineering, Computer Science Engineering, Computer Science and Information Technology, Electronics and Instrumentation Engineering, BioMedical Engineering, Electronics and Control Engineering, Electronics and Telematics, Electronics and Computer Engineering, Computer Science and Systems Engineering.) Time : 3 hours Max. Marks : 80 Answer any FIVE questions All questions carry equal marks --1.a) Differentiate logical operators and relational operators available in C Language. b) Write a C program to print numbers using the following functions: f(x) = 5 f(x+1)=9 f(x+2)=f(x)+f(x+1) 2.a) b) 3.a) b) 4. Write C Program to print the Armstrong numbers from n to m using while loop only. Write a C function which will return an integer equal to the number of a value to the main program. Compare the various storage classes available in C language. How string handling functions are used? Explain with examples. Write a menu driven program to accept students information of a class like student id, student name, age, marks in four different subjects. Find the first highest mark, second highest mark of the class. Display the details of the students according to descending order of their total marks. Use structures. What are the applications of stacks and queues? Briefly explain. Write a C program to insert nodes into a binary tree and to traverse in pre-order. Write a C program to convert a prefix expression into infix expression. Write an algorithm to insert, delete and display the contents of a circular queue whose head node is given. What is a spanning tree? Write BFS algorithm for a spanning tree. Construct the binary tree for the following: Pre-order : A E F D J H I G B C In-order : F E A H J I D B G C ***

5.a) b) 6. 7. 8.a) b)

Set No.
FOR 2000 AND 2001 BATCH Code : NR-10203 I-B.Tech. Supplementary Examinations April/May, 2003 C AND DATA STRUCTURES (Common to Electrical and Electronics Engineering, Electronics and Communication Engineering, Computer Science Engineering, Computer Science and Information Technology, Electronics and Instrumentation Engineering, BioMedical Engineering, Electronics and Control Engineering, Electronics and Telematics, Electronics and Computer Engineering, Computer Science and Systems Engineering.) Time : 3 hours Max. Marks : 80 Answer any FIVE questions All questions carry equal marks --1.a) What are the control statements available in C language? Explain with examples. b) Write a C function to swap two values without using intermediate variable. 2.a) b) 3.a) b) 4.a) b) 5. 6. 7.a) b) 8. What are the increment and decrement operators? How these are executed in the output statements. Explain. Write a C Program to check whether the given input (number and string) is palindrome or not. Write a C program to copy student database from file1 to file2. How the multi-dimensional arrays are handled in the memory? Explain with examples. Explain the differences between structure and union with the help of examples. Write a C program to print Fibonacci numbers using: (i) iterative method and (ii) recursive method. Write C functions to insert a value into the linked list: (i) at the beginning (ii) at the end (iii) after nth location. Write a C Program to perform binary search on an unsorted data. Write an algorithm for DFS of a spanning tree. What are the different types of queues available Explain their representation with linked lists. Write short notes on the following: (a) Tree traversals (b) Operations on pointers (c) Differences between while, dowhile and switch. ***

FOR 2000 AND 2001 BATCH Code : NR-10203

Set No.

I-B.Tech. Supplementary Examinations April/May, 2003 C AND DATA STRUCTURES (Common to Electrical and Electronics Engineering, Electronics and Communication Engineering, Computer Science Engineering, Computer Science and Information Technology, Electronics and Instrumentation Engineering, BioMedical Engineering, Electronics and Control Engineering, Electronics and Telematics, Electronics and Computer Engineering, Computer Science and Systems Engineering.) Time : 3 hours Max. Marks : 80 Answer any FIVE questions All questions carry equal marks --1.a) b) 2.a) b) 3.a) b) 4.a) b) 5. Explain algorithm and flow chart. Write a flow chart to find the largest number from the given three numbers. C function to compute ncr using iterative method and recursive Method. Include all validations. Explain all the operators of C using examples. And also give their precedence. Write a C function to find the roots of a quadratic equation. Consider the all validations. Explain how the multi-dimensional arrays are initialized and handled. Write a C program to concatenate two strings using pointers. Write a C program to multiply two matrices. All validations must be included. Write a C Program to convert a binary number into decimal and vice versa. Use while loop only. Consider an employee database as given below: Emp structure must have employee number, employee name, basic salary and date of birth. Date of birth is again a structure with three fields. Compute the net salary (Basic salary + DA + HRA) of employee with the following conditions: If basic salary <=8000 DA = 15% of basic salary and HRA = 6% of basic If basic salary >8000 DA = 20% of basic salary and HRA = 10.5% of basic If basic salary >10000 DA = 25% of basic salary and HRA = 15.75% of basic Write a c program to display the contents of a given file file1 on to a standard output. Write an algorithm to sort the given data in descending order using bubble sort technique. Contd..2.

6.a) b)

Code No.NR-10203 7.a) b) 8.a) b)

::2::

Set No.4

Explain the heap sort technique on the following data: 56, 23, 10, 99, 6, 19, 45, 45, 23 What are the differences between tree and graph? algorithms.

Explain DFS and BFS

Construct binary tree for the following data: In-order : F E A C D G H B I Post order : E F C D H I B G A Write an algorithm to perform insertion and deletion from a dequeue. ***

You might also like