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

Similar documents
Subject - Computer Science (Code-083)

Kendriya Vidyalaya Sangathan Model Question Paper-1 Class XII Subject - Computer Science (083) Max. Marks: 70. Blue Print

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

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

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

KENDRIYA VIDYALAYA NO.02 AFS HINDAN G.BAD Holiday Homework Class XII Computer Science

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

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

ASSIGNMENT CLASS : XII ( ) COMPUTER SCIENCE

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

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

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

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

Assignment-I. Date of Submission: (Computer Science)

DELHI PUBLIC SCHOOL BOKARO STEEL CITY

Model Sample Paper 2015

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

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

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

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

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

INTERNATIONAL INDIAN SCHOOL, RIYADH. Ch 1 C++ Revision tour

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

KendriyaVidyalayaSangathan Kolkata Region

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

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


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

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

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

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

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

List of Practical for Class XII Computer Science

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

3/12/2018. Structures. Programming in C++ Sequential Branching Repeating. Loops (Repetition)

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

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

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

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

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

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

Downloaded from

Sample Paper, 2015 Subject: Computer Science Class 12 th

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

COMPUTER SCIENCE Paper 1

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

KENDRIYA VIDYALAYA IIT CAMPUS CHENNAI 36 COMPUTER SCIENCE. Half Yearly

Assignment 3 Class XII (Computer Science 083) Topic Array

Computer programs are associated to work with files as it helps in storing data & information permanently. File - itself a bunch of bytes stored on

D.A.V PUBLIC SCHOOLS, RANCHI ZONE FIRST SUMMATIVE ASSESSMENT CLASS - XI COMPUTER SCIENCE

A First Program - Greeting.cpp

Introduction to Programming Using Java (98-388)


COMPUTER SCIENCE 2002 (Delhi Board)

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

Quiz Start Time: 09:34 PM Time Left 82 sec(s)

Downloaded from

CS201 Latest Solved MCQs

COMPUTER SCIENCE PAPER 1

COMPUTER SCIENCE 1998 (Delhi Board)

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

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:

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions.

HOLIDAY HOMEWORK ASSIGNMENT-5 Q1. What will be the output of the following program segment Class Num { int x; float y; public: void init( ) { x = y =

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

COMPUTER SCIENCE

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

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

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

Computer Science XII Important Concepts for CBSE Examination Questions

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

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

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; }

CLASS-XI COMPUTER SCIENCE

Programming in C++ 5. Integral data types

2015 Academic Challenge

Multiple Choice (Questions 1 13) 26 Points Select all correct answers (multiple correct answers are possible)

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

This chapter introduces the notion of namespace. We also describe how to manage input and output with C++ commands via the terminal or files.

DATA FILE HANDLING. The function should create another file OUT.TXT with the text

Pointers. 1 Background. 1.1 Variables and Memory. 1.2 Motivating Pointers Massachusetts Institute of Technology

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

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

COMPUTER SCIENCE (083)

STRUCTURING OF PROGRAM

BRAIN INTERNATIONAL SCHOOL. Term-I Class XI Sub: Computer Science Revision Worksheet

C++ Basics. Data Processing Course, I. Hrivnacova, IPN Orsay

CSCS 261 Programming Concepts Exam 2 Fall EXAM 2 VERSION 1 Fall Points. Absolutely no electronic devices may be used during this exam.

Functions. Introduction :

Short Notes of CS201

BRAIN INTERNATIONAL SCHOOL Term-II Class-XI Sub:- Computer Science Revision Sheet

CS201 - Introduction to Programming Glossary By

General Instructions:

CSCS 261 Programming Concepts Exam 2 Fall EXAM 2 VERSION 1 Fall Points. Absolutely no electronic devices may be used during this exam.

KENDRIYA VIDYALAYA NO.1 SAGAR XII-COMPUTER SCIENCE ( ) HOMEWORK SUMMER VACATION

Chapter 01 Arrays Prepared By: Dr. Murad Magableh 2013


Transcription:

K.V.NO.3 AFS CHAKERI AUTUMN BREAK HOME WORK 2017-18 CLASS-XII 1. a) Differentiate between an identifier and keywords. b) Name the header files, to which following inbuilt function belong to: a) abs( ) b) open( ) (1) c) Identify the errors in the following program code: class int int I,j; int(int a, int b) I=a; j=b; ; class class2 int I,j; class2(int a, int b) I=a; j=b; ; int main( ) int x(10,20) ; class2 y ; x=y ; d) Give the output of the following program: int global=10; void func(int &x, int y) x=x-y ;y=x*10 ; cout<<x<<, <<y << \n ; void main() int global=7 ; func( ::global,global) ; cout<<global<<, <<::global<< \n ; func(global,::global) ; cout<<global<<, <<::global<< \n ; 1

