You are on page 1of 2
‘SUB: DATA STRUCTURES AND APPLICATIONS (18CS32) QUESTION BANK (PREVIOUS YEARS QUESTIONS) MODULE 1 (Introduction, Array operations and Strings) ‘YEARS QUESTIONS What is Data Structures? Classify and Explain them briefly. Also explain the basic operations that can be performed on data structures. Janié June19(17s) Jani7 List out the applications. e Whats an Algorithm? Explain the criteria that an algorithm must satisfy. What are the different types of memory Allocation? Explain the Different functions that supports Dynamic Memory Allocation Jani@, 19(175), June17,18,19(173) HED Differentiate between static and dynamic memory allocations. Explain with an example: Insertion and Deletion in an array. uneTé Define Structures .lilustrate different ways of declaring structures with Example Janté List and explain 3 types of structures used to store the strings (10m) ant 9075) Whatis an array and how the array pointers are declared. (ul3) Define Pointers. Give advantages and disadvantages of pointers. How do you declare and initialize the pointer. How do you access the value pointed to by a pointer. Jani8 June19 JuneTs What is pointer to pointer? Give the following declaration int a=8; intb=9; int*p=&a; int *q=&b; Whatis the value of each of the following expression? 4a, ++(*p), -(4q), ~b Write a function to swap the contents of 2 variables using pointer. Write a C Program to define details of the Employee with the fields like EName, EmpID, DOJ(Date, Month, Year) and Salary(Basic, DA, HRA) Read data for 10 employees and display them. Find the Employee who is getting Highest Salary. ‘Suppose each student in a class of 25 students is given 4 tests, assume that the students are numbered from 1 to 25, and the test scores are assigned in the 25X4 matrix called SCORE. Suppose Base (SCO RE) =200 w=4 and the programming language uses row-major order to store this 2D array, then find the address of 3° test of 12" studenti.e. SCORE (12,3) Write appropriate structure definition and variable declarations to store following information about 50 students: Name, USN, GENDER, DOB and Marks in 3 subjects $1, $2, $3. Date of birth should be a structure containing fields day, month and year. unyia 15 What is self-referential structure? Bring out the difference between Structures and unions. Junets 16 Write ac program to implement (Linear Search (I)Binary Search {illSelection Sort_(Iv)Bubble Sort. (Also algorithms for these — Jan19(17s)) Jani7 Jan19(17s) 7 Write a C Program to Create 1D and 2D Arrays using dynamic memory Allocations. & also freeing the memory. (OR) What is dynamically allocated arrays? Explain with sultable examples. Junes Explain about the representation of 2 D arrays inmemory vant9(173) Ff Write a C Program to implement (i)Pattern matching (ii)strrev() (ii)stropy() (w)streat() _(v)stromp) Jani8 June17,19(17s) July19 What is a string? (How is a string declared and initialized). Explain the following string functions with example: STRTOK, STRCAT & SUBSTR (4M) ee Consider the pattern ababab, construct the table and the corresponding Jani9 labelled directed graph used in the second pattern matching algorithm What do you mean by pattern matching? Let P and T are 2 strings with lengths R and S respectively & stored as arrays with one character per element. Write a pattern matching algorithm that finds index P in T. Also Jani9 (178) discuss about this algorithm. (10m) : 3 | Write the Knuth Morris Pratt (KMP) pattern matching algorithm and apply the Jani? ‘same to search the pattern ‘abcdabcy’ in the text ‘abcxabcdabxabcdabcdabcy’ June19(17s) 24 | Whats Polynomial? What is degree of polynomial? Jant7 Write a C Program to add 2 polynomials A and B, store the result in a

You might also like