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

Similar documents
Sample Paper, 2015 Subject: Computer Science Class 12 th

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

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

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

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

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

91/1 COMPUTER SCIENCE. Series SHC/1. dksm ua- jksy ua- Code No. Roll No. Candidates must write the Code on the title page of the answer-book.

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

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

Model Sample Paper 2015

CLASS XII GUESS PAPER COMPUTER SCENCE (083)

AISSCE COMMON MODEL EXAMINATION Subject Computer Science [083] Time Allotted: 3 Hours Maximum Marks: 70

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

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

Unit-V File operations

KendriyaVidyalayaSangathan Kolkata Region

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

QUESTION BANK SUB: COMPUTER SCIENCE(083)

Convenient way to deal large quantities of data. Store data permanently (until file is deleted).

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

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

This chapter introduces the notion of namespace. We also describe how to manage input and output with C++ commands via the terminal or files.

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

THE INDIAN COMMUNITY SCHOOL, KUWAIT

Chapte t r r 9

C++ How to Program 14.6

Constructor & Classes Questions

After going through this lesson, you would be able to: store data in a file. access data record by record from the file. move pointer within the file


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

Chapter-12 DATA FILE HANDLING

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

Study Material for Class XII. Data File Handling

KENDRIYA VIDYALAYA IIT CAMPUS CHENNAI 36 COMPUTER SCIENCE. Half Yearly

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

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

C++ Binary File I/O. C++ file input and output are typically achieved by using an object of one of the following classes:

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

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

Computer Science XII Important Concepts for CBSE Examination Questions

DELHI PUBLIC SCHOOL BOKARO STEEL CITY

CSC 138 Structured Programming CHAPTER 4: TEXT FILE [PART 1]

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

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

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

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

Object Oriented Programming Using C++ UNIT-3 I/O Streams

Computer programs are associated to work with files as it helps in storing data & information permanently. File - itself a bunch of bytes stored on

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

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 }

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

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

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

Developed By : Ms. K. M. Sanghavi

AC55/AT55 OBJECT ORIENTED PROGRAMMING WITH C++ DEC 2013

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:

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

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

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

KENDRIYA VIDYALAYA NO-1 ARMAPUR

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

C++ 8. Constructors and Destructors

CLASS XII SECOND TERM EXAMINATION SUBJECT : COMPUTER SCIENCE SET A2 (SOLUTIONS)

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

Padasalai.Net s Model Question Paper

COMPUTER SCIENCE (083)

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

Downloaded from

DATA FILE HANDLING FILES. characters (ASCII Code) sequence of bytes, i.e. 0 s & 1 s

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions.

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

I SEMESTER EXAM : : XI :COMPUTER SCIENCE : MAX MARK a) What is the difference between Hardware and Software? Give one example for each.

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

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

A stream is infinite. File access methods. File I/O in C++ 4. File input/output David Keil CS II 2/03. The extractor and inserter form expressions

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

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

C++_ MARKS 40 MIN

ITL Public School Pre-Board( ) Computer Science (083) Time:3 hrs M. M: 70


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

Random File Access. 1. Random File Access

COMPUTER SCIENCE

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

Consider the following example where a base class has been derived by other two classes:

void display(){ cout << trainno.<< :>>Description<<endl; }; void main() {TRAIN T; Entry.(); Display.(); d) 410 e) i) south:east:south f) temttoe

VuZs Team's Work. CS201 Spring Solved by vuzs Team with Reference Written by Administrator Wednesday, 19 May :52

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

C++ Programming Lecture 10 File Processing

Class and object Holiday Homework

INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION

EAS 230 Fall 2002 Section B

Downloaded from

ios ifstream fstream

COMPUTER SCIENCE 1998 (Delhi Board)

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

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

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

Transcription:

