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

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

Question Bank Class XII Subject : Computer Science

COMPUTER SCIENCE

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

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

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

COMPUTER SCIENCE SAM PLE PAPER 2-HALF YEARLY EXAMINATION

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

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

Sample Paper, 2015 Subject: Computer Science Class 12 th

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

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

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

Sample Paper 2012 Class XII Subject COMPUTER SCIENCE (Theory)

DELHI PUBLIC SCHOOL BOKARO STEEL CITY

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

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)


CLASS XII GUESS PAPER COMPUTER SCENCE (083)

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

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

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

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

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

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

KENDRIYA VIDYALAYA SANGATHAN

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

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION

KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SPLITUP SYLLABUS FOR COMPUTER SCIENCE CLASS XII

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

KENDRIYA VIDYALAYA SANGATHAN

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

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

KENDRIYA VIDYALAYA IIT CAMPUS CHENNAI 36 COMPUTER SCIENCE. Half Yearly

vinodsrivastava.com Consider the following c++ code and answer the questions from (i) to (iv): class Personal protected: public:

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

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

Freshminds University Kolkata a) If a string MySTring holds a value 12345, then how will you convert

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

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

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

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

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

KENDRIYA VIDYALAYA SANGATHAN, KOLKATA REGION SPLIT-UP SYLLABUS ( ) CLASS XII : COMPUTER SCIENCE (THEORY)

COMPUTER SCIENCE (083)

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

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

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

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

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

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

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

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

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

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

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

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

Computer Science 2006 (Delhi)

KendriyaVidyalayaSangathan Kolkata Region

Autumn Break 2017 Exam Oriented Assignment Class-XII B, Computer Science

COMPUTER APPLICATION

CBSE 12th Computer Science Question Papers

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

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

COMPUTER SCIENCE Paper 1

SAMPLE QUESTION PAPER Subject: Computer Science Class: XII ( )

Answer key SUBJECT : COMPUTER SCIENCE Time : 3 hour 15 min Max. marks : 70

Sample Paper 2015 Class XII Subject Computer Science

INFORMATICS PRACTICES

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

CHAPTER 4 FUNCTIONS. 4.1 Introduction

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.

Chapter-11 POINTERS. Important 3 Marks. Introduction: Memory Utilization of Pointer: Pointer:

KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOMEWORK CLASS-XII INFORMATICS PRACTICES

Model Sample Paper 2015

2016 COMPUTER SCIENCE

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

CSCE 2014 Final Exam Spring Version A

Object Oriented Pragramming (22316)


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

Sample Paper Class XI Subject Computer Sience UNIT TEST II

Sample Paper 2012 Class XII Subject Computer Science

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

THE INDIAN COMMUNITY SCHOOL, KUWAIT

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

Largest Online Community of VU Students

ISC 2011 COMPUTER SCIENCE PAPER 1 THEORY

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

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

double d0, d1, d2, d3; double * dp = new double[4]; double da[4];

Short Notes of CS201

COMP combinational logic 1 Jan. 18, 2016

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

Answer key SUBJECT : COMPUTER SCIENCE Time : 3 hour 15 min Max. marks : 70

CS201 - Introduction to Programming Glossary By

Transcription:

