Sample Paper I Class XII

Similar documents
COMPUTER SCIENCE Sample Paper I

Computer Science (Code 083) Sample Paper with Solution Set II

Computer Science (Code 083) Sample Paper with Solution Set II

Kendriya Vidyalaya Sangathan MODEL QUESTION PAPER - 2 Class-XII Subject: Computer Science (083) Time 3 hrs MM 70

COMPUTER SCIENCE (Theory) - Class XII Sample Question Paper II Subject Code - 083

COMPUTER SCIENCE (Theory) - Class XII Marking Scheme

Sample Paper 2012 Class XII Subject COMPUTER SCIENCE (Theory)

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

ASSIGNMENT CLASS : XII ( ) COMPUTER SCIENCE

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

CLASS XII GUESS PAPER COMPUTER SCENCE (083)

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

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

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

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

KENDRIYA VIDYALAYA SANGATHAN


KENDRIYA VIDYALAYA SANGATHAN

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

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

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

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

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

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

DELHI PUBLIC SCHOOL BOKARO STEEL CITY

Computer Science 330 Assignment

Question Bank Class XII Subject : Computer Science

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

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

COMPUTER SCIENCE 1998 (Delhi Board)

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

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

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

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

Index for C++ Programming

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:

COMPUTER SCIENCE

Sample Paper 2015 Class XII- Comm Subject INFORMATICS PRACTICES. Q1 a) Rewrite the code using While Loop? 2

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

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

Home Assignment for Class XII(Summer Vacation) Subject: CS Based on Library Functions ( 1 Mark)

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

Sample Paper 2015 Class XII Subject Computer Science

COMPUTER SCIENCE 2002 (Delhi Board)

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

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


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

ios ifstream fstream

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

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

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

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION

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

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

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

KendriyaVidyalayaSangathan Kolkata Region

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

COMPUTER SCIENCE PAPER 1

Sample Paper, 2015 Subject: Computer Science Class 12 th

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

COMPUTER SCIENCE Paper 1

Government of Karnataka SYLLABUS FOR SECOND PUC - COMPUTER SCIENCE (41) SUB-UNITS

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

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

KENDRIYA VIDYALAYA SANGATHAN DEHRADUN REGION 1 st Pre-Board Examination, Class XII Computer Science(083) Time: 3 Hours Max.

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 Pragramming (22316)

Assignment 3 Class XII (Computer Science 083) Topic Array

SCIENCE ENTRANCE ACADEMY III PREPARATORY EXAMINATION SCHEME OF VALUATION

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

Downloaded from

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

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

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

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

Computer Science 2006 (Outside Delhi)

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

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

CLASS XII ( ) (Theory)

KENDRIYA VIDYALAYA SANGATHAN (KOLKATA REGION) Second Pre Board Examination ( ) COMPUTER SCIENCE (Theory) Class-XII Marking Scheme

(Structured Query Language)

COMPUTER SCIENCE (083)

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

Computer Science 2006 (Delhi)

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

Suggestive List of C++ Programs

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

5. (a) What is secondary storage? How does it differ from a primary storage? (b) Explain the functions of (i) cache memory (ii) Register

COMPUTER SCIENCE. Paper 1

Model Sample Paper 2015

VALLIAMMAI ENGINEERING COLLEGE

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

COMPUTER SCIENCE (083)

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

COMPUTER APPLICATION

Sample Paper 2012 Class XII Subject Computer Science

Transcription:

Sample Paper I Class XII. (a) Define default parameter and constant parameter of a C++ function with the help of suitable examples. (b) Name the header files which include the following C++ functions : (i) cos( ) (ii) isupper( ) (iii) abs( ) (iv) strcmp( ) (v) isalnum( ) (vi) gets( ) (vii) fabs( ) (viii) strlen() (c) Find out the error in the following program segment : (i) const int *pc; (ii) int val =0; *pc=0; int &pc; (*pc)++; pc=val; (d) What will be the output of the following program segments : (i) int i = 0; (ii) char ch= a ; cout<<i<<i++<<++i; ch=(ch= b )? ch : b ; cout<<ch; [] [] [] (e) (f) Give the output of the following program # include <iostream.h> int a=3; [] void demo(int &X, int Y, int *Z) a+ = ++X; Y * = a; *Z= a + Y; cout<<a<< <<X<< <<Y<< << <<*Z<<endl; [3] void main( ) int a =, b=5; demo(::a, a, &b); cout<<::a<< <<a<< <<b; Write a C++ program to print the sum of prime numbers from to N with the help of the user defined function sumprim( ). [OR] A C++ function sumfact( ) is declared with two arguments float and int n and it returns the a value of double. The function is said to find the sum of the following series - u + u u + u u (-) n u! 3! 4! 5! n! Write a complete program to define the function and invoke the function from main( ). (a) What do you mean by static data member of a class. Explain the characteristics. (b) What is a friend class. How is it different from friend Functions. (c) Write a C++ program using classes and object to simulate result preparation system of 0 students. The data member of each student includes: Roll number, Name, Marks of 3 subjects (00 marks each) Define Member function to : (i) Initialize the Object (ii) To Calculate Percentage (iii) To award grade according to the following rule : Average Marks Grade < 50 F >50 & < 60 D >60 & < 75 C >75 & < 90 B >90 & <= 00 A Write an Interactive program to implement the above class (d) Consider the following declaration and answer the question given below : Class Zoo char location[0]; protected : int no_of_animals; public : [4] [] [] [4]

void inputdata(char, int); void outputdata(); ; Class animal : Protected Zoo int tail; protected : int legs; public : void readdata(int,int); void write_data(); ; Class carnivorous : Private Animal int paws; public : void fetchdata(int); void displayed(); ; (i) Name the base class and derived class of class Animal (ii) Name the data member(s) that can be accessed from function displayed( ) (iii) Name the data member(s) that can be accessed by the objects of carnivorous class (iv) Is the member function outputdata( ) accessed to the object of Animal class. 3.(a) How is the computer memory allocated to a two- dimension array (b) Write a function in C++ to shift the negative numbers to the left and positive to right. (c) Define two way Linked List (d) Evaluate the following postfix expression and show the contents of stack after execution of each step : True, false, true, false, NOT, OR, true, OR, OR, AND. (e) If the Array B[][8] is stored Column wise and B[][] is stored at 04 and B[3][3] at 084, find the address of B[5][3]. (f) Explain the use of Header node in a Circular Queue. (g) Write a user defined function to display the sum of Diagonal of a -D Array of size M x M (h) Give the necessary declaration of a Linked List implemented Queue containing float type elements. Also write a user defined function to delete a float type number from the Queue. 4. (a) Differentiate between the followings : (i) ios ::ate and ios::app (i) ios:: nocreate and ios::noreplace (b) A data file contains only integer values which of the following functions Read ( )or Get( ) will you use. Illustrate (c) Write a C++ program that reads a text file and creates another file that is identical except that every sequence of consecutive blank space is replaced by a single blank space. 5. (a) Define the following terms : (i) Candidate Key (ii) Cartesian Product (iii) Domain [3] (iv) Cardinality (v) Degree (vi) Tuple (b) Differentiate between the Followings : [Any Two] (i) Hierarchical and Network model (i) Column Constraints and Table Constraints (iii) Drop Table and Drop View Write the SQL Commands for (c) to (l) on the basis of the Table given Below : STUDENT [] FIELD NAME CLASS SEX AGE ROLL TYPE CHAR(0) NUMBER() CHAR() NUMBER() NUMBER() (c) (d) (e) (f) (g) (h) To Alter the structure of the student table by adding a new column Category To display the names of all the students whose names include the string Kumar To display data of all the students sorted by their class, sex and roll. To List the minimum and maximum age of each class To display the details of all the students in reverse order of age from the student To display the names of all the students whose age is greater than the student having minimum age. [½] [½] [½] [½] [½] [½] [½] [½] [½] [½]

