Assignment 3 Class XII (Computer Science 083) Topic Array

Similar documents
Sample Question Paper

SPLIT-UP SYLLABUS ----CHENNAI REGION COMPUTER SCIENCE (Code: 083) Class-XII Academic Session

List of Practical for Class XII Computer Science

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305

Bharati Vidyapeeth s College Of Engineering for Women Pune-43 Department E & TC. SE- Unit Test I Subject-DS

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May

Code No: R Set No. 1

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE

Linked List. April 2, 2007 Programming and Data Structure 1

DEEPIKA KAMBOJ UNIT 2. What is Stack?

R13. II B. Tech I Semester Supplementary Examinations, May/June DATA STRUCTURES (Com. to ECE, CSE, EIE, IT, ECC)

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

Fundamental of I.T. (c) Application of computer *************

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

End-Term Examination Second Semester [MCA] MAY-JUNE 2006

17CS33:Data Structures Using C QUESTION BANK

1 P age DS & OOPS / UNIT II

Objective Questions for Online Practical Exams under CBCS Scheme Subject: Data Structure-I (CS-113)

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

CBSE GUESS PAPER. Roll No. Computer Sc. XII(083)/

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- MARCH, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours

KENDRIYA VIDYALYA CLRI CHENNAI AUTUMN BREAK HOLIDAY HW MARKS QUESTIONS : DATA STRUCTURE

M.C.A. DEGREE EXAMINATION, DEC First Year. Time : 03 Hours Maximum Marks : 75

PA3 Design Specification

SCHOOL OF COMPUTER AND COMMUNICATION ENGINEERING. EKT224: ALGORITHM AND DATA STRUCTURES (Stack, Queue, Linked list)

Where does the insert method place the new entry in the array? Assume array indexing starts from 0(zero).

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

Data Abstractions. National Chiao Tung University Chun-Jen Tsai 05/23/2012

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

VALLIAMMAI ENGINEERING COLLEGE

Types of Data Structures

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May

KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SPLITUP SYLLABUS FOR COMPUTER SCIENCE CLASS XII

Index for C++ Programming

Stacks & Queues. Kuan-Yu Chen ( 陳冠宇 ) TR-212, NTUST

Prepared By: Ms. Nidhi Solanki (Assist. Prof.) Page 1

INSTITUTE OF AERONAUTICAL ENGINEERING

First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...

Reg. No. : Question Paper Code : 27157

1 P a g e A r y a n C o l l e g e \ B S c _ I T \ C \

Study Material for Class XII. Data File Handling

PESIT Bangalore South Campus Department of MCA Course Information for

Queues. Kuan-Yu Chen ( 陳冠宇 ) TR-212, NTUST

1) What is information system? Describe the basic concepts of information systems.

Data Structure using C++ Lecture 04. Data Structures and algorithm analysis in C++ Chapter , 3.2, 3.2.1

MIDTERM EXAMINATION Spring 2010 CS301- Data Structures

Table of Contents. Chapter 1: Introduction to Data Structures... 1

Subject: Computer Science

Content: Learning Objectives

Draw a diagram of an empty circular queue and describe it to the reader.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING B.E SECOND SEMESTER CS 6202 PROGRAMMING AND DATA STRUCTURES I TWO MARKS UNIT I- 2 MARKS

Revision Statement while return growth rate asymptotic notation complexity Compare algorithms Linear search Binary search Preconditions: sorted,

Advanced C Programming and Introduction to Data Structures

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Data Structures. Chapter 06. 3/10/2016 Md. Golam Moazzam, Dept. of CSE, JU

VALLIAMMAI ENGINEERING COLLEGE

KUWAIT SAHODAYA EXAMINATION FIRST TERM SUBJECT : COMPUTER SCIENCE (083) : CLASS - XII SET - 3 Time : 3 Hours

EC8393FUNDAMENTALS OF DATA STRUCTURES IN C Unit 3

2 SEMESTER EXAM CLASS : 12 DECEMBER 2016 TIME : 3 Hrs MAX MARKS : 70

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 154) Pass Marks: 24

DC104 DATA STRUCTURE JUNE Q.2 a. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

KENDRIYA VIDYALAYA SANGATHAN. Regional Office Delhi Split-up Syllabus Session Subject:-Computer Science Subject Code:-083

CLASS XII COMPUTER SCIENCE(083) TimeAllowed : 3 HrsMax Marks : 70

Name :. Roll No. :... Invigilator s Signature :.. CS/B.TECH (NEW)/SEM-2/CS-201/ BASIC COMPUTATION & PRINCIPLES OF COMPUTER PROGRAMMING

