HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

Similar documents
vinodsrivastava.com Constructor and Destructor

Guru Gobind Singh Public School Sector: V/B, Bokaro Steel City Assignment (Level 2)

HOLIDAY HOMEWORK ASSIGNMENT-5 Q1. What will be the output of the following program segment Class Num { int x; float y; public: void init( ) { x = y =

JB Academy, Faizabad Half Yearly Examination Subject: Computer Science (083) Class XII

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

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

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

SECTION A [Only for candidates, who opted for C++]

void Add() { cin >> trainnumber; gets(trainname); } void display() { cout<<trainnumber <<":"<<TrainName<<end;

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

#include<iostream.h> { for(int L=1;L<=N;L++) cout<<m*l; cout<<endl; } void main()

Computer Science XII Important Concepts for CBSE Examination Questions

I Mid Semester May 2012 : Class XII : Computer Science Max Mark 50 : Time 2 Hrs. 1. a) What is macro in C++? Give example 2

Guru Harkrishan Public School, Karol Bagh Pre Mock Class XII Sub: COMPUTER SCIENCE Allowed :3 hrs

COMS W3101 Programming Language: C++ (Fall 2015) Ramana Isukapalli

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

Object Oriented Programming. Solved MCQs - Part 2

KENDRIYA VIDYALAYA PANGODE MONTHLY TEST I JUNE 2015 CLASS XII COMPUTER SCIENCE Time allowed: 1 1/2 Hours Max. Marks: 50

Introduction to Programming Using Java (98-388)

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

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

COMS W3101 Programming Language: C++ (Fall 2015) Ramana Isukapalli

KendriyaVidyalayaSangathan Kolkata Region

KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOME WORK XII COMPUTER SCIENCE ARRAY AND STRUCTURES

Object Oriented Pragramming (22316)

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

COMS W3101 Programming Language: C++ (Fall 2016) Ramana Isukapalli

BHARATIYA VIDYA BHAVAN S V.M.PUBLIC SCHOOL, VADODARA. Class : XII SAMPLE PAPER Max Marks : 70

SAMPLE PAPER 2015 SUB - COMPUTER SCIENCE - (Theory) CLASS XII Time allowed: 3 hours Maximum marks: 70

Downloaded from

include<iostream.h> #define PI=3.14 void main( ) { float r;a; cout<< enter any radius ; cin>>r; a=pi*pow(r,2); cout<< Area= <<a }

OOP THROUGH C++(R16) int *x; float *f; char *c;

Babaria Institute of Technology Computer Science and Engineering Department Practical List of Object Oriented Programming with C

DELHI PUBLIC SCHOOL BOKARO STEEL CITY

CS201- Introduction to Programming Current Quizzes

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

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

CLASS XII GUESS PAPER COMPUTER SCENCE (083)

COMPUTER SCIENCE (083)

INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION

BLUE PRINT SUBJECT: - COMPUTER SCIENCE(083) CLASS-XI. Unit Wise Marks

JAVA MOCK TEST JAVA MOCK TEST II

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

SRI SARASWATHI MATRIC HR SEC SCHOOL PANAPAKKAM +2 IMPORTANT 2 MARK AND 5 MARK QUESTIONS COMPUTER SCIENCE VOLUME I 2 MARKS

Padasalai.Net s Model Question Paper

KENDRIYA VIDYALAYA NO.1 SAGAR XII-COMPUTER SCIENCE ( ) HOMEWORK SUMMER VACATION

(i) case (ii) _delete (iii) WHILE (iv) 21stName

Sri Vidya College of Engineering & Technology

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

COMPUTER SCIENCE. Time allowed : 3 hours Maximum Marks : 70

INTERNATIONAL INDIAN SCHOOL, RIYADH. Ch 1 C++ Revision tour

KENDRIYA VIDYALAYA NO.02 AFS HINDAN G.BAD Holiday Homework Class XII Computer Science

KE DRIYA VIDYALAYA SA GATHA,CHE AI REGIO. COMMO PRE-BOARD EXAMI ATIO COMPUTER SCIE CE CLASS- XII Time allowed : 3 hours Maximum Marks : 70

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

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

Series SHC COMPUTER SCIENCE. Code No. 91. Roll No.

ASSIGNMENT CLASS-11 COMPUTER SCIENCE [C++]

Arrays. int Data [8] [0] [1] [2] [3] [4] [5] [6] [7]

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

An Object Oriented Programming with C

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

Sample Paper Class XI Subject Computer Sience UNIT TEST II

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

THE INDIAN COMMUNITY SCHOOL, KUWAIT

Mock Test Paper-2. CBSE XII : Computer Science. Duration : 3hrs Max Marks : 70

KENDRIYA VIDYALAYA SANGATHAN, COMPUTER SCIENCE (THEORY) I PRE-BOARD TIME 3 HRS CLASS XII M. Marks 70

Model Sample Paper 2015

COMPUTER SCIENCE SAM PLE PAPER 2-HALF YEARLY EXAMINATION

COMPUTER SCIENCE. Time allowed : 3 hours Maximum Marks : 70

Q2) Define a class candidate in C++ with following Description: Private Members 4 Number) of type long

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION

STRUCTURING OF PROGRAM

COMPUTER SCIENCE 1998 (Delhi Board)

SRE VIDYASAAGAR HIGHER SECONDARY SCHOOL. TWO MARKS

COMPUTER SCIENCE (083)

XII- COMPUTER SCIENCE VOL-II MODEL TEST I

VIRTUAL FUNCTIONS Chapter 10

Short Notes of CS201

Sample Paper COMPUTER SCIENCE (Theory) Class-XII Time Allowed: 3hours Maximum Marks: 70

CBSE 12th Computer Science Question Papers

Code No. 91. (i) All questions are compuls9ry. 1. (a) What is the difference between Type Casting and Automatic Type

ITL Public School First Term( )

C++ (Non for C Programmer) (BT307) 40 Hours

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

CS201 - Introduction to Programming Glossary By

THE NAME OF THE CONSTRUCTOR AND DESTRUCTOR(HAVING (~) BEFORE ITS NAME) FUNCTION MUST BE SAME AS THE NAME OF THE CLASS IN WHICH THEY ARE DECLARED.

COMPUTER SCIENCE

SRE VIDYASAAGAR HIGHER SECONDARY SCHOOL

C++_ MARKS 40 MIN

Answer Key with Marking Scheme

STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING

Computer Science 2006 (Outside Delhi)

AN OVERVIEW OF C++ 1

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

Mock Test Paper-3. Computer Science. Duration : 3hrs Max Marks : 70

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

B.Sc. (Hons.) Computer Science I B.Sc. (Hons.) Electronics. (i) Runtime polymorphism and compile time polymorphism

COIMBATORE EDUCATIONAL DISTRICT


C++ 8. Constructors and Destructors

Transcription:

HOLIDAYS HOMEWORK 2017-18 CLASS : XII Subject : Computer Science Note : Attempt the following questions in a separate register and make yourself prepared to conquer the world. Chapter- 1 : C++ Revision Tour a. Out of the following, find those identifiers, which cannot be used for naming Variables, Constants or Functions in a C++ program : (Outside Delhi 2016) Total*Tax, double, Case, My Name, NeW, switch, Column31, Amount b. Observe the following programs very carefully and write the names of those header file(s), which are essentially needed to compile and execute the following program successfully : (Delhi 2015) typedef char TEXT[80]; void main( ) TEXT Str[ ] = Peace is supreme ; int Index = 0; while (Str[Index])!= \0 ) if ( isupper(str[index])) else puts(str); Str[Index++] = # ; Str[Index++ = * ;

c. Rewrite the following C++ code after removing all the syntax error(s), if present in the code. Make sure that you underline each correction done by you in the code. (Delhi 2014) Important Note. Assume that all the required header files are already included, which are essential to run this code. The corrections made by you do not change the logic of the program. typedef char[50] STRING; void main( ) City STRING ; gets(city); cout<<city[0]<< \t <<City[2]; cout<<city<<endline; d. Rewrite the following program after removing the syntactical errors. Underline each correction. (Outside Delhi 2017) Void main( ) cout<< Enter an alphabet : ; cin>>ch; Switch(Ch) case A cout<< Apple ; Break; case B cout<< Bat ; Break; Chapter- 2 : Object Oriented Programming a. Write any four important characteristics of Object Oriented Programming? Give example of any one of the characteristics using C++. (Outside Delhi 2016) b. Differentiate between data encapsulation and data abstraction with reference to OOP. (Outside Delhi 2010) Chapter - 3 : Function Overloading a. What do you mean by Polymorphism? Give a suitable example of the same. (Delhi 2012)