(i) To Display the names of all the students in descending order class wise (j) To display the details of all the Non-male students (k) To delete a row from the table of the student having age between and. (l) To insert a new row in the Student table and fill data 6. (a) State Commutative Law. Verify one of the commutative Law using Truth Tables. (b) Give the dual of the expression X + 0 = X for each X (c) Prove AB + A C = (A + C) (A + B) algebraically (d) Draw the Logic circuit diagram for the Boolean expression below with the help of NAND gates only F(X,Y,Z) = X Y + Y Z (e) Prove that the dual of XOR is equal to its compliment (f) Obtain the simplified form F(a,b,c,d) = (,,4,5,7,8, 0,3,5) (g) Draw the Truth table and Circuit Diagram for Full Adder (h) Write the SOP and POS form of the function F(X,Y,Z). Its Truth table is given X Y Z F 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7. (a) Compare CSMA/ CD and Token Passing (b) what is the difference between Bridge and Gateway (c) Explain the concept of Client server processing technique used in LAN. (d) Differentiate between BUS and RING topology (e) Write short notes on the following: (i) Lynx (ii) Archie (iii) Gopher 3

SAMPLE QUESTION PAPER II COMPUTER SCIENCE (083) CLASS XII Maximum Marks : 70 Duration : 3 Hours All the questions are compulsory Programming Language : C++. (a) Differentiate between a run-time error and syntax error. Give one example of each. (b) Explain briefly the difference in privately and publicly derived visibility modes. (c) Find out the syntactical errors in the C++ program below : # include < iostream. h> void main ( ) int Ch = 9, Sch = 90; char S [, ]; ifch<=9 cout«ch; for (int X = 0; X < ; X++) for (int Y = 0; Y < ; Y ++) getch( ); if(y==0) S[X][Y] = A ; else S [XI[Y] = 'B' ; cout<< S[X] [Yl; (d) Give the output of the following program : # include < iostream h> void sumfn (int last) auto int sum = 0; static int sum =0; for (int i last; i > 0; i--) sum + = i; sum + = sum ; cout<< sum << " " <<sum <<endl; void main () for (int i= ;i<;i++) sumfu (i); (e) What is the output of the following program : void str_func (char*s) char * n = "INDIA" ; *s= n; void main ( ) char * str = "BHARAT"; str_func (& str); cout «str «endl; (f) What is function overloading? Use the concept of function overloading to computer's area a of a rectangle (given length of two sides), area of a triangle (given length of three sides and use Hero's formula) and area of a circle (given length of a radius). 4. (a) What is a copy constructor? What do you understand by constructor overloading? (b) Write a C++ program using classes and objects to stimulate result preparation system for 0 students. The data available for each student includes Roll No. Name and Marks in three subjects (Maximum Marks in each is 00) Define a member function to (i) initialise the object (ii) to calculate average marks (iii) to award grade according to the following rule : Average Marks Grade <50 'F' >50&<60 >60&<75 >75&<90 >90&<00 'D' 'C' 'B' 'A' 4

Write an interactive program to implement the above class. 4 (c) Consider the following declarations and answer the questions given below : Class Zoo char location [0]; protected; int no_of_animals public: void inputdata (char, int); void outputdata (); ; Class animal: Protected Zoo int tail; protected int legs; public: void readdata (int, int); void write data (); ; Class carnivorous : Private animal int paws_size; public : void fetchdata (int); void displayed (); ; (i) Name the base class and derived class of the class animal. (ii) Name the data memiber(s) that can be accessed from function display data. (iii) Name the data member (s) that can be accessed by an object of carnivorous class. (iv) Is the member function outputdata( ) accessible to the objects of animal class '? 4 3. (a) How a computer memory is allotted for a two-dimensional array? (b) What does 'rear signify in a queue? If in a queue, the 'rear' points to the 'front', what is the queue called? (c) Write a user defined function in C++ to display the sum of row elements of a two-dimensional array M [5] [6] containing integers. (d) Write the sequence of steps required to sort an array NUM-ARR of 5 elements given below with the help of Insert son. Index 0 3 4 Number 3 34 45 (e) Evaluate the following postfix expression using a stack and show the contents of stack after execution of each operation. true, false, true, false, NOT OR, true, OR, OR, AND. (f) Give the necessary declaration of a linked list implemented queue containing float type elements. Also write a user defined function in C++ to delete a float type number from the queue. 4 (g) For a circular queue with 5 memory locations show diagrammatically the status of the queue after each of the following operations. (i) A, B and then C inserted. (ii) A deleted (iii) D and E inserted (iv) B and C deleted (v) F inserted and D deleted (vi) G and H inserted (vii) E and F deleted (viii) K inserted. 4. (a) A data file contains only integers values. Which of the following functions (i) read() (ii) get() would you use to read data from the file. Justify your answer. (b) Write a program in C++ that will open a data file containing names of some states in India and their capitals for input. (i) (ii) Write an interactive menu driven program to do the following : Determine the state if the capital is given. Determine the capital if state is given. (iii) Quit the program. 4 5. (a) Differentiate between SQL commands DROP TABLE and DROP VIEW. 5

