DEPARTMENT OF SCIENCE AND HUMANITIES CS6202-PROGRAMMING AND DATA STRUCTURES I QUESTION BANK

Similar documents
DATA STRUCTURES USING C

10CS35: Data Structures Using C

PES Institute of Technology-BSC QUESTION BANK

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING LESSON PLAN

Data Structure [Question Bank]

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Unit Write iterative and recursive C functions to find the greatest common divisor of two integers. [6]

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. Course Curriculum. DATA STRUCTURES (Code: )

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

Data Structures. Level 6 C Module Descriptor

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

BCS2B02: OOP Concepts and Data Structures Using C++

Questions 1 through 25 are worth 2 points each. Choose one best answer for each.

Analysis of a Search Algorithm

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

AP Computer Science AB Syllabus 1

Bangalore University B.Sc Computer Science Syllabus ( Semester System)

Quiz 4 Solutions EECS 211: FUNDAMENTALS OF COMPUTER PROGRAMMING II. 1 Q u i z 4 S o l u t i o n s

Sample Questions Csci 1112 A. Bellaachia

To My Parents -Laxmi and Modaiah. To My Family Members. To My Friends. To IIT Bombay. To All Hard Workers

Module 2 Stacks and Queues: Abstract Data Types

Abstract Data Type. EECS 281: Data Structures and Algorithms. The Foundation: Data Structures and Abstract Data Types

Algorithms and Data Structures

Binary Heap Algorithms

Lab Manual. Data Structures (Pr): COT-213 Data Structures (P): IT-215

Objected oriented Programming: C++ Unit 1 1. Introduction 1.1. Introduction to Object Oriented Programming C++ fundamentals.

Data Structures and Data Manipulation

Syllabus for Computer Science. Proposed scheme for B.Sc Programme under Choice Based Credit System

MAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push)

ML for the Working Programmer

7.1 Our Current Model

Introduction to Data Structures

Data Structure and Algorithm I Midterm Examination 120 points Time: 9:10am-12:10pm (180 minutes), Friday, November 12, 2010

Review of Hashing: Integer Keys

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.

Linked Lists, Stacks, Queues, Deques. It s time for a chainge!

BSc (Hons) Business Information Systems, BSc (Hons) Computer Science with Network Security. & BSc. (Hons.) Software Engineering

Atmiya Infotech Pvt. Ltd. Data Structure. By Ajay Raiyani. Yogidham, Kalawad Road, Rajkot. Ph : ,

Data Structures and Algorithms V Otávio Braga

Data Structures Using C++ 2E. Chapter 5 Linked Lists

Lecture 12 Doubly Linked Lists (with Recursion)

Lecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists

Indiana State Core Curriculum Standards updated 2009 Algebra I

Java Software Structures

Tables so far. set() get() delete() BST Average O(lg n) O(lg n) O(lg n) Worst O(n) O(n) O(n) RB Tree Average O(lg n) O(lg n) O(lg n)

Algorithms and Abstract Data Types

University of Pune Revised Structure for the B. Sc. (Computer Science) Course (Second Year to be implemented from Academic Year )

C Interview Questions

Data Structures Fibonacci Heaps, Amortized Analysis

COLLEGE ALGEBRA 10 TH EDITION LIAL HORNSBY SCHNEIDER 1.1-1

COMPUTER SCIENCE. Paper 1 (THEORY)

Chapter 8: Bags and Sets

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries

Sorting revisited. Build the binary search tree: O(n^2) Traverse the binary tree: O(n) Total: O(n^2) + O(n) = O(n^2)

An Introduction to Programming and Computer Science

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R

CHAPTER 4 ESSENTIAL DATA STRUCTRURES

Section IV.1: Recursive Algorithms and Recursion Trees

Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser Quiz 1.

Algorithms and data structures

Ordered Lists and Binary Trees

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Universal hashing. In other words, the probability of a collision for two different keys x and y given a hash function randomly chosen from H is 1/m.

Converting a Number from Decimal to Binary

Data Structures, Practice Homework 3, with Solutions (not to be handed in)

2) What is the structure of an organization? Explain how IT support at different organizational levels.

Curriculum Map. Discipline: Computer Science Course: C++

AFF 808. Sub. Code 4BIT1C1. B.Sc. DEGREE EXAMINATION, NOVEMBER First Semester. Information Technology

Binary Search Trees CMPSC 122

Introduction to Programming System Design. CSCI 455x (4 Units)

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

1 FCS Project Submission System

1. Relational database accesses data in a sequential form. (Figures 7.1, 7.2)

Data Structures and Algorithms

The Tower of Hanoi. Recursion Solution. Recursive Function. Time Complexity. Recursive Thinking. Why Recursion? n! = n* (n-1)!

ADTs,, Arrays, Linked Lists

Unordered Linked Lists

Application of Stacks: Postfix Expressions Calculator (cont d.)

