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

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

SET 4. Series : GBM/C COMPUTER SCIENCE. Code No. 91. Candidates must write the Code on the title page of the answer-book. Roll No.

KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOME WORK XII COMPUTER SCIENCE ARRAY AND STRUCTURES

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

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

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

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

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

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

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

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

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

Class and object Holiday Homework

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

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

KendriyaVidyalayaSangathan Kolkata Region

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

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

DELHI PUBLIC SCHOOL BOKARO STEEL CITY

Object Oriented Pragramming (22316)

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

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

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

KENDRIYA VIDYALAYA IIT CAMPUS CHENNAI 36 COMPUTER SCIENCE. Half Yearly

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

SBOA SCHOOL & JUNIOR COLLEGE, CHENNAI 101 COMPUTER SCIENCE CLASS: XI HALF YEARLY EXAMINATION MAX MARKS:70 CODE - A DURATION : 3 Hours

Introduction to Programming Using Java (98-388)

Downloaded S. from Kiran, PGT (CS) KV, Malleswaram STRUCTURES. Downloaded from

POINTERS. Pointer is a memory variable which can store address of an object of specified data type. For example:

Sample Paper, 2015 Subject: Computer Science Class 12 th

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

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

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:

Subject: Fundamental of Computer Programming 2068

Downloaded from

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

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

Object Oriented Programming. Solved MCQs - Part 2

CBSE Sample Paper for Computer Science Class XII.

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

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

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

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

FORM 2 (Please put your name and form # on the scantron!!!!)

Short Notes of CS201

CS201 - Introduction to Programming Glossary By

Computer Science XII Important Concepts for CBSE Examination Questions

Model Sample Paper 2015

COMPUTER SCIENCE SAM PLE PAPER 2-HALF YEARLY EXAMINATION

1. FIBONACCI SERIES. Write a C++ program to generate the Fibonacci for n terms. To write a C++ program to generate the Fibonacci for n terms.


Final exam. Final exam will be 12 problems, drop any 2. Cumulative up to and including week 14 (emphasis on weeks 9-14: classes & pointers)

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

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

1. Answer the following : a) What do you mean by Open Source Software. Give an example. (2)

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

Instructions. Quiz #2. Name: Solutions Student Number: Signature:

Topics: Material through example 19 (types, operators, expressions, functions, selection, loops, arrays)

THE INDIAN COMMUNITY SCHOOL, KUWAIT

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

Code No: R Set No. 1

l Determine if a number is odd or even l Determine if a number/character is in a range - 1 to 10 (inclusive) - between a and z (inclusive)

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

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION

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

C++ Addendum: Inheritance of Special Member Functions. Constructors Destructor Construction and Destruction Order Assignment Operator

Scheme G. Sample Test Paper-I. Course Name : Computer Engineering Group Course Code : CO/CD/CM/CW/IF Semester : Second Subject Tile : Programming in C

1. Write step by step code to delete element from existing Doubly Linked List. Suppose that all declarations are done

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

Pointers. A pointer value is the address of the first byte of the pointed object in the memory. A pointer does not know how many bytes it points to.

Constructor & Classes Questions

OOP THROUGH C++(R16) int *x; float *f; char *c;

Exam 3 Chapters 7 & 9

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

CE221 Programming in C++ Part 2 References and Pointers, Arrays and Strings

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson


Downloaded from

Introduction to Computer Science Midterm 3 Fall, Points

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

C++ For Science and Engineering Lecture 15

COMPUTER SCIENCE Paper 1

Sample Paper 2012 Class XII Subject COMPUTER SCIENCE (Theory)

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

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

Computer Science 2006 (Outside Delhi)

COMPUTER SCIENCE

SRI SARASWATHI MATRIC HR SEC SCHOOL PANAPAKKAM +2 IMPORTANT 2 MARK AND 5 MARK QUESTIONS COMPUTER SCIENCE VOLUME I 2 MARKS

CS201- Introduction to Programming Current Quizzes

QUESTION BANK SUB: COMPUTER SCIENCE(083)

cout << "How many numbers would you like to type? "; cin >> memsize; p = new int[memsize];

! Determine if a number is odd or even. ! Determine if a number/character is in a range. - 1 to 10 (inclusive) - between a and z (inclusive)

[0569] p 0318 garbage

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

Review Questions for Final Exam

Kapi ap l S e S hgal P T C p t u er. r S. c S ienc n e A n A k n leshw h ar ar Guj u arat C C h - 8

COMPUTER SCIENCE 2002 (Delhi Board)

DC104 DATA STRUCTURE JUNE Q.2 a. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

Transcription:

Guru Gobind Singh Public School Sector : V/B, Bokaro Steel City 1. a) Write the types of tokens(keywords and user identifiers) from the following : i) case ii) _delete iii) WHILE iv) 21stName b) Which c++ header file(s) are essentially required to be included to run/execute the following c++ code. int last=25; for(int c=9;c<=last;c++) cout<<c<< : <<sqrt(c)<<endl; c) Rewrite the following program after removing the syntactical errors(if any). Underline each correction. #define 10*number MAX(Number) int num,newnum; cout<< Number : ; cin<<num; if num<10 newnum=max(num); else newnum=num-2; cout<< New Number : <<newnum<<endl; d) Find and write the output of the following c++ program code : Note : Assume all required header files are already included in the program : void decider(int &k, int l=70) if(k>l) k-=l; else k+=l; int m=100,n=40; decider(m,n); cout<<m<< # <<n<<endl; decider(m); cout<<n<< # <<m<<endl; 1