e) Find the output of the following program : #include<string.h> #include<ctype.h> void Change(char Msg[], int Len) for(int Count=0;Count<Len;Count++) if(islower(msg[count])) Msg[Count]=toupper(Msg[Count]); else if(isupper(msg[count])) Msg[Count]=tolower(Msg[Count]); else if(isdigit(msg[count])) Msg[Count]=Msg[Count]+1; else Msg[Count]= * ; void main() char Message[]= 2015 Happy New Year ; int Size=strlen(Message); Change(Message,Size); cout<<message<<endl; for(int C=0,R=Size-1;C<=Size/2;C++,R--) cout<<message<<endl; char Temp=Message[C]; Message[C]=Message[R] ; Message[R]=Temp ; f) Study the following program and select the possible output from it:. Also justify your answer. #include<stdlib.h> const int Max=3; void main( ) randomize( ); int Div; Div=1+random(Max); for(int N=1;N<5;N++) cout<<100%div<< # ; i) 0#0#0#0# ii)1#1#1#1# iii)2#2#2#2# iv)3#3#3#3# 2

2. a) What is Function Overloading? Give an example in C++ to illustrate the same. b) Answer the questions (i) and (ii) after going through the following program: #include<string.h> class AirIndia char flno; int Nop; AirIndia() strcpy(flno, ); Nop=0; AirIndia( chat *str,int n) strcpy(flno,str); Nop=n; void input cin>>flno; cin>>nop; ~AirIndia() cout<< counter closed <<endl; ; (i) //function1 //function2 //function3 //function4 In Object Oriented Programming, which concept is illustrated by Function1 and Function2 together? (ii) Write the statement to call these functions (Function 1 and Function 2). c) Define a class cricket in C++ with the following description: Private members: Target_score of type integer Overs_bowled of type integer Extra_time of type integer Penalty of type integer Cal_penalty() a member function to calculate penalty as follows: If Extra_time<=10, Penalty=1 If Extra_time>10 but <=20 Penalty=2, otherwise, Penalty=5 Public members: A function Extradata () to allow user to enter values for Target_score, Over_bowled, Extra_time. A function DispData( ) to allow user to view the contents of all data members. d) Consider the following and answer the questions given below: class MNC char Cname[25]; protected: char Hoffice[25]; MNC(); 3

void EnterDate ( ); void DisplayData ( ); ; class Branch:public MNC long NOE: char Ctry[25]; protected: void Association( ); Branch( ); void Add( ); void Show( ); ; class Outlet: public Branch char State[25]; Outlet( ); void Enter (); void Output(); ; i) Which class s constructor will be called first at the time of declaration of an object of class Outlet? ii) How many bytes an object belonging to class Outlet require? iii) Name the member function(s), which are accessed from the object(s) of class 3. a) Outlet. iv) Name the data member(s), which are accessible from the object(s) of class Branch Write a function in C++ which accepts a 2D array of integers and its size as arguments and display the elements which lie on diagonals. [Assuming the 2D array to be a square matrix with odd dimension, i.e., 3x3, 5x5, etc..] Example, if the array contents is 5 4 3 6 7 8 1 2 9 Output through the function should be : Diagonal One : 5 7 9 Diagonal Two: 3 7 1 b) An array Arr[15][20] is stored in the memory along the row with each element occupying 4 bytes. Find out the Base Address and address of the element Arr[3][2], if the element [5][2] is stored at the address 1500. c) Give the necessary declaration of queue containing integer. Write a user defined function in C++ to delete an integer from the queue. The queue is to be implemented as a linked list. d) Write a function in C++ to print the sum of all the values which are either divisible by 2 or are divisible by 3 present in a two-dimensional array passed as the argument to the function. e) Evaluate the following postfix notation of expression: 10 20 + 25 15 - * 30 / 4. a) Observe the program segment given below carefully and fill the blanks marked statement 1 and statement 2 using seekg( ) and tellg( ) function for performing the required task. #include<fstream.h> class Employee int Eno; char Ename[30]; //Function to count the total number of records (1) 4

int Countrec( ); ; int Employee:: Countrec( ) fstream File; File.open( Emp.Dat,ios::binary ios::in); // Statement 1 int Bytes = // Statement 2 int count = Bytes/sizeof(item); File.close( ); return count; b) Write a function in C++ to count the number of alphabets present in a textfile Para.Txt. 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 object of the following class class STUD int Rno; char Name[20]; public : void Enter () cin>>rno ; gets(name); void Display() cout<<rno<<name<<endl; ;