General Instructions:

Similar documents
DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

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

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

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

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

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

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

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

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

KendriyaVidyalayaSangathan Kolkata Region

DELHI PUBLIC SCHOOL BOKARO STEEL CITY

CLASS XII GUESS PAPER COMPUTER SCENCE (083)

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

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

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

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 2006 (Outside Delhi)

COMPUTER SCIENCE SAM PLE PAPER 2-HALF YEARLY EXAMINATION

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

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

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

Sample Paper, 2015 Subject: Computer Science Class 12 th

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

Sample Paper 2015 Class XII Subject Computer Science

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

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

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

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

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

(d) Observe the following C++ code very carefully and rewrite it after removing any/all syntactical errors: [2] Include < iostream.

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

Sample Paper - II Subject Computer Science

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

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

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

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

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

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

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

COMPUTER SCIENCE 1998 (Delhi Board)

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

KENDRIYA VIDYALAYA IIT CAMPUS CHENNAI 36 COMPUTER SCIENCE. Half Yearly

COMPUTER SCIENCE

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

Model Sample Paper 2015

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

Question Bank Class XII Subject : Computer Science


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:

b) #include<iostream.h> void main() { int a, b; cout<<"input two integer values? "; cin>>a>>b; double avg=(a+b)/2.0; cout<<"average="<<avg<<endl; }

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

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

COMPUTER SCIENCE 2002 (Delhi Board)

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

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

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION

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

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

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

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

COMPUTER SCIENCE Paper 1

Sample Paper 2012 Class XII Subject Computer Science

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


Downloaded from

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

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

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

COMPUTER SCIENCE. Paper 1

KE DRIYA VIDYALAYA SA GATHA CHE AI REGIO COMMO PREBOARD EXAMI ATIO COMPUTER SCIE CE. CLASS- XII Time Allowed: 3 hours Max.

2016 COMPUTER SCIENCE

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

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

COMPUTER SCIENCE (083)

The Hyderabad Public School, Begumpet, Hyderabad, A.P


Computer Science 2006 (Delhi)

INDIAN SCHOOL MUSCAT FIRST PRELIMINARY EXAMINATION 2017 INFORMATICS PRACTICES

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

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

PART I. Answer all questions in this Part. While answering questions in this Part, indicate briefly your working and reasoning, wherever required.

Technical Questions. Q 1) What are the key features in C programming language?

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

Previous Year Nagarro Questions

M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

ASSIGNMENT CLASS-11 COMPUTER SCIENCE [C++]

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

CLASS-XI COMPUTER SCIENCE

Computer Science Paper 1 (Theory) Part I While working questions in this part, indicate briefly your working and reasoning wherever required.

Answer Key with Marking Scheme

THE INDIAN COMMUNITY SCHOOL, KUWAIT

m) sin() n) endl o) getch() p) cout

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

COMPUTER APPLICATION

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

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

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

STRUCTURED DATA TYPE ARRAYS IN C++ ONE-DIMENSIONAL ARRAY TWO-DIMENSIONAL ARRAY

INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION

Transcription:

Time allowed: 3 hours CLASS: XII COMPUTER SCIENCE M.Marks: 70 2014-15 General Instructions: Check that this question paper contains 12 printed pages. Check that this question paper contains 7 questions totalling 70 marks. Label the answers clearly. Attempt all questions. Programming Language: C++. The marks for individual questions are shown in round brackets. Include diagrams / examples in your answers where these are helpful. At the end of the examination use a treasury tag to attach your additional answer sheets with the main answer booklet. You are reminded of the importance of clear English and careful presentation in your answers. 15 minutes time has been allotted to read this question paper. You will read the question paper only and will not write any answer on the answer-book during this period. 1. (a) What is the difference between an array and a structure in C++? Give a suitable example to illustrate both using C++ code. (2) b) Observe the following C++ code: #include <iostream.h> #include <stdio.h> #include <string.h> #include <math.h> void main() char STR[80]; gets(str); puts(strrev(str)); getch(); Page 1 of 12