(b) Write down any two disadvantages of using a database system. (c) What is the difference between WHERE and HAVING clauses? (d) Give the syntax for the SQL command. ALTER TABLE Write SQL commands for (d) to (i) on the basis of following table : TABLE: STOCK Item_code Item_name Cost Min_stock Cur_stock COLUMNS char(0) char(0) number(7,) number(4) number(4) (e) Create the above table with the following columns (f) Insert the following data in the table Item_code C9 item_name Vicco powder Cost 8.0 min_stock 0 cur_stock 0 (g) List all items whose current stock is less than minimum stock (h) Increase the cost of all items by 5 percent. (i) Modify the table so that the price of the item-code C9 will be Rs..50 6. a) What is a truth table? Explain its significance. b) Prove AB + A'C = (A + C) (A' + B) algebraically. c) Write the dual of Boolean expression XY + YZ = d) Draw a logic gate circuit diagram for the Boolean expression below with help of NOR gate only. F (X, Y, Z) = X'Y + Y'Z e) State idempotent laws of Boolean Algebra. f) Use K-Map to simplify a'b' a'b ab ab' c' c g) Draw the Block diagram of a full adder. 7.a) Give the full forms of (i) FTP and (ii) FM. b) Define switching technique. What are the different switching techniques used to provide communications between computers? c) What are repeaters? d) How is Telnet service of Internet useful? 6

SAMPLE QUESTION PAPER III SAMPLE QUESTION PAPER COMPUTER SCIENCE (083) CLASS XII Maximum Marks : 70 Duration : 3 Hours All the questions are compulsory Programming Language : C++.a) Differentiate between a run-time error and syntax error. Give one example of each. b) Name the header file, to which following built-in function belong to : i) strcpy() ii) isalnum( ) iii) sqrt() iv) puts() c) Find syntax error(s), if any, in the following program : #include <iostream.h> void Main() const MAX = 0; int a, b; cin «a» b; if (a>b) MAX = a ; for (x = 0, x<max ; x++) cout «x; d) Give the output of the following program : #include <iostream.h> void display(char *s) for (int x = 0; s[x]>0; x++) for (int y=0; y<=x; y++) cout <<s[y]; cout«endl; void main() char *t= "LAND"; display(t); e) Give the output of following program #include <iostream.h>. int a =l0; void main( ) void demo(int &, int, int *); int a = 0, b = 5; demo(::a, a, &b); cout <<::a << a << b << endl; void demo(int &x, int y, int *z) a += x; y *= a; *z = a + y; cout << x << y << *z << endl; 7

f) A C++ function seriesum() is declared with two arguments, double x and int n and it returns a value of type double. The function is used to find the sum of following series : + x + X + X 3 +.. X n --- --- ---! 3! N! Write a complete program in C++ to define the function and invoke the function from main().. a) Differentiate between a data type struct and a data type class in C++. What is the need for a constructor function in an object. b) Consider a class student with the following specification : Data members of class student name (0 characters) roll ( digit) avg (floating point with decimal places) Member function of class student getdata() function to accept values for the data members showdata() function to display the data members on the screen Declare the class student. Define an array objarr of type student with 0 memory locations. Write a function in C++ to initarray( ), initialize the array objarr. c) class classa protected: inty; private: void processval( ); public: void getval(int); void putval( ); ; class classb int x; protected: int z; public: void getdata(int, int); void showdatao; ; class classc :, public classa, private classb int data; public: void showvalue(void); ; i) Name member functions inherited by classc. ii) Name base class for classb. iii) Name the class(es) that can access processval( ) declared in classa. 8

3. a) Suppose A, B, C are arrays of integers of size M, N and M+N respectively.the numbers in array A and B appear in ascending order. Give the necessary declaration for array A, B and C in C++. Write a user defined function in C++ to produce third array C by merging arrays A and B in ascending order. Each elements of arrays A and B should be visited only once. b) Each element of an array DATA[0][50] requires 4 bytes of storage. Base address of DATA is 000, determine the location of DATA[0][0] when the array is stored as (a) Row major (b) Column major. c) Is it possible to apply Binary search for any sorted data? Justify. d) Differentiate between a LIFO list and FIFO list. e) Evaluate the following postfix expression using a stack and show the contents of the stack after execution of each operation : true, false, true, false, NOT, OR, true, OR, OR, AND f) Give the necessary declaration of a linked implemented queue containing integers. Write a user defined function in C++ to insert an integer in the queue and delete an-integer from the queue. 4. a) A data file contains only integers values. Which of the following functions : (i) read( ) (ii) get() will you use to read data from the file. Justify your answer. b) Declare a structure in C++ telerec, containing name (0 characters) am telephone number. A binary data file "TELE.DAT" stores data of the type telerec Write functions in C++to do the following : i) To append records in the file. ii) Display the name for a give telephone number. If the telephone number does not exit then display error message "Record not found". 5.a) Differentiate between SQL commands DROP TABLE and DROP VIEW. NOTE :Write SQL commands for (b) to (g) and write the outputs for (h) on the basis of table STUDENT Table : STUDENT 9

No Name Stipend Stream AvgMark Grade Class Karan 400.00 Medical 78.5 B B Divakar 450.00 Commerce 89. A C 3 Divya 300.00 Commerce 68.6 C C 4 Arun 350.00 Humanities 73. B D 5 Sabina 500.00 Nonmedica 90.6 A A 6 John 400.00 lmedical 75.4 B B 7 Robert 50.00 Humanities 64.4 C A 8 Rubina 450.00 Nonmedica 88.5 A A 9 Vikas 500.00 Nonmedica 9.0 A A 0 Mohan 300.00 Commerce 67.5 C C b) Select all the Nonmedical stream student from STUDENT. c) List the names of those students who are in class sorted by Stipend d) List all students sorted by AvgMark in descending order e) Display a report, listing Name, Stipend, Stream and amount of stipend received in a year assuming that the Stipend is paid every month. f) To count the number of students with Grade "A" g) To insert a new student in the STUDENT table and fill all the column with some values. h) Give the output of following SQL statement: i) Select MIN(AvgMark) from STUDENT where AvgMark< 75 ii) Select SUM(Stipend) from STUDENT where Grade = "B" iii) Select AVG(Stipend) from STUDENT where Class = "A" iv) Select COUNT(DISTINCT). 6.a) State De'Morgan's Laws. Verify one of the laws using truth tables. b) Prove AB + A'C = (A + C)(A' + B) algebraically. c) Give the complement of the Boolean expression (X + Y)(X' + Y') d) Obtain a simplified form for a Boolean expression, F(a,b,c,d)=E (,, 3,,, 4,5) using Karnaugh Map e) Draw the truth table for a Full-adder. f) Draw the digital circuit diagram for the Boolean function F(A, B, C) = (A'+ B) (B + C') making use of NOR gates only. g) Express in the Product of Sums form, the Boolean function F(A,B,C), the truth table for which is given below? 7. a) What are repeaters? A B C F 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 b) Name the device used to connect a computer to a telephone line. 0

c) Draw a diagram showing five computer nodes connected to a server in i) Ring topology ii) Star topology d) Which of the following medium provides the maximum bandwidth? i) Optical fibre ii) iii) Thin ethernet Arcnet e) What is Mosaic used for?

