# CS 6202 PROGRAMMING & DATA STRUCTURES-I PART-B UNIT-I ANNA UNIVERSITY QUESTIONS

Save this PDF as:

Size: px
Start display at page:

Download "CS 6202 PROGRAMMING & DATA STRUCTURES-I PART-B UNIT-I ANNA UNIVERSITY QUESTIONS"

## Transcription

1 PART-B UNIT-I 1. 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) Double*maximum(double*a,int size); 2. Write a c program to find all the roots of a quartic equation? (8) 3. Write a c program using function to check if the given input number is palindrome or not?(8) 4. Explain the preprocessor operators,each with a neat example that is used to create macros?(8) 5. Write a c program to find the unique elements in an array using a function function takes the array as a parameter and points the unique elements. 6. Write a c program to print the fibonacci numbers? 7. Write a c program to multiply two matrices that are represented as pointers.use a function pointer to the function multiply which takes the two matrices as parameter and prints the result of the multiplication. 8. Explain the various control statements in c language with example in detail?(16) Brefily discuss about: (8+8) (a)function with number of arguments (b)function pointers 9. illlustracte the various control structure used in c with suitable example?(10) 10. write a c program to implement the following string handling functions and pointers?(6) (a)strlen() (b)strcat() (c)strcpy() 11. Write a program to print the Fibonacci series using recursion? (6) 12. Write a c program with functions and pointers to multiply two matrices and resultant matrix to the calling function(10) 13. Explain about the different parameter passing methods with examples. (or describe the ways of passing parameters to functions with example.) 14. Explain the following conditional statements. I. Nested if-else statement Ii. Switch-case statement 15. List and explain the various preprocessor directives supported by c language. 16. Describe the statements for decision making, branching and looping.((or) explain the conditional and loop statements available in c with a example program) 1 PREPARED BY BALAMURUGAN.A.G

2 17. Explain in detail about the function prototypes. ((or) explain how function with variable number of arguments is used in c program with an example) 18. Explain the concept of recursive functions in c. 19. Explain in detail about the function pointer with examples.((or) explain about pointer to function and how to pass the pointers to function? ) 1. Explain about pointers, and how the pointer variables are declared? 20. What are the different primary and derived and void data types used in c? Give examples. 21. Distinguish between the following: a) Actual and formal arguments b) Global and local variables c) Automatic and static variables d) Scope and visibility of variables e) & operator and * operator 22. How 2d arrays are declared in c? Explain with an example. 23. What is a string? Also explain different string functions with example. 24. Explain the structure of c program. c programs: prime or not, armstrong or not, fibonacci series, factorial, reverse the given number [palindrome]. C program using recursion: factorial.sum of digits,power of the number c program using arrays: multiply two matrices. UNIT-II 1. Write a c program that uses functions to perform the following the following operations using structure: (12) (a)reading a complex number (3) (b)writing a complex number (3) (c)addition of two complex number(3) (d)multiplication of two complex numbers (3) 2. State the advantages and disadvantages of structures and unions in c programming?(4) 3. Perform the following to manipulate file handling using c.(12) (a)define an infut file handle file handle called input _file,which is a pointer to a type file. (b)using input _file,open the results.dat for read mode. (c) write c statements which tests to see if input_file has opened the data file successfully.ifnot,print an error message and exit the program. (d) write c code which will read a line of character(terminated by a /n. (e)close the file associated with input_file. Using c program,display the contents of a file on screen (4) 2 PREPARED BY BALAMURUGAN.A.G

4 f) Array of structures g) Arrays within the structures h) Structures within the structures i) Structure pointer 22. How structure values are passed to function? Explain the methods. 23. Design a structure student_record to contain name, dob, total marks obtained. 24. Develop a program to read data for 10 students in a class and list them rank-wise. 25. Explain the string handling function with examples. 26. Distinguish between the following functions. j) Getc() and getchar() k) Scanf() and fscanf() l) Printf() and fprintf() m) Feof() and ferror() 27. Write a program to copy the contents of one file into another. 28. Explain fread() and fwrite() with example program. UNIT-III 1. Write a c program to perform addition,subtraction and multiplication operations on polynomial using linked list?(16) 2. Write a c code for circular linked list with create,insert,delete,display operations using structure pointer?(16) 3. Write an algorithm to perform insertion and deletion on doubly linked list (16) 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 minimum number of shifts.(note:the elements can shift to the left or to the right to the make the minimum number of moves). (16) 4. Describe the creation of a doubly linked list and appending the list.give relevant coding in c?(16) 5. Explain the following : (8+8) (i)applications of list (ii)polynomial manipulation 6. illustrate the algorithm to create the singly linked list and perform all the operations on the created list. 4 PREPARED BY BALAMURUGAN.A.G

