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

Similar documents
Downloaded from

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

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305

Subject: Computer Science


(a) Differentiate between a call by value and call by reference method.

ARRAY FUNCTIONS (1D ARRAY)

Types of Data Structures

// array initialization. void main() { cout<<b[4]<<endl; cout<<b[5]<<endl; } Output is 9

Arrays and Strings. Arash Rafiey. September 12, 2017

VARIABLE, OPERATOR AND EXPRESSION [SET 1]

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

PROGRAMMING IN C AND C++:

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

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

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

Largest Online Community of VU Students

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?

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010

COMPUTER SCIENCE Paper 1

ESC101N: Fundamentals of Computing End-sem st semester

Suggestive List of C++ Programs

Data Structure. #include<iostream.h> int linear_search(int a[], int size, int item)

AHLCON PUBLIC SCHOOL, MAYUR VIHAR I, DELHI ASSIGNMENT CLASS XI Session Chapter 1: Computer Overview

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

Assignment 3 Class XII (Computer Science 083) Topic Array

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

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

UNIT- 3 Introduction to C++

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

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

Topics: Material through example 19 (types, operators, expressions, functions, selection, loops, arrays)

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

Code No: R Set No. 1

S.E. (Computer) (First Semester) EXAMINATION, 2011 DATA STRUCTURES AND ALGORITHM (2008 PATTERN) Time : Three Hours Maximum Marks : 100

Programming and Data Structure Solved. MCQs- Part 2

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

COMPUTER SCIENCE. Paper 1

Sample Paper 2013 SUB: COMPUTER SCIENCE GRADE XII TIME: 3 Hrs Marks: 70

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

Week 0. Net Salary =Earnings- deductions; Read the employee number, Basic Print employee Number, Earnings,Deductions and Net salary.

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION CLASS:XII - (COMPUTER SCIENCE )

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

Guru Gobind Singh Public School Sector : V/B, Bokaro Steel City

COMPUTER SCIENCE PAPER 1

Introduction to Arrays

Numeral system Numerals

Data Structure (CS301)

CS Spring 05 - MidTerm

3/12/2018. Structures. Programming in C++ Sequential Branching Repeating. Loops (Repetition)