SAMPLE QUESTION PAPER IV COMPUTER SCIENCE (083) CLASS XII imum Marks : 70 Duration : 3 Hours All the questions are compulsory Programming Language : use C++.a) Write any two differences between Procedural programming and Object Oriented Programming. b) Name the header files which include the following C++ functions: i) gets() ii) isupper( ),.(iii) strcmp() (iv) abs() c) Find out the syntactical errors in the C++ program. #include <iostream.h> void main() int Ch=9,Sch=90; char S[,]; ifch<=9 cout<<ch; for (int x=0;x<;x++) for (int y=0;y<;y++) if(y==0) S[x][y]="A"; else S[x][y]='B'; cout>>s[x][y]; getch(); d) Give the output of the following program segment: char*s="object"; int L=strlen(S); for (int C=0;C<L;C++) if (islower(s[c])) S[C]=toupper(S[C]); else if (C%==0) S[C]='E'; else S[C]=tolower(S[C]); cout<<"new Message :"<<S; e) Give the output of the following program: #include <iostream.h> int &max(int &x, int &y) if(x>y) return (x); else return (y); voidmain() inta=0, B=3; max(a,b)= -; cout<<" A="<<A<<" B="<<B<<endl; max(b,a)=7;

cout<<" A="<<A++<<" B="<<B-- <<endl; max(a,b)=3; cout<<" A="<<A<<" B="<<B<<endl; f) Write a program to print sum of prime numbers from to N with the help of a user defined function sumprim().. a) Write a program to implement a class STUDENT having following members: Data members. Name of the student. Marks of the two subjects Member functions. To assign initial values. To compute total and average 3. Display the data b) Write the output of the following program: #include <iostream.h> class Adam public: void print(double) cout<<"double"<<endl; void print(int) cout<<"lnt"<<endl; void print(void *) cout<<"void*"<<endl; ; void main() Adam Eve; char Ch='A'; int number=66; float F =3.4; char st[]="a string"; Eve.print(Ch); Eve.print(FI); Eve.print(st); Eve.print(number); c)consider the following class declarations and answer the questions (i) and (ii). class Mydata 3

protected: int Data; public: void Get_Mydata(int); void Manip_data(int); void Show_data(int); ; class Mydata protected: int Data; public: void Get_Mydata (int); void Show_data (int) ; ; class Person : public Mydata, Mydata public: void Show_data(void); ; (i) Name the derived class and base class. (ii) List the data and functions inherited by the class Person. 3 a) What is a Pointer? b) What is a queue? c) Write the sequence of steps required to sort an array NUMARR of 5 elements given below with the help of Insert Sort I n d e x 0 3 4 N u m a r r 3 3 4 45 d) ARR Is a one dimensional array on integers arranged in ascending order. Write a function in C++ to SEARCH for a data SDATA from ARR with the help of Binary Search. If the SDATA is present in the array then function should return the position of the SDATA or - otherwise. e) A two dimensional array X[5][4] is stored row-wise in the memory. The first element of the array is stored at location. Find the memory location of X[3][] if the each element of array requires 4 memory locations. f) Write an equivalent Postfix expressions for the Infix expressions given below: (i) A+B-D/X (ii) (X+Y)/(Z*U)-R g) Consider the following sequence of numbers,,3,4 are supposed to operated through a stack to produce the following sequence of numbers,,4,3. List the push and pop operations to get the required output. 4. a) What do you understand by stream? 4

b) A binary file "EMPLOYEE. DAT" containing EMPNO (employee number), WRATE (hourly wage rate), NOH (number of hours worked/week) fields. Write a C++ function to read each record, compute weekly wage as WRATE*NOH and display EMPNO, WRATE, NOH, WRATE*NOH. 5. a) Differentiate between CREATE TABLE and CREATE VIEW commands in SQL. NOTE: Write SQL commands for (b) to (g) and write outputs of SQL commands given in (h) with the help of table shown below: Table: LIBRARY No Title Author Type Pub Qty Price Data Structure Lipschutz DS McGraw 4 7 Computer Studies French FND Gafgotia 75 3 Advanced Pascal Schildt PROG McGraw 4 350 4 Dbase dummies Palmer DBMS PustakM 5 30 5 Mastering C++ Gurewich PROG BPB 3 95 6 Guide Network Freed NET ZPress 3 00 7 Mastering Foxpro Seigal DBMS BPB 35 8 DOS guide Norton OS PHI 3 75 9 Basic for beginners Morton PROG BPB 3 40 0 Mastering Window Cowart OS BPB 5 b) Select all the PROG type published by BPB from Library. c) Display a list of all books with Price more then 30 and sorted by Qty d) Display all the books sorted by Price in ascending order e) Display a report, listing books id, current value and misplacement charges for each books in the above table. Calculate the misplacement charges for all books Price *.5 f) Count the number of books published by PHI g) Insert a new book in the Library table. Fill all the column with values. h) Give the output of following SQL commands on the basis of table Library : (i) Select MIN(Price) from Library where Price < 50 (ii) Select SUM(Price * QTY) from Library where QTY > 3 (iii) Select AVG(Price) from Library where Qty <3 (iv) Select COUNT(DISTINCT) 6. a) State and verify the DeMorgan's Law. (any one) b) Reduce the following Boolean expression with the help of Karnnaugh Map. F(U,V,W,Z)=Σ(0,,,3,,3,4,5) c) Draw a Logic Gate circuit diagram for the following Boolean expression with the help of NOR gate only: F(X,Y,Z)=X'Y+Y'.Z d) Prove the following Boolean identity algebraically. AB+AB'C=AB+AC e) Derive the Boolean expression for half adder circuit. f) Write the sum of products form for F(X,Y,Z) from the following Truth Table: A B C F 0 0 0 0 0 0 0 0 0 0 0 0 5

0 0 0 7. a) What is a router? b) What is the use of MODEM? c) Give the full form of WWW. d) A company wants to form a network on their six computers to a server within the company premises. Represent STAR and RING topologies diagrammatically for the above network. 6

SAMPLE PAPER V CLASS SUBJECT:-Computer Science (083) Max. Marks: 70 Duration: 3 Hours Note: All questions are compulsory.. (a) What is the difference between Object Oriented Programming and Procedural Programming? (b) Write the names of the header files to which the following belong: (i) frexp() (ii) isalnum() (c) Rewrite the following program after removing the syntactical errors (if any). Underline each correction. #include <iostream.h> struct Pixels int Color,Style; void ShowPoint(Pixels P) cout<<p.color,p.style<<endl; void main() Pixels Point=(5,3); ShowPoint(Point); Pixels Point=Point; Color.Point+=; ShowPoint(Point); (d) Find the output of the following program: 3 7