6 8. write a algorithm to convert the infix expression to postfix expression (10) 9. show the simulation using stack for the following expression : 12+3*14-(5*16) Write an algorithm to implement the circular queue using arrays.(10) 11. List the application of queues? 12. Define queue adt. How is circular queue implemented? Give example. 13. Write algorithms for push and pop of a stack. Explain how stack is used for the evaluation of expression. Write appropriate algorithm and describe the evaluation step by step with a suitable example.((or) explain the different operation that can be performed on stacks? Write the algorithm for each operation.)) 14. Write a suitable c routine to remove and return the top element of the stack using array implementation 15. Write an algorithm to convert an infix expession into postfix expression. Use the example expression: ((a+b)*c-(d-e))+(f+g) for analysis. 16. What is a stack adt? Write in detail about any three applications of stack. 17. Write suitable routines to perform insertion and deletion operations in a linked queue. 18. Write algorithms for push and pop of a stack. Explain how stack is used for the evaluation of expression. Write appropriate algorithm and describe the evaluationstep by step with a suitable example. 19. Explain the operations and the implementation of stack adt using array 20. Explain the operations and the implementation of stack adt using linked list. (16) 21. Convert the infix expression a+b^c+(d*e/f)*g to postfix expression and evaluate the same Using stack. A=3, b=5, c=2, d=7, e=4, f=1, g=8 22. What is a queue? Write an algorithm to implement queue with example. 23. Explain the operations and the implementation of queue adt using array 24. Explain the different types of queue. 25. Explain the operations and the implementation of queue adt using linked list. (16) 26. Explain prefix, infix and postfix expressions with an example. 6 PREPARED BY BALAMURUGAN.A.G

7 UNIT-V 1. Sort the given integers and show the intermediate results using shell sort (35,12,14,9,15,45,32,95,40,5) (8) 2. Write c code to sort an integer array using shell sort (8) 3. Write a c program to perform a binary search? (10) 4. Explain the rehashing techniques?(6) 5. Write a short notes on hashing and the various collision resolution techniques? 6. Write an algorithm to sort n numbers using quicksort.show how the following numbers are sorted using quicksort: 45,28,90,1,46,39,33,87 7. What are the different type of hashing techniques?explain them in detail with example?(8+8) 8. 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) (16) 9. sort the following sequence using quick sort (8) 2,13,45,56,27,18,24,30,87,9 10. Write an algorithm to search a number in a given set of numbers using binary search.(8) 11. Explain the open addressing and chaining methods of collision resolution techniques in hashing 12. Write down the complete quicksort algorithm and illustrate its working to sort the list (45, 23, 11, 35, 62, 87, 24, 66) 13. What is an external sort algorithm? Explain, with an example. 14. Derive the best, average, worst case complexity of a linear search. 15. Develop an algorithm for binary search. Validate the algorithm with a suitable data set. 16. Explain the various hashing technique with suitable examples. 17. Explain divide and conquer strategy with the help of merge sort with suitable example and routine. 18. Explain in detail about bubble sort with an example. 7 PREPARED BY BALAMURUGAN.A.G

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

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

### V.S.B. ENGINEERING COLLEGE, KARUR. Academic Year: (ODD Semester) Department of Computer Science and Engineering

V.S.B. ENGINEERING COLLEGE, KARUR Academic Year: 2016-2017 (ODD Semester) Department of Computer Science and Engineering Question Bank (2013 Regulations) S.No. Name of the Subject / Lab Semester Page No.

### DATA STRUCTURES USING C

DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give

### 10CS35: Data Structures Using C

CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a

### PES Institute of Technology-BSC QUESTION BANK

PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions

### SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK (2110003) [F.Y.B.E.

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK Subject: Computer Programming and Utilization (2110003) [F.Y.B.E.: ALL BRANCHES] Unit 1

### Data Structure [Question Bank]

Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:

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

Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The

### DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING LESSON PLAN

ERODE SENGUNTHAR ENGINEERING COLLEGE (Approved by AICTE, New Delhi, Permanently Affiliated to Anna University - Chennai & Accredited by NAAC & National Board of Accreditation (NBA), New Delhi, Accredited

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

Unit 1 1. Write the following statements in C : [4] Print the address of a float variable P. Declare and initialize an array to four characters a,b,c,d. 2. Declare a pointer to a function f which accepts

### COURSE: B.TECH-ECE. IV Sem. Data structure Using C. b) Deletion of element in an array

COURSE: B.TECH-ECE. IV Sem Data structure Using C 1. Determine the formula to find the address location of an element in three dimensions array, suppose each element takes four bytes of space & elements

### UNIT-1 PART-A UNIT-2 PART-A

UNIT-1 1. Define computer? 2. Discuss briefly about input and output devices? 3. What is a RAM? 4. What is arom? 5. What is a compiler? 6. Write about a linker? 7. List any 5 key wordsof c? 8. Illustrate

### Bhakta Kavi Narsinh Mehta University, Junagadh

Bhakta Kavi Narsinh Mehta University, Junagadh Draft Syllabus for B.Sc. (Computer Science) Bachelor of Science (Computer Science) (Semester - 1) Effective From June - 2016 B.Sc. (C.S.) (Semester - 1) CS-101:

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

Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate

### UNIVERSITI MALAYSIA SARAWAK KOTA SAMARAHAN SARAWAK PSD2023 ALGORITHM & DATA STRUCTURE

STUDENT IDENTIFICATION NO UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI SAINS KOMPUTER & TEKNOLOGI MAKLUMAT (Faculty of Computer Science & Information Technology) Diploma in Multimedia

### VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY

ACADEMIC YEAR: 0 7 VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 0 0 SEMESTER: ODD BRANCH: MCA YEAR: I SEMESTER: I SUBJECT CODE AND NAME: MC70 Problem Solving and Programming NAME OF THE FACULTY

### INTERNATIONAL EDITION. Problem Solving with C++ Data Abstraction & SIXTH EDITION. Walls and Mirrors. Frank M. Carrano Timothy Henry

INTERNATIONAL EDITION Data Abstraction & Problem Solving with C++ Walls and Mirrors SIXTH EDITION Frank M. Carrano Timothy Henry Operator Meaning Associativity Usage * multiply left expr * expr / divide

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

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT Course Curriculum DATA STRUCTURES (Code: 3330704) Diploma Programme in which this course is offered Semester in which offered Computer Engineering,

### BCS2B02: OOP Concepts and Data Structures Using C++

SECOND SEMESTER BCS2B02: OOP Concepts and Data Structures Using C++ Course Number: 10 Contact Hours per Week: 4 (2T + 2P) Number of Credits: 2 Number of Contact Hours: 30 Hrs. Course Evaluation: Internal

### MLR Institute of Technology

MLR Institute of Technology DUNDIGAL 500 043, HYDERABAD COMPUTER SCIENCE AND ENGINEERING Computer Programming Lab List of Experiments S.No. Program Category List of Programs 1 Operators a) Write a C program

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

KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

### Analysis of a Search Algorithm

CSE 326 Lecture 4: Lists and Stacks 1. Agfgd 2. Dgsdsfd 3. Hdffdsf 4. Sdfgsfdg 5. Tefsdgass We will review: Analysis: Searching a sorted array (from last time) List ADT: Insert, Delete, Find, First, Kth,