12 Abstract Data Types

PRINCE PUBLIC SCHOOL PRE-BOARD EXAMINATION ( ) SAMPLE PAPER-1 COMPUTER SCIENCE XII TIME ALLOWED: 3 HOURS

void main() { int global=7 ; func( ::global,global) ; cout<<global<<, <<::global<< \n ; func(global,::global) ; cout<<global<<, <<::global<< \n ; }

SAMPLE PAPER. Class: XII SUBJECT COMPUTER SCIENCE. Time: 3 Hours MM: 70

4. BOOLEAN ALGEBRA 8 5. NETWORKING AND OPEN SOURCE SOFTWARE 10

Programming and Data Structure Solved. MCQs- Part 2

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

MID TERM MEGA FILE SOLVED BY VU HELPER Which one of the following statement is NOT correct.

E.G.S. PILLAY ENGINEERING COLLEGE (An Autonomous Institution, Affiliated to Anna University, Chennai) Nagore Post, Nagapattinam , Tamilnadu.

IMPORTANT QUESTIONS WITH ANSWERS FOR II PU FINAL EXAMINATION

Department of Computer Science and Technology

STACKS AND QUEUES. Problem Solving with Computers-II

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

GUJARAT TECHNOLOGICAL UNIVERSITY COMPUTER ENGINEERING (07) / INFORMATION TECHNOLOGY (16) / INFORMATION & COMMUNICATION TECHNOLOGY (32) DATA STRUCTURES

DATA STRUCTURE UNIT I

A Programming Approach with C DHARMENDER SINGH KUSHWAHA

Lecture No.04. Data Structures

CS 206 Introduction to Computer Science II

a) State the need of data structure. Write the operations performed using data structures.

CS301 - Data Structures Glossary By

DATA STRUCTURES AND ALGORITHMS

CS8391-DATA STRUCTURES QUESTION BANK UNIT I

Computer Programming C++ (wg) CCOs

Introduction to Data Structure

Programming in C++ 5. Integral data types

Government of Karnataka SYLLABUS FOR SECOND PUC - COMPUTER SCIENCE (41) SUB-UNITS

MAHARASHTRASTATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Solution: The examples of stack application are reverse a string, post fix evaluation, infix to postfix conversion.

Autumn Break 2017 Exam Oriented Assignment Class-XII B, Computer Science

Name :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

COMPUTER SCIENCE Paper 1

DATA STRUCTURES USING C

SECOND SEMESTER BCA : Syllabus Copy

KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SECOND PREBOARD EXAMINATION FOR CLASS XII SUBJECT: COMPUTER SCIENCE

SAURASHTRA UNIVERSITY

ADVANCED DATA STRUCTURES USING C++ ( MT-CSE-110 )

Transcription:

Assignment 3 Class XII (Computer Science 083) Topic Array 1. What is meant by base address of an array? 2. What are the preconditions for Binary Search to be performed on a single dimension array? 3. Calculate the address X[4,3] in a two dimensional array X[1.5, 1..4] stored in row major order in the main memory. Assume the base address to be 1000 and that each element requires 4 words of storage. 4. Given a two dimensional array A[10][20], base address of A being 100 and width of each element is 4 bytes, find the location of A[8][15], when the array is stored as a) Column Major b) Row Major. 5. Each element of an array A[-20..20, 10..35] requires 1 byte of storage. If the array is stored in column major order beginning location 500, determine the location of A[0,30]. 6. Each element of an array A[-15..20, 20..45] requires 1 byte of storage. If the array is stored in row major order beginning location 1000, determine the location of A[0,40]. 7. If 2 dimensional array C[5..10, -5..9] is stored using row major representation, then calculate the address if C[8,-2], if the base address is 10 and each array element requires 2 bytes of memory. 8. The following numbers: (25, 64, 48, 15, 34, 91, 88) are required to be sorted using a)selection Sort b) Insertion Sorts c) Bubble Sort, show how the list would appear at the end of each pass. 9. Write a program to display those elements of a two dimensional array T[4][4] which are divisible by 100. 10. Write a user defined function in c++ to find and display the sum of both the diagonals elements of a two dimensional array MATRIX[6][6] containing integers. 11. Write a menu driven program in C++ which will take 10 number and then sort the numbers using any sorting method of users choice like a) Insertion b) Selection c) Bubble. 12. Suppose A,B and C are arrays of size 8,9 and 17 respectively. Array A is stored in ascending order and array B is in descending order. WAP to produce a third array C, containing all the data of array s A and B in ascending order. 13. Given two arrays A and B, copy last five elements of B after first five elements of A to create another array C. Assume length of A and B is greater than five. 14. Write a C++ function (using most efficient searching method) to search for an item X in a sorted array of integers. 15. Given an array A[50] with base address 300 and element size 4 bytes. Find the address of A[10], A[25] and A[40] 16. Given an array named A with the following elements: 3, -5, 1, 3, 7, 0, -15, 3, -7, -8 write a c++ function to shift the negative to left and positive numbers to right so that the resultant array will look like: -5, -15, -7, -8, 3, 1, 3, 7, 0, 3 17. Write a program in C++ to interchange the values of the row and column. 18. Write a program in C++ to find the inverse of the matrix.