#include <iostream.h> void Changethecontent(int Arr[], int Count) for (int C=;C<Count;C++) Arr[C-]+=Arr[C]; void main() int A[]=3,4,5,B[]=0,0,30,40,C[]=900,00; Changethecontent(A,3); Changethecontent(B,4); Changethecontent(C,); for (int L=0;L<3;L++) cout<<a[l]<< # ; cout<<endl; for (L=0;L<4;L++) cout<<b[l] << # ; cout<<endl; for (L=0;L<;L++) cout<<c[l] << # ; (e) Find the output of the following program: #include <iostream.h> struct Game char Magic[0];int Score; ; void main() Game M= Tiger,500; char *Choice; Choice=M.Magic; Choice[4]= P ; Choice[]= L ; M.Score+=50; cout<<m.magic<<m.score<<endl; 8

Game N=M; N.Magic[0]= A ;N.Magic[3]= J ; N.Score-=0; cout<<n.magic<<n.score<<endl; (f) In the following program, if the value of N given by the user is 0, what maximum and minimum values the program could possibly display? #include <iostream.h> #include <stdlib.h> void main(). int N,Guessnum; randomize(); cin>>n; Guessnum=random(N-0)+0; cout<<guessnum<<endl; (a) What do you understand by Polymorphism? Give a suitable example of the same. (b) Answer the questions (i) and (ii) after going through the following program: class Match int Time; public: Match() //Function Time=0; cout<< Match commences <<end; void Details() //Function 9

cout<< Inter Section Basketball Match <<end; Match(int Duration) //Function 3 Time=Duration; cout<< Another Match begins now <<end; Match(Match &M) //Function 4 Time=M.Duration; cout<< Like Previous Match <<end; ; i) Which category of constructor - Function 4 belongs to and what is the purpose of using it? ii) Write statements that would call the member Functions and 3. (c) Define a class in C++ with following description: 4 Private Members a. A data member Flight number of type integer b. A data member Destination of type string c. A data member Distance of type float d. A data member Fuel of type float e. A member function CALFUEL() to calculate the value of Fuel as per the following criteria Distance Fuel <=000 500 more than 000 and <=000 00 more than 000 00 Public Members 0

A function FEEDINFO() to allow user to enter values for Flight Number, Destination, Distance & call function CALFUEL() to calculate the quantity of Fuel A function SHOWINFO() to allow user to view the content of all the data members (d) Answer the questions (i) to (iv) based on the following: 4 class CUSTOMER int Cust_no; char Cust_Name[0]; protected: void Register(); public: CUSTOMER(); void Status(); ; class SALESMAN int Salesman_no; char Salesman_Name[0]; protected: float Salary; public: SALESMAN(); void Enter(); void Show(); ; class SHOP : private CUSTOMER, public SALESMAN char Voucher_No[0]; public: char Sales_Date[8]; SHOP(); void Sales_Entry();

; void Sales_Detail(); i. Write the names of data members which are accessible from objects belonging to class CUSTOMER. ii. iii. iv. Write the names of all the member functions which are accessible from objects belonging to class SALESMAN. Write the names of all the members which are accessible from member functions of class SHOP. How many bytes will be required by an object belonging to class SHOP? 3. (a) Write a function in C++ to combine the contents of two equi-sized arrays A and B by computing their corresponding elements with the formula *A[i]+3*B[i]; where value i varies from 0 to N- and transfer the resultant content in the third same sized array. 3 (b) An array P[0][30] is stored in the memory along the column with each of the element occupying 4 bytes, find out the memory location for the element P[5][5], if an element P[][0] is stored at the memory location 5000. 3 (c) Write a function in C++ to perform Push operation on a dynamically allocated Stack containing real numbers. 4 (d) Write a function in C++ to find sum of rows from a two dimensional array. (e) Evaluate the following postfix notation of expression: True, False, AND, True, True, NOT, OR, AND

4. (a) Observe the program segment given below carefully and fill the blanks marked as Statement and Statement using seekg() and tellg() functions for performing the required task. #include <fstream.h> class Employee int Eno;char Ename[0]; public: //Function to count the total number of records int Countrec(); ; int Item::Countrec() fstream File; File.open( EMP.DAT,ios::binary ios::in); //Statement int Bytes = //Statement int Count = Bytes / sizeof(item); File.close(); return Count; (b) Write a function in C++ to count the number of alphabets present in a text file NOTES.TXT. (b) Write a function in C++ to add new objects at the bottom of a binary file STUDENT.DAT, assuming the binary file is containing the objects of the following class. 3 class STUD 3

public: ; int Rno; char Name[0]; void Enter()cin>>Rno;gets(Name); void Display()cout<<Rno<<Name<<endl; void Addnew() fstream FIL; FIL.open( STUDENT.DAT,ios::binary ios::app); STUD S; char CH; do S.Enter(); FIL.write((char*)&S,sizeof(S)); cout<< More(Y/N)? ;cin>>ch; while(ch!= Y ); FIL.close(); 5. (a) What do you understand by Primary Key & Candidate Keys? (b) Consider the following tables GAMES and PLAYER. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii) 6 Table: GAMES GCode GameName Number PrizeMoney ScheduleDate 0 Carom Board 5000 3-Jan-004 0 Badminton 000 -Dec-003 4