Total No. of Questions :09] [Total No. of Pages : 02. II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC First Semester CSE/IT DATA STRUCTURES USING C

Write a C program using arrays and structure

Character Set. The character set of C represents alphabet, digit or any symbol used to represent information. Digits 0, 1, 2, 3, 9

WYSE Academic Challenge 2002 Computer Science Test (Sectional) SOLUTION

Lecture 2 Arrays, Searching and Sorting (Arrays, multi-dimensional Arrays)


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

INSTITUTE OF AERONAUTICAL ENGINEERING

Introduction to Computer Science Midterm 3 Fall, Points

Downloaded from

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

CSCE 206: Structured Programming in C++

CSCE 206: Structured Programming in C++

C Language Part 2 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee

MIDTERM EXAMINATION Spring 2010 CS301- Data Structures

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

CISC220 Lab 2: Due Wed, Sep 26 at Midnight (110 pts)

COMPUTER APPLICATIONS

A First Program - Greeting.cpp

CS201- Introduction to Programming Current Quizzes

Chapter 10 - Notes Applications of Arrays

! Determine if a number is odd or even. ! Determine if a number/character is in a range. - 1 to 10 (inclusive) - between a and z (inclusive)

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

Data Structures Through C. Student Workbook

MLR Institute of Technology

17CS33:Data Structures Using C QUESTION BANK

l Determine if a number is odd or even l Determine if a number/character is in a range - 1 to 10 (inclusive) - between a and z (inclusive)

PESIT Bangalore South Campus Department of MCA Course Information for

UCS-406 (Data Structure) Lab Assignment-1 (2 weeks)

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

FORM 2 (Please put your name and form # on the scantron!!!!)

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

COMPUTER SCIENCE 1998 (Delhi Board)

Scheme G. Sample Test Paper-I. Course Name : Computer Engineering Group Course Code : CO/CD/CM/CW/IF Semester : Second Subject Tile : Programming in C

calling a function - function-name(argument list); y = square ( z ); include parentheses even if parameter list is empty!

All answers will be posted on web site, and most will be reviewed in class.

This is CS50. Harvard University Fall Quiz 0 Answer Key

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

LECTURE 17. Array Searching and Sorting

DEEPIKA KAMBOJ UNIT 2. What is Stack?

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS THE STACK

KENDRIYA VIDYALAYA IIT CAMPUS CHENNAI 36 COMPUTER SCIENCE. Half Yearly

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

Lecture No.04. Data Structures

Code No. 083 Time allowed: 3 hours Maximum Marks: 70 Instructions: (i) All questions are compulsory. (ii) Programming language: C++

Searching & Sorting in Java Bubble Sort

VALLIAMMAI ENGINEERING COLLEGE

Introduction to C Language (M3-R )

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9

CS201 Some Important Definitions

Transcription:

KENDRIYA VIDYALYA CLRI CHENNAI AUTUMN BREAK HOLIDAY HW 8 MARKS QUESTIONS : DATA STRUCTURE. Write a function in C++ which accepts an integer array and its size as arguments and change all the even number with twice and odd with thrice.example: if an array of five elements initially contains the element as,,,5,7 then the function should rearrange the array as,8,,5,. W rite a function in C++ which accepts an integer array and its size as arguments/parameters and assign the elements into a two dimensional array of integer in the following format: if the array is,,,,5,6 if the array is,, the resultant D array is given below the resultant D array is given below 5 6 5. Write a function in C++ which accepts an integer array and its size as arguments/ parameters and then assigns the elements into a two dimensional array of integers in the following format: () If the array is,,,, 5, 6 The resultant D array is given below 6 5 5 If the array is,, The resultant D array is given below 5. Write a C++ function RevDup(int [], int) to remove the duplicate occurrence of the value Present in an integer array, passed to the function as a parameter. For e.g. If array initially is X[] = {,,,7,5,,,6} After removing duplicate values the array will be X {} = {, 7, 5,, 6} 6. Assume an array containing elements of structure Employee is required to be arranged in descending order of Salary. Write a C++ function to arrange the same with the help of bubble sort, array and its size is required to be passed as

parameter to the function. Definition of Structure Employee is as follows: struct Employee { int ENo; char Ename[5]; float Salary; }; 7. Write a function in C++ which accepts a character array and its size as arguments and reverse that array without using second array and library function. Example : if the array is having: Computer Science Then after reversal it should rearranged as: ecneics retupmoc 8. WAP that accept an array of integers with size. The function fins a particular number from the array by using the binary search method 9. Write a function in C++ which accepts an integer array and its size as arguments/parameters and assigns the elements in to two dimensional array of integers in the following format: If the array is,,,,5,6,then the resultant D array should be : 5 6. Suppose A,B,C are arrays of size m,n,m+n respectively. Array A is stored in ascending order and array B is in descending order. Write a function to receive arrays and their sizes to store the elements of A and B into C in descending order.. Write a user defined function to sort the array (same as above) using insertion sort in descending order. Give the array status after each iteration.. Write a user defined function to sort the array(same as above) using bubble sort in descending order. Give array status after each iteration. Using a two dimensional A[n x n], write a function to prepare one dimensional arrayarray[n] that will have all the elements of A as if they were stored in Column major order.. Write a function to search for a given number in a given array ARR[n] using linear search technique. If the number is found, move it at the top of the array. If the number is not found, insert it at the end of the array. 5. What would be the output of the following? Assume that the array starts at location 57 in the memory? # include<iostream.h> void main() { int ab[][]={ 5,6,7,8,,,,,9,,,}; cout<< \n <<*ab[]<< <<*(tab[]+); cout<< \n <<*(*(ab+)+); } 6. Write a function that reads integers into the array A. Use another integer array P of same size to store each index of the array A in the following way: The index of the first smallest element in A is stored at index of P, the index of the next smallest element in A is stored at index of P and so on. Print the next smallest element in A ordered in the sequence given by each succeeding index stored in P.

7. Write a user defined function to sort the given array using Selection sort mechanism. int A[ ] = {,,6,,6,,,8,5,55,6,66}; Print array after each iteration. 8. Write a user defined function to search for 55 and in the following array.,,6,,6,,,8,5,55,6,66 Make use of binary search method. MARKS QUESTIONS : DATA STRUCTURE. An array A[][] is stored in the memory along the column with each element occupying bytes. Find out the Base address and address of the element A[][6] if the element A[][] is stored at the address 9.. Given two dimensional array A[][], base address of A being and width of each element is bytes, find the location of A[8][5] when the array is stored as a) column wise Row wise.. An array M[- 8][-8.7] is stored in the memory along the column with each of its elements occupying 8 bytes. Find out the base address and the address of an element M[][5], if the element M[5][] is stored at address. An array P[][] is stored in the memory along the column with each element occupying bytes of storage, find out the base address and address of the location P[5][5], if the element P[][] is stored at the memory location at. 5. An array A[-..8][-..5] is stored in the memory along the column with each element occupying bytes. Find out the address of the element A[][]. 6. If an array B[][8] is stored as column wise and B[][] is stored at and B[][] at 8. Find out the base address, size of an element and address of B[5][]. 7. An array Arr[5][5] is stored in the memory along the row with each of its element occupying bytes. Find out the base address and the address of an element Arr[][5], if the location Arr[][] is stored at the address. Mark Questions : Linked List, Stack, Queue. Convert the following infix expressions to postfix expressions. A + (B * C) ^ D (E / F G). A * B / C * D ^ E * G / H. ((A*B)-((C_D)*E/F)*G. A+B/(P+Q)^C/D-E/F 5. A+B/C*D+F*G 6. A+B-A/(B*(A-B-A*D)^B) 7. (B+(C+D)*(E+F)/G)/H 8. A*(B/C)/D-E-(F+G/H) 9. (TRUE FALSE) &&! (FALSE TRUE). (A / B + C ) / D + E / (F + G * H / I). A OR NOT B AND C

. (((ax/by a/b)-dx/fx)+a)+b. (((b-(c*d-e)+f))/g)+(h*j+x). A+(((B*C)*(D+E)+F*G)^(H-J) 5. (A-B) *(C/(D-E)+F-G. Evaluate the following postfix expression E given below, show the contents of the stack during the evaluation. E= 5,9,+,/,,,,,_,*,+. E= 8,5,,-,5,5,+,-,*. E=,5,,^,,6,/,+,-. E=5,,, +, /, 7, +, * 5. E=5, 8,, -, / 6, *, + 6. E=8, 7, -, 9, 8, *, -,, /,,, *, / - 7. E= 5,,5,-,*,5,,*,- 8. IF A=,C=,D=,E=5,F=,G=6 then EFG^D+AC/- + 9. E=,+,5,*,5,5,/,+. E= 7,6,,/,+,8,-. E=AB CD + E * + WHERE A = 5, B =, C = 5, D = AND E =. E= 7,6, +, 8, *,, -,, *,,, *, -