Marathwada Institute of Technology Master of Computer Application Title of the subject: Object Oriented Programming using C++ Course Code: MCA 101 Faculty: Shubhashree Savant Class: FY MCA Part - I (Question

### FBCA-02 April-2007 Programming in C Language BCA-102 (New Course)

Seat No. : FBCA-02 April-2007 Programming in C Language BCA-102 (New Course) Time : 3 Hours] [Max. Marks : 70 Instructions : (1) Figures to the right indicate full marks of the question. (2) Make and state

### Data Structures 2014

Unit-1 Introduction Short Questions:1. Define data structure. 2. Define algorithm. 3. List out areas in which data structures are applied. 4. List out structure of algorithm. 5. List out properties of

### Data Structures. Level 6 C30151. www.fetac.ie. Module Descriptor

The Further Education and Training Awards Council (FETAC) was set up as a statutory body on 11 June 2001 by the Minister for Education and Science. Under the Qualifications (Education & Training) Act,

### BHARATHIAR UNIVERSITY: COIMBATORE CENTRE FOR COLLABORATION OF INDUSTRY AND INSTITUTIONS(CCII) CERTIFICATE IN ADVANCED PROGRAMMING C++ LANGUAGE

Certificate in Advanced Programming - C++ Language Page 1 of 7 BHARATHIAR UNIVERSITY: COIMBATORE 641046 CENTRE FOR COLLABORATION OF INDUSTRY AND INSTITUTIONS(CCII) CERTIFICATE IN ADVANCED PROGRAMMING C++

### 12 Abstract Data Types

12 Abstract Data Types 12.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define the concept of an abstract data type (ADT).

### Summary. Pre requisition. Content Details: 1. Basics in C++

Summary C++ Language is one of the approaches to provide object-oriented functionality with C like syntax. C++ adds greater typing strength, scoping and other tools useful in object-oriented programming

### 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.

1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The

### Fundamentals of Computer & Programming in C Short-answer type questions

Fundamentals of Computer & Programming in C Short-answer type questions Section- A i. What is a computer system? Draw the block diagram of computer. ii. Differentiate between Real Time Operating System

### Java Software Structures

INTERNATIONAL EDITION Java Software Structures Designing and Using Data Structures FOURTH EDITION John Lewis Joseph Chase This page is intentionally left blank. Java Software Structures,International Edition

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

1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

Trees and Binary Relations Debdeep Mukhopadhyay IIT Madras Outline Tree : definition and its relation with binary relations Properties Expressions: Balancedness Infix, Postfix and Prefix Expression Trees

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

Syllabus for Computer Science Proposed scheme for B.Sc Programme under Choice Based Credit System SEMESTER - I Code Course Title Course Type HPW Credits BS106 SEMESTER -I I BS 206 SEMESTER -III BS 301

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

Questions 1 through 25 are worth 2 points each. Choose one best answer for each. 1. For the singly linked list implementation of the queue, where are the enqueues and dequeues performed? c a. Enqueue in

### Comp 245 Data Structures. Stacks

Comp 245 Data Structures Stacks What is a Stack? A LIFO (last in, first out) structure Access (storage or retrieval) may only take place at the TOP NO random access to other elements within the stack An

### CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.

Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure

### L T P C Course Name: Linux Lab 0 0 4 2. Course Code: PBC - 602

Course Code: PBC - 602 Course Name: Linux Lab 0 0 4 2 1) Write a shell script to input two numbers and perform all mathematical operations on them 2) Write a shell script to print the information about

### Data Structures Using Java

Data Structures Using Java D. S. Malik P. S. Nair THOMSON COURSE TECHNOLOGY Australia Canada Mexico Singapore Spain United Kingdom United States TABLE OF Contents PREFACE XXV 1.Software Engineering Principles

### Module 2 Stacks and Queues: Abstract Data Types

Module 2 Stacks and Queues: Abstract Data Types A stack is one of the most important and useful non-primitive linear data structure in computer science. It is an ordered collection of items into which

### GTU Questions. Computer Programming & Utilization. Chief Course Coordinator Prof. Mitul K.Patel. (Head of Department & Assistant Professor)

GTU Questions Computer Programming & Utilization Chief Course Coordinator Prof. Mitul K.Patel (Head of Department & Assistant Professor) Course Coordinator Prof. Vrutti D. Shah (Assistant Professor) Lab

### BACHELOR OF COMPUTER APPLICATIONS SEMESTER -I

BACHELOR OF COMPUTER APPLICATIONS SEMESTER -I Fundamentals and Windows Based Application Understanding Computers Computer: A Definition, Characteristics of Computers, Speed, Accuracy, Diligence, Versatility,

