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

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

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

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

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

KENDRIYA VIDYALAYA TIRUMALAGIRI,SECUNDERABAD UNIT TEST II

SAMPLE PAPER-2015 Class-XII SUB:-COMPUTER SCIENCE

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

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

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

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

Downloaded from

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

KENDRIYA VIDYALAYA SANGATHAN CLASS XII EXAMINATION INFORMATICS PRACTICES (065)

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

COMPUTER SCIENCE

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

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

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


Sample Paper 2012 Class XII Subject Computer Science

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

KENDRIYA VIDAYALAYA PANGODE MONTHLY TEST AUGUST 2015

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 Class XII SUBJECT : COMPUTER SCIENCE

DELHI PUBLIC SCHOOL BOKARO STEEL CITY

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

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

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

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

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION

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

COMPUTER SCIENCE 1998 (Delhi Board)

COMPUTER SCIENCE 2002 (Delhi Board)

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

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 EMIRATES NATIONAL SCHOOL SHARJAH THIRD MODEL EXAMINATION 2015 COMPUTER SCIENCE ( Code : 083) CLASS : XII MAX MARKS: 70

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

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

SPLIT-UP SYLLABUS ----CHENNAI REGION COMPUTER SCIENCE (Code: 083) Class-XII Academic Session

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

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

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

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

CLASS-XI COMPUTER SCIENCE

Downloaded-From:-

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

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

Question Bank Class XII Subject : Computer Science

CLASS XII GUESS PAPER COMPUTER SCENCE (083)

BRAIN INTERNATIONAL SCHOOL. Computer Science Assignment CLASS XII OCTOBER 2018 Chapter-7. Data File Handling in C++ Text Files

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

KendriyaVidyalayaSangathan Kolkata Region

(1)Given a binary file PHONE.DAT, containing records of the following structure type class Phonlist { char Name[20]; char Address[30]; char

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

Sample Paper, 2015 Subject: Computer Science Class 12 th

INFORMATION TECHONOLOGY (402) UNIT 7 DATABASE DEVELOPMENT PRACTICAL QUESTIONS

Model Sample Paper 2015

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

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


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

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

Computer Science 2006 (Outside Delhi)

COMPUTER SCIENCE (083)

VIDYA BHARATI SCHOOL

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

MARKING SCHEME COMPUTER SCIENCE (083)_XII

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

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

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

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

2 SEMESTER EXAM CLASS : 12 DECEMBER 2016 TIME : 3 Hrs MAX MARKS : 70

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

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

Sample Paper 2015 Class XII Subject COMPUTER SCIENCE. Some Important Questions Networking

COMPUTER SCIENCE SAM PLE PAPER 2-HALF YEARLY EXAMINATION

Downloaded from


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

KENDRIYA VIDYALAYA SANGATHAN. Regional Office Delhi Split-up Syllabus Session Subject:-Computer Science Subject Code:-083

KENDRIYA VIDYALAYA IIT CAMPUS CHENNAI 36 COMPUTER SCIENCE. Half Yearly

4. BOOLEAN ALGEBRA 8 5. NETWORKING AND OPEN SOURCE SOFTWARE 10

CPE Summer 2015 Exam I (150 pts) June 18, 2015

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

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

Computer Science 2006 (Delhi)

DELHI PUBLIC SCHOOL, RUBY PARK, KOLKATA CLASS XII SUBJECT: COMPUTER SCIENCE QUESTION BANK FILE HANDLING:-

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

#include<iostream.h> #include<conio.h> #include<ctype.h>

ISC 2006 COMPUTER SCIENCE PAPER 1 THEORY PART I Answer all questions in this part

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 =


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

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

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

KENDRIYA VIDYALYA CLRI COMPUTER SCIENCE XII WORKSHEET ON OUTPUT QUESTIONS

KENDRIYA VIDYALAYA SANGATHAN, VARANASI REGION


HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

Transcription:

Sample Paper 2012 Class XII Subject Computer Science Time: 3 Hrs. M.M. 70 General instructions: 1) All questions are compulsory. 2) Read all the questions carefully. 3) Programming language C++. Q.1(a) What do you mean by polymorphism? Explain with suitable example? [2] (b) Name the header file associated with the following function: [1] (i) randomize ( ) (ii) delay( ) (c) Find the output of the following program: [2] #include<iostream.h> #include <string.h> #include <ctype.h> void Convert (char Str[ ], int Len) for (int Count =0; Count < Len; Count++) if(isupper(str[count+])) Str[Count] = tolower(str[count]); else if (islower(str[count])) Str[Count] = toupper(str[count]); else if (isdigit(str[count])) Str[Count] = Str[Count] + 1; else Str[Count] = * ; void main ( ) char Text[] = CBSE Exam 2005 ; int Size = strlen(text); Convert (Text, Size); cout << Text << endl; for(int C =0, R = Size -1; C< = Size/2; C++, R- - ) char Temp = Text[C]; Text[C] = Text[R]; Text[R] = Temp; cout << Text <<endl; (d) Rewrite the following program after removing all the syntax error(s), if any. [2] include <iostream.h> void main ( )