Name the header file which is not necessary to run the above program and name the header file which is necessary for the successful compilation of the above program. (1) (c) Rewrite the following code after removing all the syntax error(s) if any present in the code. Make sure that you underline each correction done by you in the code. (2) Important Note: Assume that all required header files are already included, which are essential to run this code The correction made by you should not change the logic of the program. int sum(const int arr[], int size) void caller() int A[10],i=0; for(;i<10;i++) cin>>a[i]; sum(a,10); void main() caller() int sum(const int arr[], size) int s=0,i=-1; while(++i<size) s=+arr[i]; return s; (d) Obtain the output from the following C++ program as expected to appear on the screen after its execution. (2) Important Note : All the desired header files are already included in the code, which are required to run the code. void main() Page 2 of 12

char *Text= TALenT@orG ; for(int i=0;text[i]!= \0 ;i++) if(!isalpha(text[i])) Text[i]= * ; else if(!isupper(text[i])) Text[i]=Text[i]+1; else Text[i]=Text[i+1]; cout<<text ; (e) Obtain the output from the following C++ program as expected to appear on the screen after its execution. (3) Important Note : All the desired header files are already included in the code, which are required to run the code. class STAR_CINEMA char Movie_Name[25]; int No_Of_Tickets; char Ticket_Type[10]; public: STAR_CINEMA(char *MN= EYE, int NT=3, char *TT= BALCONY ) strcpy(movie_name,mn); No_Of_Tickets=NT; strcpy(ticket_type,tt); void SHOW() if(strcmp(ticket_type, BALCONY )==0) cout<<movie_name<< \t <<No_Of_Tickets<< \t <<Ticket_Type<< \t <<3.00 *No_Of_Tickets; cout<<endl; if(strcmp(ticket_type, GENERAL )==0) cout<<movie_name<< \t <<No_Of_Tickets<< \t <<Ticket_Type<< \t <<2.00 *No_Of_Tickets; cout<<endl; ~STAR_CINEMA() cout<< Booked\n ; ; Page 3 of 12

void main() STAR_CINEMA T1; T1.SHOW(); STAR_CINEMA T2( TROY, 2, GENERAL ); T2.SHOW(); (f) Observe the following program & Find out the correct possible outputs from the options. ( Assuming that all required header files are included in the program) (2) void main() char serial[ ] = E, X, A, M, \0 ; int number [ ]= 69,66,67,68; randomize(); cout<<number[random(3)]; for( int i=0;i<4;i++) cout<<serial[sizeof(int) + random(2)-1]; (i) (ii) (iii) (iv) 67XXAX 69AXXA 66AAXA 67AAAM 2. (a) What is the difference between static data members and non-static data members in a class? Also give a suitable example in C++ to illustrate both. (2) (b) Answer the questions (i) and (ii) after going through the following class: (2) class HOTEL char Name[25]; char Star_Rating[10]; int Number_Of_Rooms; char Price_Review_Date[12]; HOTEL() // Constructor 1 strcpy(name, The Regency ); strcpy(star_rating, ***** ); Number_Of_Rooms=136; strcpy(price_review_date, 24-12-2014 ); Page 4 of 12

public: HOTEL(char Hname[], char SR[], int R, char RD[]) // Constructor 2 strcpy(name, Hname); strcpy(star_rating,sr); Number_Of_Rooms=R; strcpy(price_review_date, RD); ; void main() HOTEL H; // Statement 1 i) Will Statement 1 initialize all the data members for object H with the values given in Constructor 1? (Yes or No). Justify your answer suggesting the correction(s) to be made in the above code. ii) Write a command/statement to invoke Constructor 2. (c) Define a class PET_SHOP with the following specifications: (4) Private Members: Pet_Id integer Pet_Name character(15) Animal_Type character(10) Color character(12) Age integer Discount character(10); Protected Members: FEED_INFO() - a member function that allows the user to input the values for Pet_Id, Pet_Name, Animal_Type, Color and Age. SHOW_INFO() a member function that allows the user to view the values of Pet_Id, Pet_Name, Animal_Type, Color, Age and Discount on screen. Public Members: A constructor to assign initial values of Pet_Id as 1, Pet_Name as Chuckle, Animal_Type as Budgie, Color as White and age as 1. A function CAL_DIS(), which invokes the FEED_INFO() function and calculates the Discount as per the following conditions. After calculating the Discount invoke the SHOW_INFO() function to view the contents of the data members. (d) Consider the following C++ code and answer the questions from (i) to (iv): (4) Page 5 of 12