CSE373: Data Structures and Algorithms Lecture 1: Introduction; ADTs; Stacks/Queues. Linda Shapiro Spring 2016

Basic Programming and PC Skills: Basic Programming and PC Skills:

CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards

Common Data Structures

MEP Y9 Practice Book A

Exam study sheet for CS2711. List of topics

DE 6211 DISTANCE EDUCATION. M.Sc. (IT) DEGREE EXAMINATION, MAY PRINCIPLES OF INFORMATION TECHNOLOGY. (2002 onwards) PART A (10 3 = 30 marks)

The Elective Part of the NSS ICT Curriculum D. Software Development

Queues Outline and Required Reading: Queues ( 4.2 except 4.2.4) COSC 2011, Fall 2003, Section A Instructor: N. Vlajic

Class XII (Theory) C++

22c:31 Algorithms. Ch3: Data Structures. Hantao Zhang Computer Science Department

1 Abstract Data Types Information Hiding

Class Overview. CSE 326: Data Structures. Goals. Goals. Data Structures. Goals. Introduction

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

B+ Tree Properties B+ Tree Searching B+ Tree Insertion B+ Tree Deletion Static Hashing Extendable Hashing Questions in pass papers

C++ Programming Language

B.Sc.(Computer Science) and. B.Sc.(IT) Effective From July 2011

Data Structures UNIT III. Model Question Answer

Transcription:

DEPARTMENT OF SCIENCE AND HUMANITIES Sem/Year/Branch: II/I/CSE CS6202-PROGRAMMING AND DATA STRUCTURES I QUESTION BANK UNIT I 1. Give two examples of C preprocessors with syntax.(apr/may 2015) 2. What are function pointers in C? Explain with example. (APR/MAY 2015) 3. Define array. Give an example.(nov/dec 2014) 4. Give example on call by reference.(nov/dec 2104) 5. With the help of the printf function show how C handles functions with variable number of arguments.(may/june 2014) 6. Define macros with an example.(may/june 2014) 7. What is Size of operator in C? 8. Distinguish between Call by value Call by reference. 9. What is the difference between an array and pointer? 10. Define function. Why they are needed? What are its types? 11. What is a Pointer and how it is declared? What are the uses of Pointers? 12. Define pre-processor in C. 13. Define recursive function. 14. Differentiate between pointer to constants and constants pointers 15. Define global declaration. 1. Explain the various control statements in C language with example in detail. (16) (Nov/Dec 2014) 2. Briefly discuss about :( 16) (Nov/Dec 2014) i) Function with number of arguments ii) Function pointers 3. Explain the C preprocessor operators, each with a neat example that is used to create macros.(8) (Apr/May 2015) 4. Explain in detail about various Pre-processor directives with suitable examples.(16) 5. Explain about passing parameters to the function with and without using pointers with suitable example.(or) Explain about Call by Value and Call by Reference with an example program.(16) 6. Write a function that returns a pointer to the maximum value of an array of double s. If the array is empty, return NULL. (8) (APR/MAY 2015) 7. Write a C program to find all the roots of a quadratic equation.(8) (APR/MAY 2015) 8. Write a C program using function to check if the given input number is palindrome or not.(8) (APR/MAY 2015) 9. Write a C program to print the Fibonacci numbers. (May/June 2014)

10. Write a C program to multiply two matrices that are represented as pointers. Use function pointers to the function multiply which takes the two matrices as parameter and prints the result of the multiplication. (May/June 2014) UNIT II 1. Give applications in which unions rather than structures can be used. (May/June 2014) 2. Will the following declarations work justify your answer? (May/June 2014) 3. What are the statements used for reading a file? (Nov/Dec 2014) 4. Define the need for union in C. (Nov/Dec 2014) 5. What is the difference between getc() and getchar()? Explain (Apr/May 2015) 6. Explain the syntax as given below: (Apr/May 2015) 7. Compare arrays and structures. 8. Compare structures and unions. 9. Define Structure in C. 10. Define file. 11. Define binary files. 12. List out the file handling functions. 13. Define opening a file. 14. What is meant by Union in C.? 15. What are the files attributes in C? 1. Write a C program to read the contents of a file in.txt from last to first and write the contents to out.txt (8) (May/June 2014) 2. Write the function prototype and explain how files are manipulated in C.(8) (May/June 2014) 3. Create a structure to store a complex number and write functions (for addition) that handle this new structure. (8) (May/June 2014) 4. Write program to perform the following operations for the customers of a bank using the concept of structures. (8) (May/June 2014) 5. Explain the difference between structure and Union with examples. (16) (Nov/Dec 2014) or State the advantages and disadvantages of structures and unions in C programming.(4) (Apr/May 2015) 6. Explain about file manipulation in detail with suitable program.(16) (Nov/Dec 2014) 7. Write a C program that uses functions to perform the following operations using structure :(12) (Apr/May 2015) Reading a complex number Writing a complex number Addition of two complex numbers Multiplication of two complex numbers 8. Using C programming, display the contents of a file on screen.(4) (Apr/May 2015) 9. Explain structure in detail with a neat example(16) 10. Explain union in detail with suitable example.(16)