### Algorithms and Data Structures

Algorithms and Data Structures Part 2: Data Structures PD Dr. rer. nat. habil. Ralf-Peter Mundani Computation in Engineering (CiE) Summer Term 2016 Overview general linked lists stacks queues trees 2 2

### COURSE CONTENTS. 3 -months 8:30 am - 3:30 pm Mon - Fri. [Admissions strictly through written test based on Basic C and Aptitude]

COURSE CONTENTS 3 -months 8:30 am - 3:30 pm Mon - Fri [Admissions strictly through written test based on Basic C and Aptitude] Subhash Programming Classes Revision: January, 2016 All rights reserved Call:

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

BSc (Hons) Business Information Systems, BSc (Hons) Computer Science with Network Security & BSc. (Hons.) Software Engineering Cohort: BIS/05/FT BCNS/05/FT BSE/05/FT Examinations for 2005-2006 / Semester

### 2013 Five years Integrated M.Sc.(IT) Semester 1 060010101 - Fundamentals of Programming

03 Five years Integrated M.Sc.(IT) Semester 00000 - Fundamentals Programming File should contain. Problem Statement. Algorithm 3. Flowchart. Program in C language(code) 5. Output and sample calculation

### LECTURE NOTES ON DATA STRUCTURES USING C

LECTURE NOTES ON DATA STRUCTURES USING C Revision 4.0 1 December, 2014 L. V. NARASIMHA PRASAD Professor Department of Computer Science and Engineering E. KRISHNA RAO PATRO Associate Professor Department

### 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