class PUBLISHER char Pub[12]; double Turnover; protected: void Register(); public: PUBLISHER(); void Enter(); void Display(); ; class BRANCH char CITY[20]; protected: float Employees; public: BRANCH(); void Haveit(); void Giveit(); ; class AUTHOR : private BRANCH, public PUBLISHER int Acode; char Aname[20]; float Amount; public: AUTHOR(); void Start(); void Show(); ; (i) Write the names of 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 class BRANCH. (iii) Write the names of all the members which are accessible from member functions of class AUTHOR. (iv) How many bytes will be required by an object belonging to class AUTHOR? 3. (a) Write an user defined function ABSOLUTE(), that takes an integer array, its size and an integer value to be searched from the array. If the integer value exist in the array, then the function should return the absolute value of the element and if the integer value does not exist in the array, then the function should return zero. (3) Note: Do not use library function to find the absolute value. (b) A company employees 500 salesmen to sell mobile phones. The sales figure for each salesman for each month in a year are held in a two dimensional array SALES[500][13] with the following structure: 0 1 2 3 4 5 6 7 8 9 1 11 12 Page 6 of 12

0 10323 100 11 25 24 89 1 10322 29 112 20 50 2 10432 12 10 98 3 10441 4 10337 5 10234 499 ( All cells are filled with integer data) You may assume that no two months have the same sales figure for a given salesman. The first column (index 0) of the array contain the 5-digit ID code for salesman and the remaining columns contain the sales figures with column two (index 1) being January sales, column three (index 2) being February sales and so on. Write an user defined function BEST(), which takes this two dimensional array as argument and returns the month number (1-12) in which any salesman achieved their maximum sales. (2) (c) An array A[2.5][-1.3] is stored in the memory along the row with each element occupying four words of storage. Find out the Base address and address of the element A[3][2], if the element A[3][3] is stored at the address 1300. Also find the total number of elements in the A array. (3) (d) Evaluate the following postfix expression showing the stack status: (2) 5, 3, +, 2, *, 6, 9, 7, -, /, - (e) Write a function PUSH() in C++ to perform insert operation on a dynamic stack, which contains FlightNo and Airlines. Consider the following definition of node while writing your C++ code: (4) struct MYNODE char FlightNo[10]; char Airlines[25]; MYNODE *Link; ; 4. (a) Observe the following program carefully and fill in the blanks using seekg( ) and tellg( ) functions : (1) #include<fstream.h> class school private : char scode[10],sname[30]; float nofstu; public: void INPUT( ); Page 7 of 12

void OUTPUT( ); int COUNTREC( ); //To count the number of records/objects in the file ; int school::countrec( ) fstream fin( scool.dat,ios::in ios::binary); //statement 1 int B= //statement 2 int C=B/sizeof(school); fin.close( ); return C; (b) Assume that a text file named ALPHA.TXT already contains some text written into it. But while writing into the file, the word are has been misspelled aer everywhere in the file. Write a function named Rectify() in C++ that reads the file ALPHA.TXT and corrects the word aer. (2) (c) Given a binary file MEMBERSHIP.DAT containing the records of the following type: struct MEM int Member_Id; char Member_Name[25]; char Paid; ; Write a function in C++, that reads the binary file MEMBERSHIP.DAT and set Paid as Y for all members whose Paid is N. (3) 5. (a) Layout the difference between Projection and Selection operation with respect to a relation. Also give an example to illustrate both. (2) NOTE: Answer the questions (b) and (c) on the basis of the following tables OIL_COMPANY and SHARE_DETAILS Table: OIL_COMPANY Headoffice Noofcountries Noofemployees Profits Code Americas 30 60000 8.0 AR Asia 4 35000 5.0 GZ Americas 22 40000 10.0 KO Americas 11 56000 4.0 OS Europe 51 102000 12.0 SD Americas 15 50000 11.0 SN Americas 31 70000 10.0 ST Europe 40 90000 9.0 Su Page 8 of 12