b. What is function overloading? Write an example using C++ to illustrate the concept of function overloading. (Outside Delhi 2014) c. Write the output of the following C++ code. Also, write the name of the feature of OOP used in the following program jointly illustrated by the functions [I] to [IV] : ( Outside Delhi 2011) #include<iostream.h> void Line( ) for (int L=1 ; L<=80 ; L++) cout << - ; cout<<endl; void Line(int N) for (int L=1 ; L<=N ; L++) cout<< * ; cout<<endl; void Line (char C, int N) for ( int L=1 ; L<=N ; L++) cout<<c; cout<<endl; void Line(int M, int N) for (int L=1 ; L<=N ; L++) cout<<m*l ; void main ( ) cout<<endl; int A=9, B=4, C=3; char K = # ;

Line(K,B); Line(A,C); Chapter - 4 : Classes and Objects a. Differentiate between public and private visibility modes in context of Object Oriented Programming using a suitable example illustrating each. ( Delhi 2008) b. Rewrite the following program after removing the syntactical errors. Underline each correction. ( Delhi 2010) c. Write the definition of class CITY in C++ with the following description : (Outside Delhi 2016) Private Members Ccode // Data member for City code (an integer) Cname // Data member for City Name (a string) Pop // Data member for Population (a long int) KM // Data member for Area Coverage ( a float) Density // Data member for Population Density // (a float) DenCal( ) // A member function to calculate Density as //Pop/KM Public Members Record ( ) View( ) // A function to allow user to enter values of //Acode, Name, Pop, KM and call DenCal( ) //function // A function to display all the data members. //Also display a message Highly Populated //City if the Density is more than 10000

Chapter - 5 : Constructors and Destructors a) Differentiate between Constructor and Destructor function with respect to Object Oriented Programming. ( Outside Delhi 2011) b) Answer the questions (i) and (ii) after going through the following program : (Delhi 2008) #include<iostream.h> #include<string.h> class Bazar char Type[20]; char Product [20]; int Qty; float Price; Bazar( ) // Function 1 strcpy(type, Electronic ); strcpy(product, Calculator ); Qty=10; Price=225; void Disp( ) // Function 2 cout<<type<< _ <<Product<< : <<Qty<< @ <<Price<<endl; ; void main( ) Bazar B; // Statement 1 B.Disp( ); // Statement 2 (i) Will Statement 1 initialize all the data members for the object B with the values given in the Function 1? (Yes or No). Justify your answer suggesting the correction(s) to be made in the above code. (ii) What shall be the possible output when the program gets executed? (Assuming, if required the suggested corrections are made in the program.) (c) Observe the following C++ code and answer the questions (i) and

(ii). Note : Assume all necessary files are included. (OD 2017) class Test long TCode; char TTitle[20]; float Score; Test( ) //Member Function 1 TCode = 100; strcpy (TTitle, First Test ); Test (Test &T) //Member Function 2 TCode=T.TCode+1; Strcpy(TTitle,T.Title); Score = T.Score; ; void main ( ) //Statement 1 // Statement 2 (i) Which OOP feature is illustrated by the Member Function 1 and the Member Function 2 together in the class Test?

(ii) Write Statement 1 and Statement 2 to execute Member Function 1 and Member Function 2 respectively. Chapter - 6 : Inheritance a) Differentiate between Multiple Inheritance and Hirarchical Inheritance. Also, give suitable example to illustrate each. (Outside Delhi 2009) b) Answer the questions (i) to (iv) based on the following : (Delhi 2007) class Interior int OrderId; ; protected: char Address[20]; float Advance ; interior ( ); void Book( ); void View( ); class Painting : public Interior ; protected : int wallarea, ColorCode; char Type; painting( ); void PBook( ); void PView( );

class Billing : public Painting float Charges ; void Calculate( ); Billing( ); void Bill( ); void BillPrint( ); ; (i) (ii) (iii) (iv) What type of Inheritance is illustrated in the above example? Write the names of all the member functions, which are directly accessible from an object of class Billing. Write the names of all the data members, which are directly accessible from the member functions of class Painting. What will be the order of execution of the constructors, when an object of class Billing is declared? Chapter - 7 : Arrays a) Write a function in C++, which accepts an integer array and its size as parameters and rearranges the array in reverse. Example : If an array of nine elements initially contains the elements as 4, 2, 5, 1, 6, 7, 8, 12, 10 Then the function should rearrange the array as 10, 12, 8, 7, 6, 1, 5, 2, 4 b) An array Arr[40][10] is stored in the memory along the column with each element occupying 4 bytes. Find out the address of the location. Arr[3][6] if the location Arr[30[10] is stored at the address 9000.

c) A[15][20] is a two-dimensional array, which is stored in the memory along the row with each of its elements occupying 4 bytes. Find the address of the element A[5][15], if the element A[10][5] is stored at the memory location 35000. (OD 2017) c) WAP in C++ perform selection sort on a 2-d array.