JB Academy, Faizabad Half Yearly Examination - 2017-18 Subject: Computer Science (083) Class XII Time: 3 Hours Max. Marks: 70 Instructions: i) All questions are compulsory and so attempt all. ii) Programming language: C++. Q1. (a) What does Overloaded function mean? How is constructor overloading different from function overloading. [3] (b) Name the header file required for successful compilation of the given code: [2] ifstream fin( story.dat ); char ch1; int alpha=0; if (isalpha(fin.get(ch1)) ++alpha; fin.close(); getch(); (c) Rewrite the following program after removing all the syntactical errors underlining each correction also.(if any): [3] #include<iostream.h> Void main() Int a[5]=2,4,6,8,9; Int *pt; for(int i=0;i<5;i++) cout<<*(pt); (d) Find the Errors in the following program code and rewrite the correct code. [3] Include<iostream.h> class deposite int acno; char cnm[20]; float balance; void deposite() void input() cout<< Enter the acno ; cin>>acno; deposite b(123, xyz,5000); input(); Q2. (a) Define following terms- [4] (i) Inline function (ii) Data encapsulation (iii) Dynamic memory allocation (iv) Memory leaks. (b) Define a class Tour with the following specifications. [4] Private Members : Tcode string No_of_adults int No_of_kids int Kilometers int Totalfare float Pg-1

Public members: A constructor to assign initial values as follows Tcode with NULL No_of_adult with 0 No_of_kids with 0 Kilometers with 0 Totalfare with 0.0 A function AssignFare() which calculates and assigns the value of the data member totalfare as follows- For each Adult Fare(Rs) For Kilometers 500 >=1000 300 <1000 and >= 500 200 <500 For each kid the above fare will be 50% of the fare mentioned in the above table For example: If Kilometers is 850, no_of_adults=2 and no_of_kids=3 Then totalfare should be calculated as Totalfare=No_of_adults*300+no_of kids*150 i.e. 2*300+3*150=1050 A function Entertour() to input the values of data members tcode, no_of_adults, no_of_kids and kilometers and invoke the AssignFare() function. A function show() which displays the content of all the data members for a tour. (c) Define a class CABS in C++ with following description: [4] Private members : Cno- to store cab number Type- to store a character A, B or C as city type PKM- to store per Kilo Meter charges Dist- to store distance travelled (in KM) Member Functions: A constructor function to initialize type as A and cno 1111. A function charges() to assign PKM as per the following table: Type A B C PKM 25 20 15 A function register() to allow administrator to enter the values for cno and type. Also this function should call charges() to assign PKM charges. A function showcab() to allow user to enter the value of distance and display cno, type PKM, PKM*distance(as amount) on screen (d) Answer the questions (i) and (ii) after going through the following class. [2] Class Match int time; Public: Match() time=0; Cout<< Match comments <<endl; //function1 Pg-2

; Void Details() cout<< Intersection Basketball Match <<endl; Match(int Duration) Time=Duration; Cout<< Another Match begins now <<endl; Match (Match &M) Time=M.Duration; Cout<< Like previous Match <<endl; //function2 //function3 //function4 (i) Which category of constructor-function 4 belongs and what is purpose of using it? (ii) Write statements that would call the member functions 1 and 3 Q.3 (a) Consider the following declarations and answer the questions given below [4] class Btech char streamcode[5]; protected: int seats; void allot(); Btech( ); void streamread(); void streamwrite(); ; class dept : protected Btech char deptname[20]; int strength; dept(); void deptread(); void deptwrite(); ; class course: public dept char coursename[20]; float fees; course(); void courseread(); void coursewrite(); ; (i) (ii) (iii) (iv) Which type of inheritance is shown in the above example? How many bytes will be required by an object of the class course? Write the name of all the data members accessible from member functions of the class dept. Write the name of member functions which are accessible from the object of the class course. (b) What is containership? How does it differ from inheritance? [3] ( c ) When does ambiguity arise in multiple inheritance? How can one resolve it? [3] Q.4 (a) Observe the program segment given below carefully and fill the blanks marked as Statement 1 and Statement 2 using seekp() and seekg() functions for performing the required task. [2] #include <fstream.h> Class Libraray Long ano; Char title[20]; Int qty; Pg-3

Public: Void enter(int); Vid display(); Void buy(int q); qty=qty+q Long getano() return(ano); ; Void BuyBook(long bano, int bqty) // bano- ano of book purchased // bqty- Number of books purchased Fstream file; File.open( stock.in, ios::in ios::out ios::binary); Int position=-1; Library L; While(position==-1 && file.read((char*)&l,sizeof(l))) if(l.getano()==bano) L.buy(bqty); Position=file.tellg( )- sizeof(l); statement 1 statement 2 If(position==-1) Cout<< No updation done ; File.close(); (b) (c) Write a function in C++ to count the number of word Delhi present in a text file TOUR.TXT. [3] Write a programme to store a paragraph in a data file Test.txt and delete appearance of word he from the file. Also display content of file after deletion. [4] (d) Write a function showfile( ) to read all records present in an already created file [3] speed.dat and display them on screen, also count the number of records present in the file. Assume that there is a class Vehicle and object of Vehicle are stored in file. (e) Differentiate between (1) Text file and Binary files. (2) read() and getline() [6] (3) ios::app and ios::out Q.5 (a) Write a programme to display content of a 2 D array using pointers. [3] int A[3][3]=1,2,3,6,5,4,9,8,7; (b) An array P[20][30] is stored in the memory along with column with each of the Element occupying 4 bytes, find out the Base address of the array, if an element P[2][20] is stored at the memory location 5000. [3] ( c) Write a programme to sort an array of 10 element using bubble sort technique. [3] Also display the array after sorting. (d) Suppose A,B and C are arrays of integers of size m,n and m+n respectively. The Numbers in array A are in ascending order and in array B in descending order. Write A programme to create a third array C containing all the data of array A and B in ascending order. [4] Pg-4

(e) Predict the output- [2+2] (1) for(i=3; i<10; i++) (II) if(i==4) i=i+5; for(j=4; j>0; j--) cout<<j*i<< ; cout<<endl char *p= Difficult ; char c; c=++ *p ; cout<<c ; ************************* Pg-5