UNIT III 1. What is advantage of an ADT? (May/June 2014) 2. What are abstract data types? (Nov/Dec 2014) 3. What is a circular linked list? (Nov/Dec 2014) 4. Define ADT. (Apr/May 2015) 5. What is a static linked list? State any two applications of it. (Apr/May 2015) 6. Define ADT. What are abstract data types? (Nov/Dec 2014)(Apr/May 2015) 7. Define non-linear data structure. 8. What is meant by a linked list? 9. What is a singly listed list? 10. Define double circularly linked list? 11. Define polynomial ADT. 1. Write an algorithm to perform insertion and deletion on a doubly linked list.(16) (May/June 2014) 2. Consider an array A [1: n]. Given a position, write an algorithm to insert an element in the array. If the position is empty, the element is inserted easily. If the position is already occupied the element should be inserted with the minimum number of shifts. (Note: The elements can shift to the left to the right to make the minimum number of moves).(16) (May/June 2014) 3. Describe the creation of a doubly linked list and appending the list. Give relevant coding in C.(16) (Nov/Dec 2014) 4. Explain the following.(i)application of lists. (ii)polynomial manipulation.(16) (Nov/Dec 2014) 5. Write a C program to perform addition, subtraction and multiplication operations on polynomial using linked list.(16) (Apr/May 2015) 6. Write a C code for circular link list with create, insert, delete, display operations using structure pointer.(16) (Apr/May 2015) UNIT IV 1. Define double ended queue. (May/June 2014) 2. List the application of a queue. (May/June 2014) 3. Give the application of stack. (Nov/Dec 2014) 4. What is doubly ended queue? (Nov/Dec 2014) 5. Write the syntax of Calloc () and Realloc () and mention its application in linked list. (Apr/May 2015) 6. Given the prefix for an expression, write its postfix.-*-+abc/ef-g/hi (Apr/May 2015) 7. What are the two operations of stack? 8. What is circular queue? 9. What is priority queue? 10. State the difference between stacks and linked lists.

1. Write an algorithm to convert an infix expression to a postfix expression. Trace the algorithm to convert an infix expression *(a+b)*c/d+e/f* to a postfix expression. Explain the need for infix and postfix expressions.(16) (May/June 2014) 2. Write an algorithm to perform the four operations in a double ended queue that is implemented as an array.(16) (May/June 2014) 3. Discuss about stack ADT in detail. Explain any one application of stack.(16) (Nov/Dec 2014) 4. Explain about queue ADT in detail. Explain any one application of queue with suitable example.(16) (Nov/Dec 2014) 5. Write a C program that checks if expression is correctly parenthesized using stack.(12) (Apr/May 2015) 6. Write the function to check for stack status as full() or empty(). (4) (Apr/May 2015) 7. Explain stack using linked list implementation.(16) 8. Explain stack using array implementation.(16) 9. Explain evaluation of postfix expression in detail.(16) UNIT V 1. What is the time complexity of binary search? (May/June 2014) 2. List the sorting algorithm which uses logarithmic time complexity. (May/June 2014) 3. Define extendible hashing. (Nov/Dec 2014) 4. Differentiate internal and external sorting. (Nov/Dec 2014) 5. What is meant by internal and external sorting? Give four examples of each type. 6. State the applications of linear and binary search techniques. 7. Define quick sort. 8. Define insertion sort. 9. Define merge sort. 10. Define bubble sort. 11. Differentiate between merge sort and quick sort? 12. Define hashing. 13. Define hash table. 14. Define rehashing. 15. List out the different types of hashing functions. 1. Write short notes on hashing and the various collision resolution techniques.(16) (May/June 2014) 2. Write an algorithm to sort n numbers using quick sort. Show how the following numbers are sorted using quicksort: 45, 28, 90, 1, 46, and 39. (16) (May/June 2014) 3. What are the different types of hashing techniques? Explain them in detail with example.(16) (Nov/Dec 2014) 4. Write an algorithm to sort a set of N numbers using quick sort. Trace the algorithm for the following set of numbers:88, 11, 22, 44, 66, 99, 32, 67, 54, 10(Nov/Dec 2014) 5. Sort the given integers and show the intermediate results using shell sort 35, 12, 14, 9, 15, 45, 32, 95, 40, 5 (8m) (Apr/May 2015) 6. Write C code to sort an integer array using shell sort.(8) (Apr/May 2015) 7. Write a C code to perform binary search. (10m) (Apr/May 2015) 8. Explain the Rehashing techniques. (6) (Apr/May 2015)

9. Explain insertion sort in detail.(16) 10. Write a C code to perform linear search.(16)