int P [ ] = 90, 10, 24, 15; Q, Number = 4; Q = 9; for[ int I= Number -1; I > =0, I - -] switch (I) case 0: case 3: cout >> P[I] *Q <<endl; break; case 1: case 2: cout << P[I] + Q; (e) Write the output of the following program: [2] #include <iostream.h> int max (int &x, int &y, int &z) if (x >y && y > z) y ++; z ++; return x; else if (y >x) return y; else return z; void main ( ) int a = 10, b = 13, c = 8 ; a = max (a, b, c); cout << a << b << c << endl; b = max (a, b, c); cout << ++ a << ++ b << ++ c << endl; c = max (a, b, c); cout << a++ << ++b << ++c << endl; (f) In the following program, if the value of N given by the user is 15, what maximum and minimum values the program could possible display? [2] #include <iostream.h> #include <stdlib.h> void main ( ) int N, Guessme; randomize( ); cin >> N; Guessme = random(n) + 10;

cout << Guessme << endl; Q.2(a) What do you understand by Copy Constructor? Explain with suitable example. [2] (b) Answer the questions (i) and (ii) after going through the following class: [2] class Travel int days; public: Travel ( ) // Function 1 Days = 50; cout << Journey starts now << endl; void sightseeing( ) // Function 2 cout << Sightseeing in the journey starts << endl; Travel (int Duration) // Function 3 Days = Duration; cout << Journey starts now << endl; ~ Travel ( ) // Function 4 cout << Happy journey << endl; ; (i) In Object Oriented Programming, what is Function 4 referred as and when does it get invoked/ called? (ii) In Object Oriented Programming, which concept is illustrated by Function 1 and Function 3 together? Write an example illustrating the calls for these functions. (c) Define a class POWER in C++ with following description: [4] Private Members: MNO of type long (Meter Number) Name of type string (Consumer s Name) Units of type long (Power Unit s Consumed) Charges of type float (Charges to be paid by Consumer) A member function CALCCHARGE( ) to calculate Charges according to the following conditions: Units Charges Below 100 Units Rs. 2.00 per Unit Below 200 Units and > = 100 Units Rs. 3.00 per Unit > = 200 Units Rs. 5.00 per Unit For Example: If the Units are 132, Charges should be calculated as Charges = 99 * 2 + (Units 99 ) * 3; If the Units are 392, Charges should be calculated as Charges = 99 * 2 + 100 * 3 + (Units 199) * 5;

Public Members A Function Enterdata( ) to allow user to enter values for Mno, Name, Units & call the function CAlCCHARGES( ) to calculate the Charges. A Function ShowBillI( ) to allow user to view the content of all the data members. (d) Answer the questions (i) to (iv) based on the following code: [4] class Car char Model[10]; char Date_of_purchase[10]; char Company[20]; public( ); Car( ); void entercardetail( ); void showcardetail( ); ; class Accessories : public Car protected: char stereo_tape[30]; char sheet_cover[20]; public: float Price; Accessories( ); void enteraccessoriesdetails( ); void showaccessoriesdetails( ); ; class Dealer : public Accessories int No_of_dealers; char dealers_name[20]; int No_of_products; public: Dealer( ); void enterdetails( ); void showdetails( ); ; (i) How many bytes will be required by an object of class Car and an object of class Dealer. (ii) Write names of all the data members which are accessible from the objects of class Dealer. (iii) Write names of all the members accessible from member functions of class (iv) Accessories. Write names of all the member functions which are accessible from objects of class Dealer. Q.3(a) Given two arrays a and b of sizes m and n respectively. Write a function mixab(int a[ ], int m, int b[ ], int m, int c[ ]); [3]

which takes two arrays and their sizes as arguments and creates an array c such that: (i) all even nos. of array which are at even position are copied in c. (ii) after that all even nos. of b array which are at odd positions are copied in c. (iii) after that remaining elements of a are copied in c. (iv) after that remaining elements of b are copied in c. (b) Each element of an array DATA[20][50] requires 4 bytes of storage. The base address of data is 2000. Determine the location of DATA[10][10] when the array is stored as : (a) row- major (b) column major. [4] (c) Define functions stackpush( ) to insert nodes and stackpop( ) to delete nodes, for a linked list implemented stack having the following structure for each node: [4] struct node char name[20]; int age; node *LINK; ; class stack node *top; public: stack( ) top = NULL; ; void stackpush( ); void stackpop( ); ; (d) Obtain the postfix notation for the following infix notation of expression showing the contents of the stack and postfix expression formed after step of conversion: [2] A * B + (C D / F) (e) Write a function in C++ to print the sum of all the values which are divisible by 10 or 20 present in a two dimensional array passed as the argument to the function. [3] Q.4(a) Observe the program segment given carefully, and answer the question that follows: [1] class Joy int Joy_id; char Joy_name[20]; public : // function to enter Joyians details void enterdetails ( ); // function to display Joyians details // function to return Joy_id int AJoy_id( ) return Joy_id; ; void Modify ( JOY NEW)

