INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION

Similar documents
ASSIGNMENTS FOR CLASS 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 }

INDIAN SCHOOL DARSAIT DEPARTMENT OF ICT

JB ACADEMY HALF-YEARLY EXAMINATION 2016 CLASS XII COMPUTER SCIENCE. Time: 3:00 Hrs. M.M.: 70

THE INDIAN COMMUNITY SCHOOL, KUWAIT

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

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

CLASS XII GUESS PAPER COMPUTER SCENCE (083)

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

COMPUTER SCIENCE (083)

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

VIDYA BHARATI SCHOOL

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

Padasalai.Net s Model Question Paper

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

Sample Paper 2015 Class XII Subject Computer Science

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

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

COMPUTER SCIENCE (083)

Introduction to Programming Using Java (98-388)

AAA //Members of AAA }; class BBB: public AAA //intermediate class. BBB { //Members of BBB };

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

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

Object Oriented Programming. Solved MCQs - Part 2

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

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

STRUCTURING OF PROGRAM

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

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

C++ 8. Constructors and Destructors

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

Short Notes of CS201

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

CS201 - Introduction to Programming Glossary By

Answer Key with Marking Scheme

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

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

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

Please check that this question paper contains 11 printed pages. Please write down the serial number of the question before attempting it.

vinodsrivastava.com Constructor and Destructor

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

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

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

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

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

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK

Dr. P.S. Ahluwalia (Course Director) In Service Course 2009 For PGT (Comp. Sci) K.V.No.2, Jaipur

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

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

Object Oriented Pragramming (22316)

DELHI PUBLIC SCHOOL BOKARO STEEL CITY


KENDRIYA VIDYALAYA SANGATHAN GUWAHATI REGION क य व लय स गठन, ग व ह ट स भ ग I-PRE BOARD EXAMINATION ( -ब ड पर )

SRE VIDYASAAGAR HIGHER SECONDARY SCHOOL

Constructor & Classes Questions

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

Computer Science 2006 (Outside Delhi)

Exam Duration: 2hrs and 30min Software Design

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

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

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

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

END TERM EXAMINATION

C++_ MARKS 40 MIN

Kapil Sehgal PGT Computer. Science Ankleshwar Gujarat

KENDRIYA VIDAYALAYA PANGODE MONTHLY TEST AUGUST 2015

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION SECOND PRE BOARD EXAMINATION CLASS XII

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

Downloaded from

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

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

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

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

EAS 230 Fall 2002 Section B

KENDRIYA VIDYALAYA TIRUMALAGIRI,SECUNDERABAD UNIT TEST II

COMPUTER SCIENCE (Theory) - Class XII Marking Scheme

COMPUTER SCIENCE SAM PLE PAPER 2-HALF YEARLY EXAMINATION

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

VALLIAMMAI ENGINEERING COLLEGE

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION

Fast Introduction to Object Oriented Programming and C++

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

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

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

2016 COMPUTER SCIENCE

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

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

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

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

CS201 Latest Solved MCQs

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

Computer Science (330)

OOPs Concepts. 1. Data Hiding 2. Encapsulation 3. Abstraction 4. Is-A Relationship 5. Method Signature 6. Polymorphism 7. Constructors 8.

KendriyaVidyalayaSangathan Kolkata Region

Computer Science XII Important Concepts for CBSE Examination Questions

Padasalai.Net Half Yearly Exam Model Question Paper

Lesson Plan. Subject: OBJECT ORIENTED PROGRAMMING USING C++ :15 weeks (From January, 2018 to April,2018)

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year

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

Transcription:

Roll Number SET 1 INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION COMPUTER SCIENCE CLASS: XII Sub. Code: 08 Time Allotted: Hr 09.05.018 Max. Marks: 70 GENERAL INSTRUCTIONS: 1. All questions are compulsory.. Programming language is C++. 1 a. Out of the following, find those identifiers, which cannot be used for naming Variable, constants or Functions in a C++ program: while, _SNO, cost*qty, long, Switch, Address One, school b. What is the purpose of actual and formal parameter in a C++ program. c. Give the difference between the type casting and type conversion. Give a suitable C++ code to illustrate both. d. Write the names of those header files, which are required to be included in the code for successful compilation: float A, Number, Outcome; A=random(5); cin>>number; if (isalnum(a)) cout<<number*10; Outcome=pow(A,Number); cout<<outcome<<endl; e. Write a user defined function COUNT which takes a string and returns the count of number of words ending with the character g in the string. f. Write a user defined function salaryfix(float Pay[], int N) in C++, which should modify each element of the array Pay having N elements, as per the following rules: Existing Value of Pay Pay to be changed to less than 100000 Add 5% in the existing value >=100000 and <0000 Add 0% in the existing value >=00000 Add 15% in the existing value 1 Page 1 of 7

a. Predict the output of the following C++ program code. Assume all required header files are void ChangeArray(int Number, int ARR[], int Size) for (int L =0; L<Size; L++) if(l<number) ARR[L]+=L; else ARR[L]*=L; void Show (int ARR [ ], int Size) int i; for (int L=0; L<Size; L++) (L%!=0)?cout<<ARR[L] <<"\t": cout<<arr[l]<<'\t' ; cin>>i; void main ( ) int Array [ ] =,,6,,1,7; ChangeArray(, Array, 6) ; Show (Array, 6) ; b. Predict the output of the following C++ program code. Assume all required header files are typedef char STRING[80]; void MIXITNOW(STRING S) int Size=strlen(S); for(int I=0;I<Size-1;I+=) char WS=S[I]; S[I]=S[I+1]; S[I+1]=WS; for(int I=1;I<Size;I++) if(s[i]>='o' && S[I]<'S') S[I]='@'; Page of 7