e) Find and write the output of the following c++ program code : Note : Assume all required header files are already included in the program : void dispscore(int s[],int n) for(int count=0;count<n;count++) cout<<s[count]<< # ; cout<<endl; int *point,score[]=10,5,20,15; point=score; dispscore(score,2); for(int count =0;count<4;count++) cout<<*point<< : ; if(count%2==0) point++; else *point+=10; point++; cout<<endl; dispscore(score,4); f) Which option will not be the expected output from the given program. What will be the minimum and maximum value assigned to the variable Sequence : int Sequence, Select[4]=25,90,30,45; randomize(); for( int c=0;c<4;c++) sequence=random(4-c); cout<<select[sequence]<< @ ; i) 45@90@30@25@ ii) 90@25@90@25@ iii) 30@30@25@25@ iv) 30@30@90@25@ g) Which option will not be the expected output from the given program. What will be the minimum and maximum value assigned to the variable low and high : 2

randomize(); int low=2+random(3), high=5+random(3); char c[]= ABCDEFGHIJ ; for(int i=low;i<=high;i++) cout<<c[i]; cout<<endl; i) BCDE ii) CDEF iii) CDE iv) DCEFG h) clrscr(); int a[]=3,5,6,7; int *p,**q,***r,*s,*t,**ss; p=a; s=p+1; q=&s; t=(*q+1); ss=&t; r=&ss; cout<<*p<<**q<<***r; 2. a) Differentiate between Data hiding and Data Encapsulation in context of Object Oriented programming. Also give a suitable example illustrating the same in c++. b) Observe the following c++ code and answer the questions (i) and (ii). Assume all necessary files are included class Game int pcode,round,score; Game() // Member function 1 pcode=1;round=0;score=0; Game(Game &g) // Member function 2 pcode=g.pcode+1; round=g.round+2; score=g.score+10; ; // Statement 1 // Statement 2 3

i) Which Object Oriented Programming feature is illustrated by the member function 1 and member function 2 together in the class Game? ii) Write statement 1 and statement 2 to execute member function 1 and member function 2 respectively. c Define a class Tour in C++ with the description given below : Private Members : TCode of type string NoofAdults of type integer NoofKids of type integer Kilometres of type integer TotalFare of type float Public Members : A constructor to assign initial values as follows : TCode with the word NULL NoofAdults as 0 NoofKids as 0 Kilometers as 0 TotalFare as 0 A function AssignFare ( ) which calculates and assigns the value of the data member TotalFare as follows For each Adult Fare(Rs) For Kilometers 500 >=1000 300 <1000 & >=500 200 <500 For each Kid the above Fare will be 50% of the Fare mentioned in the above table For example : If Kilometres is 850, NoofAdults = 2 and NoofKids = 3 Then TotalFare should be calculated as NumofAdults * 300 + NoofKids * 150 i.e. 2*300 + 3*150=1050 A function EnterTour( ) to input the values of the data members TCode, No_of_Adults, No_of_Kids and Kilometers and invoke the Assign Fare( ) function. A function ShowTour( ) which displays the content of all the data members for a Tour. d. Answer the questions (i) to (iv) based on the following : class Digital int ID; protected : float amount; int seconds; digital() void Register(); void disp(); ; class print 4

int PID; protected: float amount; int sqinch; print(); void get(); void print(); ; class Media: public print, private Digital int MID; media(); void enter(); void print(); ; Media M; // Statement 1 // Statement 2 i) Which type of inheritance is illustrated in the above example? ii) Write the names of all the member functions, which are directly accessible by the object M of class Media as declared in main() function. iii) What will be the order of execution of the constructor, when the object M of class iv) Media is declared inside main()? Write statement 2 to call function print() of class print from the object M of class Media. 3. a) What will be the contents of an array after third pass if an array is sorted using selection sort. If an array initially contains values 7, 4, 1, 6, 2, 3 b) Write a function which accept an integer array and its size as argument and shift all the even elements on the left side and odd elements on the right side in an array. For example, if array contains 11, 23, 24, 55, 4 Then output should be 4, 24, 23, 55, 11 c) Write a function which will accept a string as a parameter and check whether it is palindrome or not using pointer. d) Write a a c++ program to enter an integer array of 5 elements and check whether it is arranged in ascending order/descending order/not arranged. e) G[15][20] is a two dimensional array, which is stored in the memory along the column with each of its element occupying 4 bytes, find the address of the element G[5][10], if the element G[2][4] is stored at the memory location 52000. f) An array Arr[1 15][1 8] is stored in the memory along the column with each of the element occupying 4 bytes, find out the the base address and the address of an element Arr[3][2], if the location Arr[5][7] is stored at the address 2500. 5

4. a) Write a definition of a member function PUSHBOOK() in c++ to add information of BOOK in a static stack implemented using an array of structure BOOK(definition of struct BOOK is defined below for reference) struct BOOK int BNO; char title[20]; ; b). Write a user-defined function in c++ to perform a insert operation in a dynamically allocated queue. The structure is given below struct emp int empno; char empname[20]; emp *link; c). Evaluate the following postfix notation of expression: (Show status of stack after each operation) i) 100, 40, 8, +, 20, 10, -, +, * ii) true, False, NOT, OR, False, True, OR, AND d) Write a function definition ARTICLES() in c++ to count all the articles the, a,and an present in a text file BOOK.TXT. Note : Ensure that the, a and an are counted as independent words and not as a part of any other word. *********************** 6