fstream File; File.open ( JOY.DAT, ios :: binary ios :: in ios :: out); JOY OB; int Recordsread = 0, Found = 0; while (!Found && File.read (( char*) & OB, sizeof(ob))) Recordsread++; if(new.ajoy_id( ) = = OB.AJoy_id( )) // Missing Statement File.write ((char * )&NEW.sizeof(NEW)); Found = 1; else File.write((char *)&OB, sizeof(ob)); if (!Found) cout << Record for modification does not exist ; File.close ( ); If the function Modify( ) is supposed to modify a record in file JOY.DAT with the values of JOY NEW passed to its argument, write the appropriate statement for Missing Statement using seekp( ) and seekg( ), whichever needed, in the above code that would write the modified record at its proper place. (b) Assuming that a text file Joy.TXT contains some text written into it, write a function named vowelwords, that reads the file JOY.TXT and creates a new file names JOY1.TXT which start with a lowercase vowel (i.e., with a, e, o, i', u ). For example if the file JOY.TXT contains [2] Carry umbrella and overcoat when it rains Then the file JOY1.TXT shall contain Umbrella and overcoat it (c) Write a function in C++ to search for a room-number (RoomNo) given by the user in an already existing binary is called Hospital.Dat. Also display complete record of the room-no searched if found otherwise display a message not found. [3] class Hospital int Room_No; char Patient_N [30]; public : void Input( ) gets (Patient_N); cin >> Room_No; void Output( ) cout << Patient s Name: << Patient_N << endl; cout << Room Number: << Room_No << endl; int Getroom( ) return Room_No;

; Q.5 (a) What is key in RDBMS? What are different key constraints? [2] (b) Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii): on the basis of the table [6] BOOKS Book_Id Book_Name Author_name Publishers Price Type Quantity F0001 The Tears William First Publ. 750 Fiction 10 Hopkins F0002 Thunderbolt Anna Roberts First Publ. 700 Fiction 5 T0001 MyFirstC++ Brain & Brooke EPB 250 Text 10 T0002 C++Brain A.W. Rossaine TDH 325 Text 5 C0001 Fast Cook Lata Kapoor EPB 350 Cooke ry 8 ISSUED Book_Id Quantity_Issued F0001 3 T0001 1 C0001 5 (a) To show Book name, Author name and Price of books of EPB Publishers. (b) To list the names from books of Fiction type. (c) To display the names and price of the books in descending order of their price. (d) To increase the price of all books of First Publ. Publishers by 50. (e) To display the Book_Id, Book_Name and Quantity_Issued for all books which have been issued. (The query will require contents from both the tables.) (f) To insert a new row in the table Issued having the following data: F0002, 4. (g) Give the output: (i) SELECT COUNT (DISTINCT Publishers) FROM Books; (ii) SELECT SUM(Price) FROM Books WHERE Quantity > 5; (iii) SELECT Book_Name, Author_Name FROM Books WHERE Price <500; (iv) SELECT COUNT (*) FROM Books; Q.6(a) State and Verify Absorption law in Boolean Algebra. [2] (b) Write the equivalent Boolean expression for the following Logic Circuit: [2] (c)combinational circuit has 3 inputs and one output. Output is 1 if: [1] (i) All the inputs are equal to 1. (ii) None of the inputs are equal to 1. (iii) An odd number of inputs are equal to 1. (I) Obtain the truth table

(II) Find the simplified output function in POS form (d) Reduce the following Boolean expression using K- Map: [3] F (A, B, C, D) = (0, 1, 2, 3, 4, 5, 10, 11, 15) Q.7(a) What is the difference between Absolute and Relative URL? [1] (b) Expand the following terminologies: [1] (i) CSMA / CD (ii) WLL (c) What is the utility of Cyber law? [1] (d) What do you understand by the terms Gopher and Archie. [1] (e) The Reliance Info Sys has set up its Branch at Srinager for its office and web based activities. It has 4 Zone of buildings as shown in the diagram: Zone Z Zone Y Zone X Center to center distances various blocks Zone X to Zone Z 40 m Zone Z to Zone Y 60 m Zone Y to Zone X 135 m Zone Y to Zone U 70 m Zone X to Zone U 165 m Zone Z to Zone U 80 m Zone U Number of Computers Zone X 50 Zone Z 130 Zone Y 40 Zone U 15 (e1) Suggest a most suitable cable layout of connections between the Zones and topology. [1] (e2) Suggest the most suitable place (i.e., Zone) to house the server of this organization with a suitable reason, with justification. [1] (e3) Suggest the placement of the following devices with justification: [1] (1) Repeater (2) Hub / Switch (e4) The organization id planning to link its head office situated in Mumbai at the offices at Srinager. Suggest an economic way to connect it; the company is ready to compromise on the speed of connectivity. Justify your answer. [1]