STRING Word="TOYOTA PIRUS"; MIXITNOW(Word); cout<<word<<endl; getch(); c. Predict the output of the following C++ program code. Assume all required header files are #include<iostream.h> struct sal int basic, Bonus;; void calculate(sal &g, int N=10) g.basic++; g.bonus=g.basic+n; sal G=150,10; calculate(g,5); cout<<g.basic<<":"<<g.bonus<<endl; calculate(g); cout<<g.basic<<":"<<g.bonus<<endl; calculate(g,15); cout<<g.basic<<":"<<g.bonus<<endl; d. How are encapsulation and abstraction inter-related? Give eg e. Define the following terms : (i) Polymorphism (ii) Inheritance (iii) Abstract class 1x a. Write the difference between function overloading and function with default arguments b. Predict the output of the following C++ program code. Assume all required header files are #include<iostream.h> int compute(int s) return(s*s); float compute(int b,int h) return(0.5 * b * h); cout<<compute()<<endl; cout<<compute(compute(),)<<endl; cout<<compute(,)<<endl; c. Differentiate between the members which are present within the private visibility mode with those which are present within the public visibility modes. c. Write any two functions of scope resolution operator. Page of 7

d. Rewrite the following program after removing the syntactical error(s), if any. Underline each correction assume all required header files are included Class Novel int NO; char name; float price=100; public : void Input() cin>>no; gets(name); cin>>price; void print(); ; void print:: Novel( ) cout<<no<<"\t"<<name<<"\t"<<price; Novel sale; Novel.Input( ); print( ); e. Write the output of the following C++ program code. Assume all required header files are. class Stock long int ID; float Rate; int Date; Stock()ID=1001;Rate=00;Date=1; void RegCode(long int I,float R) ID=I; Rate=R; void Change(int New,int DT) Rate+=New; Date=DT; void Show() cout<<"date :"<<Date<<endl; cout<<id<<"#"<<rate<<endl; ; Page of 7

Stock A,B,C; A.RegCode(10,150); B.RegCode(015,00); B.Change(100,9); C.Change(-0,0); A.Show(); B.Show(); C.Show(); a. Define a class Applicant in C++ with following description: Private Members A data member ANo (Admission Number) of type long A data member Name of type string A data member Agg (Aggregate Marks) of type float A data member Grade of type char A member function GradeMe() to find the grade as per the aggregate marks obtained by a student. Equivalent aggregate marks range and the respective grades are : Aggregate Marks Grade >=80 A less than 80 and >=65 B less than 65 and >=50 C less than 50 D Public Members A function ENTER() to allow user to enter values for ANo, Name, Agg and call function GradeMe() to find the Grade. A function RESULT() to allow user to view the content of all data members. b. Define a class council in C++ with following description : Private members : name of type string housename of type string votes_received as integer Elected as char A function incouncil( ) to assign Elected as Y if the votes_received is more than the 50 else N. Public members : A constructor to initialize name as NULL, housename as BLUE. A destructor to destruct council class object. A function readdetails( ) to input name, housename and votes_received. A function showdetails( ) to evoke the function incouncil() and display all the data members details.. c. What is copy constructor. Give a suitable example. d. Write the difference between default constructor and parameterized constructor. e. Answer the questions (i) and (ii) after going through the following class : class Exam int Marks; char Subject[0]; Page 5 of 7

Exam () //Function 1 Marks = 0; strcpy (Subject, Computer ); Exam(char S[]) //Function Marks = 0; strcpy(subject,s); Exam(int M) //Function Marks = M; strcpy(subject, Computer ); Exam(char S[], int M) //Function Marks = M; strcpy (Subject,S); ~ Exam() //Function 5 cout<<, \n Ending of Destructor ; ; (i) Write statements in C++ that would execute Function and Function of class Exam. (ii) Which feature of Object Oriented Programming is demonstrated using Function 1, Function, Function and Function in the above class Exam? (iii) What is the purpose of Function 5 and when is it executed? f. Write any two uses of Inheritance. Give an example for Multilevel inheritance. 5 a. Answer the questions (i) to (iv) based on the following : class CUSTOMER int Cust_no; char Cust_Name[0]; protected: void Register(); CUSTOMER(); void Status(); ; class SALESMAN int Salesman_no; char Salesman_Name[0]; protected: float Salary; SALESMAN(); void Enter(); void Show(); ; class SHOP : protected CUSTOMER, public SALESMAN char Voucher_No[10]; char Sales_Date[8]; SHOP(); void Sales_Entry(); void Sales_Detail(); Page 6 of 7

; (i) Write the names of data members which are accessible from objects belonging to class CUSTOMER. (ii) Write the names of all the member functions which are accessible from objects belonging to class SALESMAN. (iii) Write the names of all the members which are accessible from member functions of class SHOP. (iv) How many bytes will be required by an object belonging to class SHOP? b. Answer the questions (i) to (iv) based on the following code : class DRUG char catg[10]; char DOF[10], comp[0]; DRUG( ); void endrug( ); void showdrug( ); ; class TABLET protected: char tname[0],volabel[0]; TABLET( ); void entab( ); void showtab( ); ; class PAINKILLER : protected DRUG, public TABLET int dose, usedays; long double price; char seffect[0]; public : void entpain( ); void showpain( ); ; i) How many bytes will be required by an object of PAINKILLER ii) Write names of all the member functions of class PAINKILLER. iii) Write names off all members accessible from object of class PAINKILLER. iv) Write names of all data members accessible from functions of class PAINKILLER. c. Answer the following : (i) What is a stream? (ii) What are the methods of opening files? (iii) How will you detect end of file? d. Write any two differences between ifstream and ofstream class. END OF THE QUESTION PAPER Page 7 of 7