03 Table Tennis 4 8000 4-Feb-004 05 Chess 9000 0-Jan-004 08 Lawn Tennis 4 5000 9-Mar-004 Table: PLAYER PCode Name Gcode Nabi Ahmad 0 Ravi Sahai 08 3 Jatin 0 4 Nazneen 03 (i) To display the name of all Games with their Gcodes (ii) To display details of those games which are having PrizeMoney more than 7000. (iii) To display the content of the GAMES table in ascending order of ScheduleDate. (iv) To display sum of PrizeMoney for each of the Number of participation groupings (as shown in column Number or 4) v. SELECT COUNT(DISTINCT Number) FROM GAMES; (vi)select MAX(ScheduleDate),MIN(ScheduleDate) FROM GAMES; (vii) SELECT SUM(PrizeMoney) FROM GAMES; (viii) SELECT DISTINCT Gcode FROM PLAYER; 6. (a) State and algebraically verify Absorbtion Laws. (b) Write the equivalent Boolean Expression for the following Logic Circuit ` U V 5

(c) Write the SOP form of a Boolean function G, which is represented in a truth table as follows: P Q R G 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (d) Reduce the following Boolean Expression using K-Map: F(U,V,W,Z)= (0,,,4,5,6,8,0) 3 7. a) Define the term Bandwidth. Give unit of Bandwidth. b) Expand the following terminologies: (i) HTML (ii) XML c) Define the term firewall. d) What is the importance of URL in networking? 6

e)ravya Industries has set up its new center at Kaka Nagar for its office and web based activities. The company compound has 4 buildings as shown in the diagram below: Raj Building Fazz Building Harsh Building Jazz Building Center to center distances between various buildings is as follows: Harsh Building to Raj Building Raz Building to Fazz Building Fazz Building to Jazz Building Jazz Building to Harsh Building Harsh Building to Fazz Building Raj Building to Jazz Building 50 m 60 m 5 m 70 m 5 m 90 m Number of Computers in each of the buildings is follows: Harsh Building 5 Raj Building 50 Fazz Building 5 Jazz Bulding 5 e) Suggest a cable layout of connections between the buildings. e) Suggest the most suitable place (i.e. building) to house the server of this organisation with a suitable reason. e3) Suggest the placement of the following devices with justification: (i) (ii) Internet Connecting Device/Modem Switch 7

e4) The organisation is planning to link its sale counter situated in various parts of the same city, which type of network out of LAN, MAN or WAN will be formed? Justify your answer. f ) What is spam mail? g) What is firewall? -----xx----- PAPER - I Computer Science(083) Marking Scheme Max. Marks: 70 CLASS Duration: 3 Hours. (a) What is the difference between Object Oriented Programming and Procedural Programming? Answer: Object Oriented Programming Procedural Programming Emphasis on Data Emphasis on doing things (functions) Follows Bottom-Up approach in Follows Top-down approach in program design program design Data hiding feature prevents accidental Presence of Global variables change in data increase chances of accidental change in data Features like data encapsulation, Such features are not available polymorphism, inheritance are present (/ Mark for each point of difference to maximum of marks) (b) Write the names of the header files to which the following belong: (i) frexp() (ii) isalnum() Answer: (i) math.h (ii) ctype.h 8

(/ Mark for mentioning name of each header file) (e) Rewrite the following program after removing the syntactical errors (if any). Underline each correction. #include <iostream.h> struct Pixels int Color,Style; void ShowPoint(Pixels P) Answer: cout<<p.color,p.style<<endl; void main() Pixels Point=(5,3); ShowPoint(Point); Pixels Point=Point; Color.Point+=; ShowPoint(Point); #include <iostream.h> struct Pixels int Color,Style;; void ShowPoint(Pixels P) cout<<p.color<<p.style<<endl; void main() Pixels Point=5,3; ShowPoint(Point); Pixels Point=Point; Point.Color+=; ShowPoint(Point); (/ Mark for correcting each error) 9

OR ( Mark for identifying all the 4 errors with no correction) (d) Find the output of the following program: 3 #include <iostream.h> void Changethecontent(int Arr[], int Count) for (int C=;C<Count;C++) Arr[C-]+=Arr[C]; void main() int A[]=3,4,5,B[]=0,0,30,40,C[]=900,00; Changethecontent(A,3); Changethecontent(B,4); Changethecontent(C,); for (int L=0;L<3;L++) cout<<a[l]<< # ; cout<<endl; for (L=0;L<4;L++) cout<<b[l] << # ; cout<<endl; for (L=0;L<;L++) cout<<c[l] << # ; Answer: 7#9#5# 30#50#70#40# 00#00# ( Mark for each correct line of output) Note: Deduct ½ Mark for not showing : in the output Deduct ½ Mark for not considering endl (e) Find the output of the following program: 30

#include <iostream.h> struct Game char Magic[0];int Score; ; void main() Game M= Tiger,500; char *Choice; Choice=M.Magic; Choice[4]= P ; Choice[]= L ; M.Score+=50; cout<<m.magic<<m.score<<endl; Game N=M; N.Magic[0]= A ;N.Magic[3]= J ; N.Score-=0; cout<<n.magic<<n.score<<endl; Answer: TiLeP550 AiLJP430 ( Mark for each line of output) (f) In the following program, if the value of N given by the user is 0, what maximum and minimum values the program could possibly display? #include <iostream.h> #include <stdlib.h> void main() int N,Guessnum; randomize(); 3

cin>>n; Guessnum=random(N-0)+0; cout<<guessnum<<endl; Answer: Maximum Value: 9 Minimum Value: 0 ( Mark for writing correct minimum value) ( Mark for writing correct maximum value). (a) What do you understand by Polymorphism? Give a suitable example of the same. Answer: Polymorphism: It is a method of using the same operator or function (method) to work using different sets of input. Function overloading is one of the example of polymorphism, where more than one function carrying same name behave differently with different set of parameters passed to them. void Display() cout<< Hello! <<endl; void Display(int N) cout<<*n+5<<endl; ( Mark for definition) ( Mark for example) OR (Full marks for explaining both with the help of an example) (b) Answer the questions (i) and (ii) after going through the following program: 3

class Match int Time; public: Match() //Function Time=0; cout<< Match commences <<end; void Details() //Function cout<< Inter Section Basketball Match <<end; Match(int Duration) //Function 3 Time=Duration; cout<< Another Match begins now <<end; Match(Match &M) //Function 4 Time=M.Duration; cout<< Like Previous Match <<end; ; (i) Which category of constructor - Function 4 belongs to and what is the purpose of using it? Answer: Copy Constructor, it is invoked when an object is created and initialised with values of an already existing object. 33

( ½ Mark for mentioning Constructor ) ( ½ Mark for correctly answering to remaining part of the question) (ii) Write statements that would call the member Functions and 3. Answer: Match M; //for Function Match M(90); //for Function 3 ( ½ Mark for each example) (c) Define a class in C++ with following description: 4 Private Members a. A data member Flight number of type integer b. A data member Destination of type string c. A data member Distance of type float d. A data member Fuel of type float e. A member function CALFUEL() to calculate the value of Fuel as per the following criteria Distance Fuel <=000 500 more than 000 and <=000 00 more than 000 00 Public Members: A function FEEDINFO() to allow user to enter values for Flight Number, Destination, Distance & call function CALFUEL() to calculate the quantity of Fuel A function SHOWINFO() to allow user to view the content of all the data members Answer: class FLIGHT int Fno; char Destination[0]; float Distance, Fuel; void CALFUEL(); 34

public: void FEEDINFO(); void SHOWINFO(); ; void FLIGHT::CALFUEL() if (Distance<000) Fuel=500; else if (Distance<000) Fuel=00; else Fuel=00; void FLIGHT::FEEDINFO() cout<< Flight No : ;cin>>fno; cout<< Destination : ;gets(destination); cout<< Distance : ;cin>>distance; CALFUEL(); void FLIGHT::SHOWINFO() cout<< Flight No : <<Fno<<endl; cout<< Destination : <<Destination<<endl; cout<< Distance : <<Distance<<endl;; cout<< Fuel : <<Fuel<<endl;; ( Mark for correctly declaring Data Members) ( Mark for correctly defining CALFUEL()) ( ½ Mark for correctly defining FEEDINFO()) ( ½ Mark for calling CALFUEL() from FEEDINFO()) ( ½ Mark for correctly defining SHOWINFO()) ( ½ Mark for correct syntax of class) 35

(d) Answer the questions (i) to (iv) based on the following: 4 class CUSTOMER int Cust_no; (i) char Cust_Name[0]; protected: void Register(); public: CUSTOMER(); void Status(); ; class SALESMAN int Salesman_no; char Salesman_Name[0]; protected: float Salary; public: SALESMAN(); void Enter(); void Show(); ; class SHOP : private CUSTOMER, public SALESMAN char Voucher_No[0]; char Sales_Date[8]; public: SHOP(); void Sales_Entry(); void Sales_Detail(); ; Write the names of data members which are accessible from objects belonging to class CUSTOMER. 36

(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? Answer: (i) None of data members are accessible from objects belonging to class CUSTOMER. (ii) Enter(), Show() (iii) Data members: Voucher_No, Sales_Date, Salary Member function: Sales_Entry(), Sales_Details(), Enter(), Show(), Register(), Status() (iv) 66 ( Mark for each correct answer) Note: No marks to be given for partial answers 3. (a) Write a function in C++ to combine the contents of two equi-sized arrays A and B by computing their corresponding elements with the formula *A[i]+3*B[i]; where value i varies from 0 to N- and transfer the resultant content in the third same sized array. 3 Answer: void AddNSave(int A[],int B[],int C[],int N) for (int i=0;i<n;i++) C[i]=*A[i]+3*B[i]; ( Mark for function header with desired parameters) ( Mark for correct formation of loop) ( Mark for the formula) ( Mark for transferring elements in the resultant array) (b) An array P[0][30] is stored in the memory along the column with each of the element occupying 4 bytes, find out the memory location for the element P[5][5], if an element P[][0] is stored at the memory location 5000. 37

3 Answer: Given, W=4 N=0 M=30 Loc(P[][0])=5000 Column Major Formula: Loc(P[I][J]) =Base(P)+W*(N*J+I) Loc(P[][0]) =Base(P)+4*(0*0+) 5000 =Base(P)+4*(400+) Base(P) =5000-608 Base(P) =339 Loc(P[5][5]) =339+4*(0*5+5) =339+4*(300+5) =339+0 =46 (/ Mark for correct formula/substitution of values in formula) ( ½ Mark for correctly calculating Base Address) ( Mark for correctly calculating address of desired location) (c) Write a function in C++ to perform Push operation on a dynamically allocated Stack containing real numbers. Answer: 4 struct NODE float Data; NODE *Link; ; class STACK NODE *Top; 38

public: STACK(); void Push(); void Pop(); ; void STACK::Push() NODE *Temp; Temp=new NODE; cin>>temp->data; Temp->Link=Top; Top=Temp; ( ½ Mark for appropriate function header) ( ½ Mark for declaring a Temporary pointer - TEMP) ( Mark for new operation) ( Mark for Temp->Link to Top) ( Mark for assigning Top as Temp) (d) Answer: Write a function in C++ to find sum of rows from a two dimensional array. void MatAdd(int A[00][00],int N,int M) for (int R=0;R<N;R++) int SumR=0; for (int C=0;C<M;C++) SumR+=A[C][R]; cout<<sumr<<endl; ( ½ Mark for initialization of desired variables) ( Mark for loops) 39

( ½ Mark for statement to add rows elements) (e) Evaluate the following postfix notation of expression: True, False, AND, True, True, NOT, OR, AND Answer: Step : Push Step : Push True False True Step 3: AND Push Step 4: Push True Pop Op=True Pop Op=False Op=True False Step 5: Push True False True True False Step 6: NOT Pop Push 40

Op=True False True True False False Step 7: OR Push Pop Pop Op=False Op=True True Op=False True False False False Step 8: AND Push Pop Pop Op=True Op=False Op=True False False Step 9: Pop Result False ( ½ Mark for showing stack position for operations NOT,OR and AND) ( ½ Mark for correctly evaluating the final result) 4. (a) Observe the program segment given below carefully and fill the blanks marked as Statement and Statement using seekg() and tellg() functions for performing the required task. #include <fstream.h> class Employee int Eno;char Ename[0]; public: //Function to count the total number of records 4

int Countrec(); ; int Item::Countrec() fstream File; File.open( EMP.DAT,ios::binary ios::in); //Statement int Bytes = //Statement int Count = Bytes / sizeof(item); File.close(); return Count; Answer: File.seekg(0,ios::end); //Statement File.tellg(); //Statement ( ½ Mark for each correct statement) (b) Write a function in C++ to count the number of alphabets present in a text file NOTES.TXT. Answer: void CountAlphabet() ifstream FIL( NOTES.TXT ); int CALPHA=0; char CH=FIL.get(); while (!FIL.eof()) if (isalpha(ch)) CALPHA++; CH=FIL.get(); 4

FIL.close(); cout<< No. of Alphabets: <<CALPHA<<endl; ( ½ mark for opening the file in in mode) ( ½ mark for correct use of eof) ( ½ mark for reading each character) ( ½ mark for correct increment) (c) Write a function in C++ to add new objects at the bottom of a binary file STUDENT.DAT, assuming the binary file is containing the objects of the following class. 3 class STUD public: ; Answer: int Rno; char Name[0]; void Enter()cin>>Rno;gets(Name); void Display()cout<<Rno<<Name<<endl; void Addnew() fstream FIL; FIL.open( STUDENT.DAT,ios::binary ios::app); STUD S; char CH; do S.Enter(); FIL.write((char*)&S,sizeof(S)); cout<< More(Y/N)? ;cin>>ch; while(ch!= Y ); FIL.close(); 43

( ½ mark for opening the file in app mode) ( ½ mark for declaration of desired variables) ( ½ mark for calling the member function Enter correctly) ( mark for writing the content of object to the binary file) ( ½ mark for forming the appropriate loop) 5. Answer: (a) What do you understand by Primary Key & Candidate Keys? An attribute or set attributes which are used to identify a tuple uniquely is known as Primary Key. If a table has more than one such attributes which identify a tuple uniquely than all such attributes are known as Candidate Keys. (b) Consider the following tables GAMES and PLAYER. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii) 6 Table: GAMES GCode GameName Number PrizeMoney ScheduleDate 0 Carom Board 5000 3-Jan-004 0 Badminton 000 -Dec-003 03 Table Tennis 4 8000 4-Feb-004 05 Chess 9000 0-Jan-004 08 Lawn Tennis 4 5000 9-Mar-004 Table: PLAYER PCode Name Gcode Nabi Ahmad 0 Ravi Sahai 08 3 Jatin 0 4 Nazneen 03 44

(i) Answer: To display the name of all Games with their Gcodes SELECT GameName,Gcode FROM GAMES; ( mark for correct SELECTion of columns) (ii) To display details of those games which are having PrizeMoney more than 7000. Answer: SELECT * FROM GAMES WHERE PrizeMoney>7000 ( ½ mark for correct SELECTion of columns) ( ½ mark for correct use of WHERE) (iii) To display the content of the GAMES table in ascending order of ScheduleDate. Answer: SELECT * FROM GAMES ORDER BY ScheduleDate; ( ½ mark for correct SELECTion of columns) ( ½ mark for correct use of ORDER BY) (iv) To display sum of PrizeMoney for each of the Number of participation groupings (as shown in column Number or 4) Answer: SELECT SUM(PrizeMoney),Number FROM GAMES GROUP BY Number; ( ½ mark for correct SELECTion of columns) ( ½ mark for correct use of GROUP BY) (v) SELECT COUNT(DISTINCT Number) FROM GAMES; Answer: ( ½ mark for correct output) Answer: (vi)select MAX(ScheduleDate),MIN(ScheduleDate) FROM GAMES; 9-Mar-004 -Dec-003 ( ½ mark for correct output) 45

Answer: (vii) SELECT SUM(PrizeMoney) FROM GAMES; 59000 ( ½ mark for correct output) (viii) SELECT DISTINCT Gcode FROM PLAYER; Answer: 0 03 08 ( ½ mark for correct output) 6. (a) State and algebraically verify Absorbtion Laws. Answer: X+X.Y = X L.H.S = X+X.Y = X.+X.Y = X.(+Y) = X. = X = R.H.S X+X.Y = X+Y L.H.S. = X+X.Y = (X+X ).(X+Y) =.(X+Y) = X+Y = R.H.S ( mark for stating the correct law) ( mark for the appropriate verification using algebraic method) (b) Write the equivalent Boolean Expression for the following Logic Circuit U V 46

Answer: F(U,V)=U.V+U.V (Full marks for obtaining the correct Boolean Expression for the Logic Circuit) OR ( mark correctly interpreting Product terms) (c) Write the SOP form of a Boolean function G, which is represented in a truth table as follows: Answer: P Q R G 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 G(P,Q,R) = P.Q.R +P.Q.R +P.Q.R +P.Q.R ( mark for correct SOP representation) (d) Reduce the following Boolean Expression using K-Map: 3 F(U,V,W,Z)= (0,,,4,5,6,8,0) Answer: U V U V UV UV W Z 0 4 8 W Z 47

5 3 9 WZ 3 7 5 WZ 6 4 0 F(U,V,W,Z)=UV+WZ+UZ ( mark for correctly drawing K-Map with s represented on right places) ( mark for minimizing each Quad) ( mark for writing the complete Boolean Expression) 7. a) Define the term Bandwidth. Give unit of Bandwidth. Answer: Bandwidth is the capability of a medium to transmit an amount of information over a distance. Bandwidth of a medium is generally measured in bits per second (bps) or more commonly in kilobits per second (kbps) ( ½ Mark for correct definition and ½ Mark for correct unit) b) Expand the following terminologies: (i) HTML (ii) XML Answer: (i) (ii) Hypertext Markup Language Extended Markup Language ( ½ Mark for each correct expansion) c) Define the term firewall. Answer: 48

Firewall is a feature used for Network Security. In a Network there is always danger of information leaking out or leaking in. Firewall is a feature which forces all information entering or leaving the network to pass through a check to make sure that there is no unauthorized usage of the network. ( Mark for correct definition) d) What is the importance of URL in networking? Answer: URL stands for Uniform Resource Locator. Each page that is created for Web browsing is assigned a URL that effectively serves as the page s worldwide name or address. URL s have three parts: the protocol, the DNS name of the machine on which the page is located and a local name uniquely indicating the specific page(generally the filename). ( Mark for correct significance) e) Ravya Industries has set up its new center at Kaka Nagar for its office and web based activities. The company compound has 4 buildings as shown in the diagram below: Raj Building Fazz Building Harsh Building Jazz Building Center to center distances between various buildings is as follows: Harsh Building to Raj Building Raz Building to Fazz Building Fazz Building to Jazz Building Jazz Building to Harsh Building Harsh Building to Fazz Building Raj Building to Jazz Building 50 m 60 m 5 m 70 m 5 m 90 m 49

Number of Computers in each of the buildings is follows: Harsh Building 5 Raj Building 50 Fazz Building 5 Jazz Bulding 5 e) Suggest a cable layout of connections between the buildings. Answer:Layout : Raj Building Fazz Building Harsh Building Jazz Building Layout : Since the distance between Fazz Building and Jazz Building is quite short Raj Building Fazz Building Harsh Building Jazz Building ( Mark for appropriate layout) e) Suggest the most suitable place (i.e. building) to house the server of this organisation with a suitable reason. Answer: The most suitable place / block to house the server of this organisation would be Raj Building, as this block contains the maximum number of computers, thus decreasing the cabling cost for most of the computers as well as increasing the efficiency of the maximum computers in the network. 50

( mark for correct placement) e3) Suggest the placement of the following devices with justification: a. Internet Connecting Device/Modem b. Switch Answer: (i) (ii) Raj Building In both the layouts, a hub/switch each would be needed in all the buildings, to interconnect the group of cables from the different computers in each block ( ½ Mark for placement of each device correctly) e4) The organisation is planning to link its sale counter situated in various parts of the same city, which type of network out of LAN, MAN or WAN will be formed? Justify your answer. Answer: The type of network that shall be formed to link the sale counters situated in various parts of the same city would be a MAN, because MAN (Metropolitan Area Networks) are the networks that link computer facilities within a city. ( ½ mark for correct type and ½ mark for correct justification) f) Correct definition marks g) Correct definition marks 5

S. No UNIT VSA PAPER I(Slow learner) COMPUTER SCIENCE (THEORY) CLASS XII 083 SESSION 07-8 BLUE PRINT SA I SA II LA Total ( Mark) ( Marks) (3 Marks) (4 Marks). Review of C++ Covered in Class XI () 8 (4) 3 () -- (6). Object oriented Programming in C++ (4) (a) Introduction to OOP using C++ - () - 4 () 6 () (b) Constructor and Destructor - () - - () (c) Inheritance - - - 4 () 4 () 3. Data Structure and Pointers 4 (5) (a) Address calculation - - 3 () - 3 () (b) Static Allocation of Objects - () 3 () - 5 () (c) Dynamic Allocation of Objects - - - 4 () 4 () (d) Infix and Postfix Expression () - - () 4. Data File Handling in C++ 6 (3) (a) Fundamental of File Handling () - - - () (b) Text File - () - - () (c) Binary File - - 3 () - 3 () 5. Database and SQL 8 (3) (a) Database Concepts - () - - () (b) Structured Query Language - () - 4 () 6 () 6. Boolean Algebra 8 (4) (a) Introduction to Boolean Algebra - () - - () and Law (b) SOP and POS () - - - () (c) Karnaugh Map - - 3 () - 3 () (d) Basic Logic Gates - () - - () 7. Communication and Open Source 0 (7) Concepts (a) Introduction to Networking () - - - () (b) Media, Devices, Topologies & - - - 4 () 4 () 5