Europe 44 80000 15.0 WP Table: SHARE_DETAILS Code Companyname Share AR Arrows 39 KO Konoco 18.55 SD Sand Oil 15.3 WP Wasp Petrol 92.8 (b) Write SQL Queries: (4) i) Display the oil companies (Companyname) have a share price less than 50 or whose Profits were greater than 8.0. ii) Show the number of oil companies in each Headoffice. iii) Display Companyname, Headoffice, Profit, and Share of all oil companies. iv) List the details of oil companies whose Noofcountries less than 30 and Headoffice is Americas. (c) Write the output of the following SQL commands: (2) i) SELECT Headoffice FROM OIL_COMPANY WHERE Noofemployees= ( SELECT MIN(Noofemployees) FROM OIL_COMPANY); ii) SELECT COUNT(Headoffice), COUNT(DISTINCT Headoffice), COUNT(*) FROM OIL_COMPANY; iii) SELECT SHARE_DETAILS.Code, Profits, Headoffice FROM SHARE_DETAILS, OIL_COMPANY WHERE SHARE_DETAILS.Code=OIL_COMPANY.Code AND Share <20.0 AND Headoffice= Europe ; iv) SELECT Headoffice, Companyname FROM OIL_COMPANY OC, SHARE_DETAILS SD WHERE Noofemployees BETWEEN 50000 TO 60000 AND OC.Code=SD.Code; 6. (a) Obtain the Boolean Expression for the following logic circuit, which is made up of NAND gates only.(2) (b) State the DeMorgan s theorems and prove any one algebraically. (2) (c). Obtain the minimal form for the following Boolean expression using Karnaugh Map: (3) Page 9 of 12

F(A,B,C,D) = M1.M3.M4.M5.M6.M7.M12.M13 d) Convert the following Boolean expression into its equivalent Canonical Sum of Product form. (1) ( U + V + W ). ( U + V + W ). ( U + V + W ) 7. (a) Expand the following: (1) FDMA CDMA b) Five definitions are given on the left hand side of the diagram below. Five computer terms are shown on the right. By drawing arrows, connect each definition to the correct computer term. (1) (c) Name the following types of network topologies: Give one benefit and one drawback of networking computers. (1) Page 10 of 12

d) State the difference between Virus and Worm. (1) e) A football stadium has 25000 numbered seats. During the season, supporters can buy tickets for matches at one of five ticket offices located in the city. Supporters of the club are given a plastic card. The plastic card information that can be scanned into a computer. Supporters who attend more than five matches in a season are given a discount when they book for additional matches. The layout of the five ticket offices are given below: Office - 1 Office - 2 Office - 3 Office - 4 Office - 5 Office to Office distance (in KMs) From To Distance Page 11 of 12

Office 1 Office -2 15 Office 1 Office - 3 3 Office 3 Office 2 3 Office -1 Office 4 7 Office 2 Office -5 7 Office 5 Office 4 15 Office 3 Office 4 6 Office 3 Office 5 6 Number of Workstations in each ticket office Ticket Office Workstation 1 5 2 3 3 7 4 5 5 3 The Stadium Manager likes to link all the ticket offices, so that each ticket office workstation will display which seats have not yet been sold, and no two supporters will get the same seat. As a network expert answer the following questions : i) State the type of network used (1) Within the office Between the five offices ii) Identify two items of hardware that affect communication speed. Communication between the offices needs speeding up. Outline one way in which the use of communications between the offices improves the working efficiency of the business. (1) iii) Suggest the most appropriate office to install the server to keep track of the booking of tickets. (1) iv) Draw an office to office cable layout to connect all the offices in the most appropriate manner for efficient communication. (1) (f) What is proprietary software? (1) (g) Name any two mobile phone operating systems. (1) M. ARULDHAS SENIOR COMPUTER TEACHER INDIAN SCHOOL, AL GHUBRA MUSCAT Page 12 of 12