Downloaded from

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

SAMPLE PAPER-2015 CLASS-XII COMPUTER SCIENCE. Sample paper-i. Time allowed: 3 hours Maximum Marks: 70 Name : Roll No.:

KENDRIYA VIDAYALAYA PANGODE MONTHLY TEST AUGUST 2015

KENDRIYA VIDYALAYA TIRUMALAGIRI,SECUNDERABAD UNIT TEST II

Sample Paper, Subject: Computer Science Class 12 th Time Allowed : 3 Hr. M.M.: 70

(d) Rewrite the following program after removing all the syntax error(s), if any. [2] include <iostream.h> void main ( )

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


COMPUTER SCIENCE 1998 (Delhi Board)

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

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

QUESTION BANK SUB: COMPUTER SCIENCE(083)

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION. REVISION Examination 2013 COMPUTER SCIENCE (083) CLASS XII

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

KENDRIYA VIDYALAYA SANGATHAN MODEL QUESTION PAPER-5 BLUE PRINT CLASSS XII COMPUTER SCIENCE (083) TIME: 03:00 Hrs. MAX. MARKS: 70 S.No.

THE EMIRATES NATIONAL SCHOOL SHARJAH THIRD MODEL EXAMINATION 2015 COMPUTER SCIENCE ( Code : 083) CLASS : XII MAX MARKS: 70

COMPUTER SCIENCE Time allowed : 3hours] [Maximum Marks :70

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

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

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

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

DATA FILE HANDLING. The function should create another file OUT.TXT with the text

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

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

Downloaded-From:-

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

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

2016 COMPUTER SCIENCE

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

Computer Science, Class XII ( ) (Summer Vacation-2015) (Holiday H.W) Chapter No.1 to 3

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

ASSIGNMENT CLASS : XII ( ) COMPUTER SCIENCE

C++ 8. Constructors and Destructors

1. a) Find the correct identifiers out of the following, which can be 2 used for naming Variable, Constants or Functions in a C++ program:

SHORT REVIEW OF CS TOPICS RANDOM NUMBERS (2 MARKS) which generates a random number in the range of 0 to n-1. For example;

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

COMPUTER SCIENCE (083)

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

Data type of a pointer must be same as the data type of the variable to which the pointer variable is pointing. Here are a few examples:

KendriyaVidyalayaSangathan Kolkata Region

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

DELHI PUBLIC SCHOOL, Durgapur QUESTION BANK & REVISION SHEET OF COMPUTER FOR FINAL EXAMINATION ( ) CLASS-VIIi Computer CHAPTER-CREATING MY

Sample Paper Class XI Subject Computer Sience UNIT TEST II

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

SAMPLE QUESTION PAPER CLASS-XII, SESSION: SUBJECT: COMPUTER SCIENCE

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

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 =

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

vinodsrivastava.com Constructor and Destructor

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

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

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

COMPUTER SCIENCE (CODE 083) CLASS XII Time allowed : 3Hours Maximum. Marks 70

LAB 4.1 Relational Operators and the if Statement

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

CBSE Sample Paper 2015 Computer Science C++ Class XII Time 3hrs M.M 70

OBJECT ORIENTED PROGRAMMING. Ms. Ajeta Nandal C.R.Polytechnic,Rohtak

1- Write a single C++ statement that: A. Calculates the sum of the two integrates 11 and 12 and outputs the sum to the consol.

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

Base class or Super class. Subclass or Derived class


Computer Science 2006 (Outside Delhi)

Sample Paper - II Subject Computer Science

CAMBRIDGE SCHOOL, NOIDA ASSIGNMENT 1, TOPIC: C++ PROGRAMMING CLASS VIII, COMPUTER SCIENCE

1. Answer the following : a) What do you mean by Open Source Software. Give an example. (2)

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

Object Oriented Pragramming (22316)

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

SRE VIDYASAAGAR HIGHER SECONDARY SCHOOL

cout<< \n Enter values for a and b... ; cin>>a>>b;

KE DRIYA VIDYALAYA SA GATHA CHE AI REGIO COMMO PREBOARD EXAMI ATIO COMPUTER SCIE CE

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

Model Sample Paper 2015


EAS 230 Fall 2002 Section B

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

Padasalai.Net s Model Question Paper

OBJECT-ORIENTED PROGRAMMING CONCEPTS-CLASSES II

Short Notes of CS201

INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION

Downloaded from

(4) Find the syntax error(s), if any, in the following program: #include main() int x[5],*y,z[5]; for(i=0;i<5;i++) x[i]=i; z[i]=i+3; y=z; x=y; (5) Rew

(i) get single character using keyboard. This function is available in stdio.h. (ii) to check whether given character is alphabet or digit or not.

CS201 - Introduction to Programming Glossary By

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

22316 Course Title : Object Oriented Programming using C++ Max. Marks : 70 Time: 3 Hrs.

MARKING SCHEME COMPUTER SCIENCE (083)_XII

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 }

ASSIGNMENT CLASS-11 COMPUTER SCIENCE [C++]

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

Page. No. 1/15 CS201 Introduction to Programmming Solved Subjective Questions From spring 2010 Final Term Papers By vuzs Team

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

Darshan Institute of Engineering & Technology for Diploma Studies

Object Oriented Programming. Solved MCQs - Part 2

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

Computer Science 2006 (Delhi)

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

Object oriented programming

Syntax to define a Structure: struct structurename { datatype membername1; datatype membername2;... } ; For Example:

Computer Department. Question (1): State whether each of the following is true or false. Question (2): Select the correct answer from the following:

Transcription:

QUARTERLY EXAMINATION, 2013 14 SUBJECT: COMPUTER SCIENCE TIME : 3 hrs CLASS : XII M.M.-70 Instructions: (1) All the questions are compulsory. (2) Programming Language C++ 1 (a) Illustrate the concept of function overloading with the help of an example. (2) (b) Name the header file,to which the following built in function belong : (2) (a) Isupper () (b) setw() (c) pow() (d) strcmp() (c) Will the following program execute successfully? If not, state the reasons. (2) # include<stdio.h> int s1,s2,num; s1=s2 =0; for(x=0;x<11;x++) cin<<num; If(num>0)s1+num; else s2=/num; cout<<s1<<s2<<s2; (d) Give the output of the following program segment (assuming all required header files are included in the program): (2) char * Name= a Profile ; for (int x=0;strlen(name);x++) If (islower(name[x])) Name[x]=toupper(Name[x]); else if (isupper(name[x]) if(x%2!=0) Name[x]=tolower(Name[x-1]); else Name[x]--; cout<<name<<endl; (e) Write the output of following program: (2) # include<iostream.h> Int func (int &x,int y=10) If (x%y==0)return ++x; else return y--; Int p=20,q=23; q=func(p,q); cout<<p<<q<<endl; p=func(p); cout<<p<<q<<endl;

2 (a) Differentiate between private and protected visibility in context of Object Oriented programming? (3) (b) What will be the output of the following program: (2) char *Text= NEWLOOK ; int *P, Num[]=2,8,6,5 P=Num; cout<<*p<<text<<endl; Text++; P++; cout<<*p<<text<<endl; (c) Define the term Data Hiding in the context of Object Oriented Programming. Give a suitable example using a C++ code to illustrate the same. (2) (b) What is constructor overloading? Give an example to illustrate the same. (2) (e) Write the definition of Inheritance with defining prototype. (2) (f) Answer the questions (i) to (iv) based on the following code: (6) class Car char Model[10]; char Date_of_purchase[10]; char Company[20]; Car( ); void entercardetail( ); void showcardetail( ); class Accessories : public Car protected: char stereo_tape[30]; char sheet_cover[20]; float Price; Accessories( ); void enteraccessoriesdetails( ); void showaccessoriesdetails( ); class Dealer : public Car int No_of_dealers; char dealers_name[20]; int No_of_products; Dealer( ); void enterdetails( ); void showdetails( ); 1. Which type of inheritance is illustrated in the above c++ code? (1) 2. Write names of all the data members which are accessible from the objects of class Dealer. (2) 3. Write names of all the members accessible from member functions of class Accessories.(1) 4. Write names of all the member functions which are accessible from objects of class Dealer.(2)