DELHI PUBLIC SCHOOL, RANCHI Pre Board-II Examination 2018 Computer Science (083) Time: 3 Hours Class: XII Maximum Marks: 70 General Instructions: There are 08 Number of Questions, all in total. All Questions are mandatory unless alternative is provided. Use C++ programming Language where ever asked for. In answering DBMS, You should use MySQL Queries. Always keep margin at the left side of your answer script & clearly write the Question Number. Try to maintain the order of the questions during technically informative answering. Keep space and mark line-of-separation between two answers. Q.1.(a) In the time of DIGITIZATION in government policies, People talk about benefits of e-governance. But, these days, young generations are suffering from INFOMANIA as well. You, being an IT Student, mention your Role & Contribution for the Society in utilizing these two phenomenons properly. [2] (b) During the controversy of film Padmavati, Dipika managed Leisure time & has started learning C++, but confused in finding Legal Identifiers out of the following : Suggest her in selecting correct identifiers for successful execution of her program. New, friend, NoOfFilms, this, Num1, 3rdFloor, Float, class, this, enum, continue ; [2] (c) Observe the following program very carefully and write the names of those header files), which are essentially needed to compile and execute the following program successfully: [2] { char ch, STR[20] ; clrscr() ; cin>>str ; ch = toupper (STR[0] ); cout << setw(8)<< Bravo! ; cout << STR << Lets begin wid << ch; getch(); (e) Predict output of the following C++ code: (Assume all required header file) [2] class Calc { char Grade; int Bonus; public: Calc( ) { Grade = E ; Bonus = 0 ; void Down( int G) { Grade - = G; void Up (int G) { Level + = G ; Bonus + + ; void Show( ) { cout<<grade << % <<Bonus<<endl ; ; { Calc C; C.Down(2); C.Show( ); C.Up(7); C.Show( ); C.Down(2); C.Show( ); (d) Observe the following C++ code very carefully and rewrite it after removing any/all syntactical errors: [2] Include < iostream.h> { int R; W =90; while W>60 ; { R =W-50; Switch (W) case 2: cout << Low Level <<Endl; case 3: cout << Middle <<endl ; case 2: cout << High <<endl ; (f) Predict output of the following C++ code: (Assume all required header file) [2] int main( ) { int fun(int, int * ); int a[5] = {2,4,6,8,10 ; int i, b = 5; for ( i=0; i<5 ; i++) { fun (a[ i ], &b ); cout <<a[ i ] << \t << b << \n ; return 0 ; void fun ( int p, int *q ) { P = * (q) += 2 ;

(g)write the output of the following program code ( Include all required header files): [2] void main ( ) { int A[ ] = {10, 12, 15, 17, 20, 30 ; for (int i=0; i < 6 ; i++) { if (A[i]%2 == 0) A[i] /=2 ; else if ( A[i] %3 == 0 ) A[i] /= 3; if (A[i]%5 == 0 ) A[ i ] /= 5 ; for ( i = 0 ; i < 6 ; i++ ) cout << A[ i ] << # ; (h) Find the expected value of MyAnk from the options: (Add all required header files for successful compilation and then Justify your Answer). [2] { randomize( ); int Ank[ ] = { 25, 20, 34, 56, 72, 63, MyAnk ; MyAnk = Ank[ 2 + random(2) ]; cout << MyAnk << endl; Options: (i) 25 (ii) 34 (iii) 29 (iv) None of these Q.2. (a) Mention any Two Situations, when a Copy Ctor is automatically invoked. [1] (b) Write a program defining a class StudRes to simulate Result preparation System for 5 students. The data available for each student includes RollNo, SName and Marks in 3 subjects. Keep the data members in private mode and three member functions: GetVal ( ), CompteRes ( ) and ResultPrnt ( ) in public access mode. Use of SRO will be appreciable. The percentage marks and grade are to be computed from this information. The Percentage Marks are the Average Marks and the Grade is calculated as given below: [3] Percentage Marks: Grade: < 40 F >=40 < 85 B >=85 < = 100 A (c) Answer the questions (i) to (iv) based on the following code: [4] class Dolls { char DCode[5]; protected : float Price; void CalcPrice ( float ); public: Dolls( ) ; void DInput ( ); void DShow( ); ; class SoftDolls : public Dolls { char SDName[20] ; float Weight ; public : SoftDolls ( ) ; void SDInput( ); void SDShow( ); ; class ElectronicDolls : public Dolls {char EDName[20] ; char BatteryType[10] ; int Batteries; public: Electronic Dolls( ) ; void EDInput( ); void EDShow( ); ; (i) How many bytes will be required by an object of the class ElectronicDolls? (ii) Which type of Inheritance is shown in the above example? (iii) Name all the member functions accessible by an object of the class ElectronicDolls. (iv) Name all the data members accessible from member functions of class ShoftDolls. Q.3 (a) Write the definition of a function: SwpChng ( int A[ ], int Size ), which accepts an integer array and its size as arguments and swap the elements of every Even location with its following Odd Locations: Example: If an array of nine integers are as: 2, 4, 1, 6, 5, 7, 9, 23, 10; Then the function should rearrange the array as: 4, 2, 6, 1, 7, 5, 23, 9, 10; [2]

(b) An array AR[1..15][1..10] is stored in the memory with each of the element occupying 4 bytes of space. Assuming the base address of array VAL is 1500, Calculate the memory location for the element VAL[12][9], when the array is stored as (i) Column wise and (ii) Row wise. [3] (c) For a Circular Queue (CQ) with 5 memory location, Show diagrammatically the status of CQ with Front & Rear, after each of these operations: A, B and C Inserted ; A deleted ; D & E Inserted ; B & C deleted ; F Inserted and D deleted ; G, H Inserted ; E, F deleted ; K Inserted ; G, H deleted and K Deleted. [2] (d) Evaluate the following Postfix expression showing the stack contents. [2] true, false, true, false, NOT, OR, true, OR, OR, AND ; ( Check Manually as well ). (e) Write the definition of a function to perform PUSH ( ) operation in a dynamically allocated STACK considering the following: struct COPY { int X, Y; COPY *link; ; [3] class STACK { COPY *Top; public : STACK ( ) { Top = NILL ; void PUSH ( ) ; void POP ( ) ; ~STACK ; ; (f) State Pre conditions under which Binary Search Technique is applicable. [1] Q.4 (a) Name two member functions of ofstream class. [1] (b) How are Text Files different from Binary Files in C++. Provide examples also. [2] (c) Write a function definition for CHAR4 ( ) function to read the content of text file Test.TXT, and display all those words, which has four characters in it. [2] If the contents of the File is : When She was a child, she used to play in the garden. Those days were golden. The function should display : When used play days were Q.5. (a) Explain Cartesian Product of two Relations. Give example too. Write symbol of JOIN. [2] (b) What is the difference between Cardinality and Degree? Show by example also. [2] Q.6.Consider the following tables GAME and PERSON and answer (b) and (c): [6] GAME PERSON GCode GameName Number FEE S_Date 11 CaromBoard 2 6000 23-jan-2014 12 Badminton 2 13000 12-dec-2013 13 TableTennis 4 9000 14-feb-2014 14 Chess 2 10000 01-jan-2014 15 LawnTennis 4 26000 19-mar-2014 PCode Name GCode 1 Aamir 11 2 Sindhu 15 3 Jignesh 11 4 Nihir 13 5 Salman 14 (b)write SQL commands for the following: (i) To display the name of all Games with their Fees & Gcodes. (ii) To display details of those game which are having Fee less than 10001. (iii) To display the content of the GAME table in descending order of Fees. (iv) To display Name, GameName of the person whose GCode is 15. (c) Give the output of the given queries: (i) SELECT COUNT(DISTINCT Number) FROM GAME; (ii) SELECT MAX(S_Date), MIN(S_Date) FROM GAME; (iii) SELECT AVG(Fee), MAX(Fee) FROM GAME; (iv) SELECT DISTINCT GCode FROM PERSON;

Q.7. (a) State and verify DeMorgan s Law by algebra. Also check by Truth Table. [2] (b) Which Gates are called Universal gates and why? Represent : ( X +Y + Z ). ( X +Y + Z ). ( X+Y+Z ) in NOR to NOR Logic Network. [2] (c) Derive Canonical POS & SOP Expressions for Boolean function F, represented by truth table: [1] A B C F(A,B,C) 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 0 (d) Suppose Jharkhand Government has planned to connect Ranchi Tata through Railway. According to their proposal, there are Four parallel Railway tracks at a place. It is desired to design a Logic circuit, which can give a signal when TWO or more trains pass together at any given time. Draw the Truth Table for this Assignment. Then Draw a Logic Circuit after simplifying Boolean expression using Maurice Karnaugh - Map. [3] Q.8. (a) An educational organization DPS Ranchi, is planning to set up its another campus at Dumka, with its Head office at Ranchi. The Dumka campus has 4 main buildings ADMIN, SCIENCE, BUSINESS and ARTS. You, as a network expert have to suggest the best network related solutions for their problems raised in (i) to (iv), keeping in mind the distances between the buildings and other given parameters. [4] RANCHI DUMKA Head Office Campus ADMIN SCIENCE BUSINESS ARTS Shortest distances between various buildings: ADMIN to SCIENCE ADMIN to BUSINESS ADMIN to ARTS SCIENCE to BUSINESS SCIENCE to ARTS BUSINESS to ARTS RANCHI Head Office to DUMKA Campus 65 m 100 m 60 m 75 m 60 m 50 m 290 Km No. of Computers installed at various buildings ADMIN 105 SCIENCE 85 BUSINESS 40 ARTS 14 RANCHI Head 22 Office

(i) Suggest the most appropriate location of the server inside the DUMKA Campus (out of the 4 buildings), to get the best connectivity for maximum number of computers. Justify your answer (ii) Suggest and draw the cable layout to efficiently connect various buildings within the DUMKA campus for connecting the computers. (iii) Which hardware device will you suggest to be procured by company to be installed to protect and control the internet uses within the campus? (iv) Which of the following will you suggest to establish the online face-to-face communication between the people in the Admin Office of DUMKA campus and RANCHI Head Office? (a) Text Chat (b) E-Mail (c) Cable TV (iv) Video Conferencing (b) Out of followings, which is the fastest (i) Wired and (ii) Wireless medium of Communication: Infrared, Coaxial Cable, Ethernet Cable, Microwave, Optical Fiber? [1] (c) Discuss the terms: GNU and W3C. [1] (d) What is meant by Bandwidth? What is its Role in a Network?. [2] (e) What is the popular 80 20 Rule of Network Design? Explain. [2] # # # # #