Assignment 6 Class XII (Computer Science 083) Topic Stack and Queues 1. Define a) Stack b) Queues 2. What is the difference between LIFO list and FIFO list? 3. What is the application of a) Stack b) Queue 4. What is the order of evaluations of arithmetic operator s? 5. What is the situation called when Deletion is attempted in an empty list? 6. What is the situation called when Insertion is attempted in a full list? 7. Given a stack as an array of 7 elements STACK: K, P, S, T, U, Y, B a) When will overflow and underflow occur? b) Can K be deleted before S, Why? 8. Write a menu driven program to Push, Pop and see the contents of stack (implementing array). 9. Write a menu driven program to Insert, delete and see the contents of queue (implementing array). 10. What is the difference between a general queue and the circular queue in the case of arrays? What is the advantage of circular queue and disadvantage of general queue? 11. Define a LINKED LIST. 12. What is the difference between STATIC and DYNAMIC Memory. 13. Write a menu driven program to Insert, delete and see the contents of stack (implementing linked list). 14. Write a menu driven program to Insert, delete and see the contents of queue (implementing linked list). 15. Distinguish between infix, prefix and postfix algebraic expressions giving examples of each. 16. Convert the following infix to postfix expression a) (A B) * (C / D) + E b) X + Y * Z ^ P - (X / Y + Z) c) A ^ B P / (Q * (A C + P * D) / B) d) A + B + C * D F G 17. Evaluate the following postfix expression using a stack and show the contents of stack after execution of each operation. a) t, f, t, f, NOT, OR, t, OR, OR, AND c) 12, 45, 82, *, d) 7, 87, 3, 2, ^, *, +, 15, 6, /, 8, +, d) 160, 6, 7, *, 4, 8, +, *, e) A + B * C + D * N ^ E / G H f) 60, 5, 9, /, 3, 8, +, *, 18. Define a) Singly Linked List b) Doubly Linked List c) Circular Linked List d) Dequeues 19. For a circular queue with 5 memory locations show diagrammatically the status of the front and rear after each of the following operations: i) 5, 4 and 3 inserted ii) 5 deleted iii) 9, 11 inserted iv) 4, 3 deleted v) 8, 6 inserted vi) 9 deleted vii) 25, 10 inserted viii) 11,4 deleted ix) 27 inserted x) 25, 10 deleted 20. Consider a queue of size 7 insert name Harsh, Nishu and then delete first name insert Chetan, Ankur, and delete first two names. Show the status of front and rear after each step.

Assignment 7 Class XII (Computer Science 083) Topic DBMS and SQL 1. Differentiate between SQL commands a) DROP Table and DROP View. b) Create table and Create View. 2. What is a relation? What is the difference between a tuple and an attribute? 3. Differentiate between DML (Data manipulation language) and DDL (Data definition language). 4. What is data redundancy? What are the problems associated with it? 5. What are the advantages of Relational Data Model? 6. Differentiate between Primary Key and Candidate Key. 7. What will be the precondition for applying Drop Table command? 8. What are the three different levels from the data can be abstracted? Explain all the 3. 9. Differentiate between Projection and Union operation. 10. Write the command to make the table a having following column heading and data types: - Name char(10) dob date roll number(2) sex char(1) best_sub char(9) 11. After entering at-least 10 records in the above table write the commands to: - a) Show the list of tables created earlier. b) Show the heading and their data types from the table a. c) Add a new column hobby having data type char and width 9. d) Add cooking in the hobby column for sex female. e) Add reading in the hobby column for sex male. f) Make a backup of table a by name b. g) Make a backup of table a by name c without best_sub column. h) Insert a new row in table as Srijan, 19/11/1987, 12, m, comp, reading. i) Remove the table c. j) Remove only those rows whose name starts with the character H. k) Delete all the rows of table b. l) Show the contents of name, roll and hobby column from table a. m) Show the contents of name and best subject of female students. n) Show the contents of name, hobby, date of birth and sex of female students or whose date of birth is less than 01.01.1986. o) Show the entire information of all the female students whose name starts with the character N. p) Show the entire information of all the male students whose name not starts with the character N. q) Display the list of best subject. r) Display the name, roll and hobby of those students whose roll is more than five and less than 10. (Without and with and command) s) Show the entire information of Nishu, Chetan and Harsh from the table.