Q.3 (a) Write an overloaded function Add() in C++ for adding two integer, two float, 1 float and 1 integer values. (2) (b) Write enumeration in C++ to store the names of days. (2) (c) Define Class and objects with a working program that show various access modifiers and their behavior on object of class. (4) (d) What are the difference between constructor and destructor? (2) 4. (a) A binary file Students.dat contains data of 10 students where each student s data is an object of the following class: (3) class Student int Rno;char Name[20]; void EnterData() cin>>rno; cin.getline(name,20); void ShowData() cout<<rno<< - <<Name<<endl; With reference to this information, write function that read and display objects from file: (b) Write a function in C++ to count the number of lines starting with a digit in a text file DIARY.TXT. (2) (c) Write a function in C++ to search and display details, whose destination is Chandigargh from a binary file Flight.Data. Assuming the binary file is containing the objects of the following class: (3) class FLIGHT int Fno; // Flight Number char From[20]; // Flight Starting Point char To[20]; // Flight Destination char * GetFrom ( ); return from; char * GetTo( ); return To; void input() cin>>fno>>; gets(from); get(to); void show( ) cout<<fno<< : <<From << : <<To<<endl; (d). Answer the following (i) to (iv) based on the following code: (4) class PUBLISHER class Pub[12]; double Turnover; protected: void Register (); Publisher (); void Enter( ); void Display( ); class BRANCH char CITY[20]; protected: float Employees; BRANCH(); void Haveit(); void Giveit(); class Author: private BRANCH, public PUBLISHER

int Acode; char Aname[20]; float amount; AUTHOR( ); void Start( ); void Show(); i. Write the names of the data members, which are accessible from objects belonging to class AUTHOR. ii. Write the names of all the member functions which are accessible from objects belonging to the class BRANCH. Iii.Write the names of all members which are accessible from member functions of class AUTHOR. iv. How many bytes will be required by an object belonging to class AUTHOR? 5. (a) Rewrite the corrected code for the following program.underline each correction (if any) (3) # include<iostream.h> Structure Swimmingclub int memnumber; char memname[20]; char memtype[ ] = LIG ; void main( ) Swimmingclub per1,per2; cin>> Member number ; cin >>memnumber.per1: ; cout<< Member name: ; cin>>per1. Member name; per1.memtype= HIG ; per2=per1; cin>> Member number: <<per2.memnumber: ; cin>> Member name: << per2.memname; cin>> Member number : << per2.memtype: ; b. Find the syntax error (s),if any (giving reason for error). (2) Class stu Int x=o; Float y; Stu( ) y=5 ; ~ ( ) Void main( ) Stu s1, s2 ;

c. What will be the output of the following program: (2) #include<iostream.h> void main( ) clrscr( ); int v1=5, v2=10; for(int x =1; x<=2; x++) cout<< ++ v1<< \t <<v2 -- <<endl; cout<< - - v2<< \t <<v1++<<endl; f. Write the definition for a function Sumseries ( ) in c++ with two arguments/parameters double x and int n.the function should return a value of type double and it should perform sum of the following series. x- x 2 /3!+ x 3 /5!- x 4 / 71+x 5 /9!-..n. (3) d Answer the questions (i) to (iv) based on the following (6) class Chairperson long CID ; //Chairperson Identification Number char CName[20] ; protected : char Description[40] ; void Allocate( ) ; public : Chairperson( ) ; Void Assign( ) ; void Show( ) ; ; class Director int DID ; //Director ID char Dname[20] ; protected : char Profile[30] ; public : Director( ) ; void Input( ) ; void output( ) ; ; class Company : private Chairperson, public Director int CID ; //Company ID char City[20], Country[20] ; public : Company( ) ; void Enter( ) ; void Display( ) ; ; (i) Which type of Inheritance is illustrated in the above C++ code? (1) (ii) Write the names of members, which are accessible by objects of class type Company. (2) (iii) Write the name of all the member functions, which are accessible by objects of class type Company. (2) (iv) Write the names of all members, which are accessible from member functions of class Director. (1)

6 (a). What will be the output of the following program: (3) # include<iostream.h> class A A( ) cout<< Constructor A \t ; ~A( ) cout<< Destructor A \n ; class B B( ) cout<< Constructor B \t ; ~ B ( ) cout<< Destructor B \n ; class C A ob1,ob2; B ob3; Public: C( ) cout<< \n Constructor C \t ; ~ C( ) cout<< Destructor C \n ; void main( ) C oc; B ob; A oa; (b) Write the names of the header files which are not necessary to execute the following C++ code (2) #include<iostream.h> #include<stdio.h> #include<string.h> #include<ctype.h> #include<math.h> char c, String[ ] = " System Design "; for(int i=0; String[i]!='\0' ;i++) if(isdigit(string[i]) cout<<endl; else c=toupper(string[i]); cout<<c;