Quiz 4 Solutions Q1: What value does function mystery return when called with a value of 4? int mystery ( int number ) { if ( number

### Binary Heap Algorithms

CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn G. Chappell

### Mini Projects List

Mini Projects List 1. Develop a mini project in C language using functions to perform the following operations a. Defining a user define function to copy one string into anther string b. Define a user

### Sample Questions Csci 1112 A. Bellaachia

Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k

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

Data Structures Using C++ 2E Chapter 5 Linked Lists Doubly Linked Lists Traversed in either direction Typical operations Initialize the list Destroy the list Determine if list empty Search list for a given

### Data Structure. Lecture 3

Data Structure Lecture 3 Data Structure Formally define Data structure as: DS describes not only set of objects but the ways they are related, the set of operations which may be applied to the elements

### C programming: exercise sheet L2-STUE (2011-2012)

C programming: exercise sheet L2-STUE (2011-2012) Algorithms and Flowcharts Exercise 1: comparison Write the flowchart and associated algorithm that compare two numbers a and b. Exercise 2: 2 nd order

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

To My Parents -Laxmi and Modaiah To My Family Members To My Friends To IIT Bombay To All Hard Workers Copyright 2010 by CareerMonk.com All rights reserved. Designed by Narasimha Karumanchi Printed in

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

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated

### Lecture 12 Doubly Linked Lists (with Recursion)

Lecture 12 Doubly Linked Lists (with Recursion) In this lecture Introduction to Doubly linked lists What is recursion? Designing a node of a DLL Recursion and Linked Lists o Finding a node in a LL (recursively)

### AP Computer Science AB Syllabus 1

AP Computer Science AB Syllabus 1 Course Resources Java Software Solutions for AP Computer Science, J. Lewis, W. Loftus, and C. Cocking, First Edition, 2004, Prentice Hall. Video: Sorting Out Sorting,

### CS0213 DATA STRUCTURES AND ALGORITHM LAB USING C & C++ LABORATORY MANUAL II - CSE III - SEMESTER ACADEMIC YEAR:

CS0213 DATA STRUCTURES AND ALGORITHM LAB USING C & C++ LABORATORY MANUAL II - CSE III - SEMESTER ACADEMIC YEAR: 2012-2013 SCHOOL OF COMPUTER SCIENCE & ENGINEERING SRM UNIVERSITY, SRM NAGAR, KATTANKULATHUR-603203.

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

=============================================================================================================================== DATA STRUCTURE PSEUDO-CODE EXAMPLES (c) Mubashir N. Mir - www.mubashirnabi.com

### Course learning outcomes

UCS130C/UCS230C COMPUTER CONCEPTS & C PROGRAMMING 4 CREDITS Hrs/Week :04 Total Hrs:48 CIE Marks:50 SEE Marks:50 Course learning outcomes At the end of the course student will be able to: 1. Identify the

### Data Structures and Algorithms in C++

Data Structures and Algorithms in C++ Second Edition Michael T. Goodrich Department of Computer Science University of California, Irvine Roberto Tamassia Department of Computer Science Brown University

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

EECS 281: Data Structures and Algorithms The Foundation: Data Structures and Abstract Data Types Computer science is the science of abstraction. Abstract Data Type Abstraction of a data structure on that

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

Bangalore University B.Sc Computer Science Syllabus ( Semester System) First Semester CSIT1: Computer Fundamentals and C Programming CSIP1: C Programming Lab Second Semester CSIIT1: Data Structures and

### Data Structures and Algorithms V22.0102. Otávio Braga

Data Structures and Algorithms V22.0102 Otávio Braga We use a stack When an operand is read, output it When an operator is read Pop until the top of the stack has an element of lower precedence Then push

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

The Tower of Hanoi Recursion Solution recursion recursion recursion Recursive Thinking: ignore everything but the bottom disk. 1 2 Recursive Function Time Complexity Hanoi (n, src, dest, temp): If (n >

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

Lab Manual Data Structures (Pr): COT-213 Data Structures (P): IT-215 !" #\$%&'() * +, -. 951/6201617535973417*37311 235678976: ;7A

### CHAPTER 4 ESSENTIAL DATA STRUCTRURES

CHAPTER 4 ESSENTIAL DATA STRUCTURES 72 CHAPTER 4 ESSENTIAL DATA STRUCTRURES In every algorithm, there is a need to store data. Ranging from storing a single value in a single variable, to more complex

### Data Structures and Data Manipulation

Data Structures and Data Manipulation What the Specification Says: Explain how static data structures may be used to implement dynamic data structures; Describe algorithms for the insertion, retrieval

### Glossary of Object Oriented Terms

Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction

### Joy: Forth s Functional Cousin

Joy: Forth s Functional Cousin Manfred von Thun 9th October 2001 1 Synopsis of the language Joy The language Joy is a purely functional programming language. Whereas all other functional programming languages

### AFF 826. Sub. Code 4BSO1C1. Sp2. B.Sc. DEGREE EXAMINATION, NOVEMBER First Semester. Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING

Sp2 AFF 826 Sub. Code 4BSO1C1 B.Sc. DEGREE EXAMINATION, NOVEMBER 2015 First Semester Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING (CBCS 2014 onwards) Time : 3 Hours Maximum : 75 Marks Part A (10

### Data Structures and the Java Collections Framework

Data Structures and the Java Collections Framework Third Edition William J. Collins Lafayette College JOHN WILEY & SONS, INC. CONTENTS Preface xvii CHAPTER 0 Introduction to Java 1 Chapter Objectives 1

### Algorithm Efficiency and Sorting

Algorithm Efficiency and Sorting How to Compare Different Problems and Solutions Two different problems Which is harder/more complex? Two different solutions to the same problem Which is better? Questions:

### Definition. (American Heritage Dictionary, 2000)

Recursion 1 recursion Definition (American Heritage Dictionary, 2000) NOUN: Mathematics 1. An expression, such as a polynomial, each term of which is determined by application of a formula to preceding

### 7.1 Our Current Model

Chapter 7 The Stack In this chapter we examine what is arguably the most important abstract data type in computer science, the stack. We will see that the stack ADT and its implementation are very simple.

### Lecture 6b Linked List Variations. Similar but not the same

Lecture 6b Linked List Variations Similar but not the same Linked List Variations: Overview The linked list implementation used in List ADT is known as Singly (Single) Linked List Each node has one pointer

### CS2 Final Study Guide

CS2 Final Study Guide - Know how to write an assignment operator, copy constructor and destructor for a simple class that has dynamically allocated memory. Trees 1. Define the following terms o binary

### GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM. Course Title: Advanced Computer Programming (Code: 3320702)

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM Course Title: Advanced Computer Programming (Code: 3320702) Diploma Programmes in which this course is offered Computer Engineering,

### 6.087 Lecture 5 January 15, 2010

6.087 Lecture 5 January 15, 2010 Review Pointers and Memory Addresses Physical and Virtual Memory Addressing and Indirection Functions with Multiple Outputs Arrays and Pointer Arithmetic Strings String

### Data Structures, Sample Test Questions for the Material after Test 2, with Answers

Data Structures, Sample Test Questions for the Material after Test 2, with Answers 1. Recall the public interfaces of classes List and ListIterator: typedef int ListItemType; class ListIterator{ public:

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

NEW Detailed Syllabus of B.Sc.(Computer Science) and B.Sc.(IT) Effective From July 2011 SEMESTER SYSTEM Scheme & Syllabus for B.Sc. (CS) Pass and Hons. Course Effective from July 2011 and onwards CLASS

### Algorithms. Theresa Migler-VonDollen CMPS 5P

Algorithms Theresa Migler-VonDollen CMPS 5P 1 / 32 Algorithms Write a Python function that accepts a list of numbers and a number, x. If x is in the list, the function returns the position in the list

### Dictionaries and Hash Tables

Dictionaries and Hash Tables 0 1 2 3 025-612-0001 981-101-0002 4 451-229-0004 Dictionaries and Hash Tables 1 Dictionary ADT ( 8.1.1) The dictionary ADT models a searchable collection of keyelement items

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD I Year B.Tech. L T/P/D C 3 -/-/- 6 Objectives: COMPUTER PROGRAMMING To understand the various steps in Program development. To understand the basic concepts

### Govt. Holkar Science College, Indore Department of Computer Science B.Sc. Computer Science

Govt. Holkar Science College, Indore Department of Computer Science B.Sc. Computer Science Session- 2014-2017 (Effective from July 2014 session for 2014-16 batch onwards) Marks Distributions B.Sc. I Semester

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

Linked Lists, Stacks, Queues, Deques It s time for a chainge! Learning Goals After this unit, you should be able to... Differentiate an abstraction from an implementation. Define and give examples of problems

### Recursion. Definition: o A procedure or function that calls itself, directly or indirectly, is said to be recursive.

Recursion Definition: o A procedure or function that calls itself, directly or indirectly, is said to be recursive. Why recursion? o For many problems, the recursion solution is more natural than the alternative

### CompSci-61B, Data Structures Final Exam

Your Name: CompSci-61B, Data Structures Final Exam Your 8-digit Student ID: Your CS61B Class Account Login: This is a final test for mastery of the material covered in our labs, lectures, and readings.

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

Data Structure and Algorithm I Midterm Examination 120 points Time: 9:10am-12:10pm (180 minutes), Friday, November 12, 2010 Problem 1. In each of the following question, please specify if the statement

### AS-2261 M.Sc.(First Semester) Examination-2013 Paper -fourth Subject-Data structure with algorithm

AS-2261 M.Sc.(First Semester) Examination-2013 Paper -fourth Subject-Data structure with algorithm Time: Three Hours] [Maximum Marks: 60 Note Attempts all the questions. All carry equal marks Section A

### Data Structures. Topic #4

Topic #4 Today s Agenda Stack and Queue ADTs What are they Like Ordered Lists, are position oriented Use of Data Structures for Stacks and Queues arrays (statically & dynamically allocated) linear linked

### Chapter 13. Pointers and Linked Lists

Chapter 13 Pointers and Linked Lists Overview 13.1 Nodes and Linked Lists 13.2 Stacks and Queues Slide 13-2 13.1 Nodes and Linked Lists Nodes and Linked Lists n A linked list is a list that can grow and

### Stacks. Linear data structures

Stacks Linear data structures Collection of components that can be arranged as a straight line Data structure grows or shrinks as we add or remove objects ADTs provide an abstract layer for various operations

### The C Programming Language course syllabus associate level

TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

### 6) What are the various types of enterprise application software?

(DMCA 101) ASSIGNMENT - 1, MAY - 2016. PAPER- I : INFORMATION TECHNOLOGY 1) Define information. Explain about their properties and types of information. 2) Explain about memory hierarchy. 3) Define OS?