t) Make two table Khushi and Snehal from table a. Table Khushi contains Roll, Name and date of birth while table Snehal contains Roll, Sex, Best Subject and Hobby columns. u) Delete the table a. v) Display Roll, Name, Sex, Date of birth, Best Subject and Hobby by combining the table Khushi and Snehal. w) Show Name and Sex from the table (Khushi and Snehal) by arranging the name in descending order. ------------------------------------------------------------------------------------------------------ Guess the output of the SQL commands based from the table Anu given below: - Roll Name Sex Phy Chem Comp. Total 10 Nishu F 60 60 65 12 Anshu F 55 40 60 14 Neha F 60 60 40 18 Chetan M 62 61 60 17 Harsh M 67 60 63 13 Pupul M 60 60 62 11 Ankur M 65 40 60 15 Preety F 62 68 63 16 Snehal F 55 60 70 19 Anuradha F 60 61 60 20 Gourav M 60 53 49 Before guessing the output please fill the total column using the suitable command x) Select avg(comp) from anu; y) Select max(phy+chem+math) from anu; z) Select name, max(total) from anu group by name; aa) Select name, max(total) from anu group by sex; bb) Select name, max(total) from anu group by total; cc) Select name, sex, max(total) from anu group by sex; dd) Select name, sex, max(total) from anu group by name, sex; ee) Select name, sex, max(total) from anu group by sex, name; ff) Select max(comp) from anu group by chem having chem<60; gg) Select max(comp) from anu group by chem having chem<=60; hh) Select max(comp) from anu group by chem having chem<=70; ii) Select * from anu order by name; jj) Select * from anu order by name, phy; kk) Select * from anu order by phy; ll) Select * from anu order by phy, name desc; mm) Select name, sex from anu group by sex, name; nn) Select phy from anu group by phy; oo) pp) Select distinct (phy) from anu; Select name, total, (total/210)*100 as Percent from anu order by Percent desc.

Assignment -8 XII File Handling Comp. 1. What are the different methods of opening a file? Explain in brief. 2. Differentiate between the functions write() and put() of the ostream class. 3. How can the end of file be detected? Explain in brief. 4. Differentiate between the function get(), put() and getline(). 5. How can you send an output to a printer? 6. WAP that counts the number of records in a given file. 7. WAP that appends the contents of one file to another. 8. WAP to add new objects at the bottom of a binary file STUDENT.DAT, assuming the binary file is containing the objects of the following class: - class STUD int Rno; char Name[20]; void enter() cin>>rno; gets(name); void display() cout<<rno<<name<<endl; ; 9. WAP to search for a book number from a binary file BOOK.DAT, assuming the binary file is containing the objects of the following class: - class BOOK int Bno; char title[20]; int Rbno() return Bno; void enter() cin>>bno; gets(title); void display() cout<<bno<<title<<endl; ; 10. WAP that reads 15 bytes from 35 th byte onwards from the file NIBBLE.

11. Assuming class OUTSTAND given below, write program to write objects having outamt more than Rs. 10,000 into CRITICAL file. class OUTSTAND int memno; float outamt; void getit() cin>>memno>>outamt; void putit() cout<<memno<<outamt; float getamt() return outamt; ; 12. Differentiate between ifstream class and outstream class. 13. Assuming the class STOCK, write program to perform following: - a) Write the objects of STOCK to a binary file. b) Read the objects of STOCK from binary file and display them on screen. class STOCK int ITNO; char ITEM[10]; void GETIT() cin>>itno; gets(item); void SHOWIT() cout<<itno<<item<<endl; ; 14. Explain the difference between put and write function. 15. Explain the difference between get and read function. 16. Why binary file is better than text file? 17. Explain seekg(), seekp(), tellg() and tellp() using suitable example for each. 18. WAP to count the number of lines present in a text file STORY.TXT. 19. WAP that reads a character from the keyboard one by one. All lower case characters get stored in a file LOWER, All upper case characters get stored in a file UPPER and all other characters get stored in the file OTHER. S.K.Jha (Faculty of Computer Science DAV) Sweet and Sour with Files