CLASS XII SECOND TERM EXAMINATION SUBJECT : COMPUTER SCIENCE SET A2 (SOLUTIONS)
|
|
- Jeffrey Quinn
- 5 years ago
- Views:
Transcription
1 CLASS XII SECOND TERM EXAMINATION SUBJECT : COMPUTER SCIENCE SET A2 (SOLUTIONS) TIME ALLOWED : 3 HRS. MAX. MARKS:70 General Instructions : This paper consists of 6 questions. There are 7 printed pages Attempt all questions neatly and in order. Q1a) What do you understand by GSM? (1) Ans. GSM stands for Global System for Mobile Communications. GSM is a technique that uses narrowband TDMA (Time Division Multiple Access) to allow eight simultaneously calls on same radio frequency. b) What is the importance of URL in networking? (1) Ans. URL refers to Uniform Resource Locator. A URL stores the address of a web page on www. c) What is spam? (1) Ans Spam is flooding the Internet with many copies of the same message, in an attempt to force the message on people who would not otherwise choose to receive it. Most spam is commercial advertising, often for dubious products, getrich-quick schemes, or quasi-legal services. d) Which of the following unit measures the speed with which data can be transmitted from one node to another node of a network? Also, give the expansion of the suggested unit. (1) (i) Mbps (ii) KMph (iii) MGps Ans. (i) Mbps Mega bits per second. e) Granuda Consultants are setting up a secured network for their office campus at Faridabad for their day to day office and web-based activities. They are planning to have connectivity between 3 buildings and the head office situated in Kolkata. Answer the question (i) to (iv) after going through the building positions in the campus and other details, which are given below: (4)
2 Distance between various buildings: Building RAVI to Building JAMUNA Building RAVI to Building GANGA Building GANGA to Building JAMUNA Faridabad Campus to Head Office Number of Computers Building RAVI 25 Building JAMUNA 150 Building GANGA 51 Head Office m 50 m 65 m 1460 km (i) Suggest the most suitable place (i.e., building) to house the server of this organization. Also give a reason to justify your suggested location. (ii) Suggest a cable layout of connections between the buildings inside the campus. (iii) Suggest the placement of the following devices with justification: (a) Switch (b) Repeater (iv) The organization is planning to provide a high speed link with its head office situated in the KOLKATA using a wired connection. Which of the following cable will be most suitable for this job? (a) Optical Fiber (b) Co-axial Cable (c) Ethernet Cable Ans.(i) Building Jamuna. As most computers are situated in this building and as per 80:20 rule of networking, maximum traffic should be local traffic. So server should be in building with maximum computers, i.e., building Jamuna. (ii)
3 (iii) (a) Switches are needed in every building as they help share bandwidth in every building. (b) Repeaters may be skipped as per above layout, (because distance is less than 100 m) however if building RAVI and building JAMUNA are directly connected, we can place a repeater there as the distance between these two buildings is more than 100 m. (iii) (a) Optical Fiber f) Anuradha is a web developer. She has designed a login form to input the login id and password of the user. She has to write a script to check whether the login id and the corresponding password as entered by the user are correct or not. What kind of script from the following will be most suitable for doing the same? (1) (i) JSP (ii) Client Side Script (iii) VB Script Ans. (i) JSP g) Which protocol helps us to transfer files to and from a remote computer? (1) Ans. FTP OR Telnet OR TCP Q2a) Define a class RESORT in C++ with following description: (4) Private members Rno //Data member to store Room No Name //Data member to store customer name Charges //Data member to store per day charges Days //Data member to store number of days of stay COMPUTE() //A function to calculate and return Amount as Days*Charges and if the value of Days*Charges is more than then as 1.02*Days*Charges Public Members Getinfo() //A function to enter the content Rno, Name,Charges and Days Dispinfo() //A function to display Rno, Name, Charges,Days and Amount (Amount to be displayed by calling function COMPUTE()) Ans : class RESORT { int Rno; char Name[20]; float Charges; int Days; float COMPUTE(); public:
4 void Getinfo(); void Dispinfo(); ; void RESORT::Getinfo() {cin>>rno; gets(name); cin>>charges; cin>>days; void RESORT::Dispinfo() {cout<<rno<< <<Name<< <<Charges<< <<Days<< COMPUTE()<<endl; float RESORT::COMPUTE() { float Amount = Charges*Days; if(amount>11000) Amount = 1.02*Days*Charges; return Amount; b) Explain the concept of constructor overloading with a suitable example in C++.(2) Ans: Overloaded constructors have the same name (name of the class) but different number of arguments. Depending upon the number and type of arguments passed, specific constructor is called. Since, there are multiple constructors present, argument to the constructor should also be passed while creating an object. c) Find the output of the following program: (3) #include<iostream.h> #include<conio.h> #include<ctype.h> #include<string.h> class Item { int Id ; char Name [20] ; float Price ; public : Item(int N=0, char M[]= "***", float P=100) { Id=N; strcpy(name, M); Price = P; void Rise(float P) {Price += P ; float RPrice() { return Price; void Show () { cout <<Id<< "#" <<Name<< "#" << Price<<endl ;
5 ; void main () { Item I1, I2(5), I3(10, "Pen", 20) ; I3.Rise(I1.RPrice()) ; I2.Rise (I2.RPrice()) ; I1.Show() ; I2.Show() ; I3.Show(); Ans: 0#***#100 5#***#200 10#Pen#120 Q3a) What is the difference between #define and const? Explain with suitable example. (2) Ans: #define: It is a preprocessor directive in C++ for creating a Macro. Example: #define sqr(i) i*i const: It is an Access Modifier in C++ that assigns a constant (non modifiable) value to a variable. Any attempt in modifying the value assigned to such a variable is reported as an error by the compiler. Example: const float Pi = 3.14; b) Name the header files that shall be needed for the following code (1) void main( ) { char String[]= Hello ; cout<<setw(20)<<string; Ans: iostream.h iomanip.h c) Find the output of the following program: (3) #include<iostream.h> void main() { int X[ ] = {10,25,30,55,110; int *p = X; while ( *p < 110) { if ( *p%3!= 0 ) *p = *p + 1; *p = *p + 2; p++; for(int I = 4; I>=1 ; I--)
6 { cout << X[I] << * ; if ( I%3 == 0) cout<<endl; cout<<x[0] * 3<<endl; Ans 110*56* 32*26*33 d) What is the difference between global & local variables? Explain with the help of an example. (2) Ans. A global variable is the one, which is declared outside all functions in the file & is available to all the functions & blocks defined in the file. A local variable is the one, which is declared inside a function or a block & is available to that function or block only. Example : #include<iostream.h> int A=2; int sum (int x, int y) { int z=x+y; return z; void main( ) { int B; B=A+sum(2,3); cout<<b; The variable A is global variable while x & y are local to function sum & B is local to function main. e) What will be the output of the following code: #include<iostream.h> (3) void Spill ( int A[ ], int N, int S) { for (int i=0; i<n; i++) if (i<s) A[i] *=i; A[i] /=i; void Display (int A[ ], int N) { for (int j=0; j<n; j++) if (j%2==0) cout<<a[j]<< % ;
7 cout<<a[j]<<endl; void main( ) { int Array[ ]= {30,40,50,20,10,5; Spill (Array,6,3); Display (Array,6); Ans 0%40 100%6 2%1 Q4a) Define the push( ), to insert nodes, and pop( ) to delete nodes for a linked implementation of a stack having the following structure of each node : (3+3) struct node { char name[30] ; int clss ; node * link; ; class stack { node * top; public : stack ( ) { top = NULL ; void push ( ); void pop ( ) ; ; Ans. void stack : : push( ) { node * nptr; nptr = new node; nptr link = NULL; cout << Enter name : ; gets(nptr name); cout << Enter the class : ; cin >> nptr clss ; if(top = = NULL) top = nptr; {nptr link = top; top = nptr;
8 void stack : : pop( ) { if(top = = NULL ) cout << Underflow!! { cout << Element being popped is \n ; cout << top name << ; << top clss<< endl; node * ptr; ptr = top; top = top link; delete ptr; b) Define member functions queinsert( ), to insert nodes and quedel( ), to delete nodes of a linked implemented queue where each node has the following structure: (3+3) struct node { char name[20]; int age; node * link; ; class queue { node * rear, * front ; public : queue() { front = NULL; rear = NULL; void queinsert( ); void quedel( ); ; Ans. void queue :: queinsert () { node * nptr; nptr = new node ; nptr -> link = NULL ; cout << enter the name and age for a new node ; gets ( nptr -> name); cin>>nptr -> age; if (rear == NULL ) { front = rear = nptr ; { rear -> link = nptr; rear = nptr ; void queue :: quedel ( )
9 { node * nptr ; if ( front == NULL ) cout << underflow ; { ptr = front; if ( front == rear ) front = rear = NULL; front = front -> link; delete ptr; c) Write a member function to implement deletions in an array containing integer elements implemented as a circular queue. (3) Ans. int queue :: isempty ( ) { return ( front == -1); void queue :: quedel ( ) { int data ; if ( isempty ()) cout<< Underflow ; { data = q [front]; if ( front == rear ) front = rear = -1; if ( front == MAX ) front = 0; front ++ ; d) Evaluate the following postfix expression using a stack and show the contents of the stack after execution of each operation 5, 11, -, 6, 8,+, 12, *, /. (3) Ans. 5, 11, -, 6, 8,+, 12, *, /. Rules : Scanning from left to right (i) If operand Push (ii) If binary operator, pop twice if unary operator pop once (iii) Evaluate the result and push back STACK 1. 5 : operand : Push 5
10 2. 11 : operand : Push 5, : binary operator : pop # (empty stack) 4. Evaluate 5 11 = -6 : Push back : operand : Push -6, : operand : Push -6, 6, : binary operator : pop twice Evaluate = 14 ; push back -6, : operand : push -6, 14, * : binary operator : pop back Evaluate 14 * 2 = 168 : push back -6, / : binary operator : pop twice # (stack empty) 13. Evaluate -6/168 = -1/28 : push back -1/ End of Expression. Pop the result -1/28 = Result e) Convert the expression (TRUE && FALSE)! (FALSE TRUE) to postfix expression. Show the contents of the stack at every step. (3) Ans. (TRUE && FALSE)! (FALSE TRUE) ) Adding ) to the end of expression and inserting ( to the beginning of stack. Scanning from Left to Right S.No Symbol Stack Postfix Expression Y ( TRUE && FALSE )! ( FALSE TRUE ) ( ( ( ( ( ( ( && ( ( && ( ( (! (! ( (! ( (! ( (! ( (! TRUE TRUE TRUE FALSE TRUE FALSE && TRUE FALSE && TRUE FALSE && TRUE FALSE && TRUE FALSE && FALSE TRUE FALSE && FALSE TRUE FALSE && FALSE TRUE TRUE FALSE && FALSE TRUE
11 13. ) End of Expression TRUE FALSE && FALSE TRUE! Q5a) Answer the questions (i) to (iv) based on the following: class ITEM { int Id; char IName[20]; protected: float Qty; public: ITEM(); void Enter(); void View(); ; class TRADER { int DCode; protected: char Manager[20]; public: TRADER(); void Enter(); void View(); ; class SALEPOINT : public ITEM, private TRADER { char Name[20],Location[20]; public : SALEPOINT(); void EnterAll(); void ViewAll(); ; i) Which type of Inheritance out of the following is illustrated in the above example? ii) Write the names of all the data members, which are directly accessible from the member functions of class SALEPOINT. iii) Write the names of all the member functions, which are directly accessible by an object of class SALEPOINT iv) What will be the order of execution of the constructors, when an object of class SALEPOINT is declared? Ans i) Multiple Inheritance ii) Name, Location, Manager, Qty iii) EnterAll(), ViewAll(), Enter(), View() iv) (i) ITEM() (ii) TRADER() (iii) SALEPOINT()
12 b) Observe the program segment given below carefully and fill the blanks marked as Statement 1 and Statement 2 using seekp ( ) and seekg ( ) functions for performing the required task. (1) # include <fstream.h> class Item { int Ino; char Item[20]; public: void Search (int); // Function to search and display the content of void modify (int); // a particular record no. // Function to modify the content of a particular record no. ; void Item :: Search (intrecno) { fstream File; File. Open ( STOCK.DAT, ios :: binary ios :: in); // Statement 1 File.read ((char*) this, sizeof(item)); cout<<ino<< = = << Item <<endl; File.close ( ); void Item :: Modify (intrecno) { fstream File; File.open ( STOCK.DAT, ios :: binary ios :: out); cout>>ino; cin.getline(item, 20); // Statement 2 File.write ((char*)this, sizeof(item)); File.close ( ); Ans. File.seekg ((RecNo 1 ) * sizeof (Item); Statement 1 File.seekp ((RecNo 1 ) * sizeof (Item)) ; Statement 2 c) Write a program to read a text file FILE.TXT and then create another file REVERSE.TXT which contains every line of FILE.TXT in the reverse order. (2) Eg. If content of FILE.TXT is Hello how are you? Bye leaving now. REVERSE.TXT should have?uoy era woholleh.won gnivaeleyb Ans. #include <fstream.h> # include <string.h> void main ( ) { ofstream fout ( REVERSE.TXT );
13 ifstream fin ( FILE.TXT ); char str [ 80 ]; fin.getline( str, 80 ); while ( fin ) { int len = strlen ( str ) ; char temp; for ( int i = 0 ; i<len / 2 ; i ++ ) { temp = str [ i ] str [ i ] = str [ len 1 i ]; str [ len 1 i ] = temp; str [ len ] = \ 0 ; fout<<str<<endl ; fin.getline( str, 80 ); fin.close ( ); fout.close ( ); d) Given a binary file SPORTS.DAT, containing records of the following structure type: struct Sports { char Event[20]; char Participant[10][30]; ; Write a function in C++ that would read contents from the file SPORTS.DAT and creates a file named ATHELETIC.DAT copying only those records from SPORTS.DAT where the event name is Athletics. (3) Ans : void SPORT() { fstream IS,OA; Sports S; IS.open( SPORTS.DAT,ios::binary ios::in); OA.open( ATHLETIC.DAT,ios::binary ios::out); while(is.read((char*) &S,sizeof(S))) { if(strcmp(s.event, Athletics )==0) OA.write((char *)&S,sizeof(S)); IS.close(); OA.close(); e) The array A[20][10] is stored in the memory with each element requiring one byte of storage if the base address of A is Co. Determine Co if the location of A[10][15] is 2000, when the array is stored in Row major form. (3) Ans. Total rows M = 20
14 Total Columns N = 10 W (size in bytes of each element) = 2 Row major form Add (A[ I ] [ J ]) = Base Address + w ( ( I 0 ) N + ( J 0 ) ) Add (A[ 10 ] [ 15 ]) = C ( ( 10 0 ) 10 + ( 15 0 ) ) 2000 = C ( ) 2000 = C C 0 = = 1885 Base Address of array A = 1885 Q6a) Write definition for a function void Primes (int A[], int N), which assigns N number of prime integers to the N number of locations of the array A. For example if N is passed as 5, then the array should store. (3) Ans : void Primes(int a[],int n) { int num = 2; int i=0; if (n==1) a[i]=2; { while (i < n) { int nofac=0; for (int j=2;j<=num/2;j++) if (num%j == 0) nofac++; if (nofac == 0) { a[i]=num; i++; num++; b) What do you understand by memory leak? Explain briefly. (2) Ans. If the objects, that are allocated memory dynamically, are not deleted, the memory block remains occupied even at the end of the program. Such memory blocks are known as orphaned memory blocks. These orphaned memory blocks when increase in number, brings an adverse effect on the system. This situation is known as memory leak. c) Write definition for function void SnakesLadders (int A[4] [4]) which assigns natural numbers to the cells of the 2D array of order 4X4, exactly like the snake
15 and ladders game boars, starting from bottom left corner of the board, as follows: (3) Ans: void SnakesLadders(int a[4][4]) { int num=1; for (int i=3;i>=0;i--) { if (i%2==1) for (int j=0;j<4;j++) {a[i][j]=num; num++; for (int j=3;j>=0;j--) {a[i][j]=num; num++; d) Find the output of the following (Assume all header files are included): (2) # include <iostream.h> #include<ctype.h> void main () { char STR [ ] = "HLY 2017" ; char *P = STR; while (*P!= '\0') { if (isdigit (*P)) *P +=2; if (isalpha(*p)) *P = *(P+1); *P = '*' ; P++; cout << STR << endl;
16 Ans : LY *4239
CLASS XII SECOND TERM EXAMINATION SUBJECT : COMPUTER SCIENCE SET A1(SOLUTIONS)
CLASS XII SECOND TERM EXAMINATION 2017-2018 SUBJECT : COMPUTER SCIENCE SET A1(SOLUTIONS) TIME ALLOWED : 3 HRS. MAX. MARKS:70 General Instructions : This paper consists of questions. There are 8 printed
More information(d) Rewrite the following program after removing all the syntax error(s), if any. [2] include <iostream.h> void main ( )
Sample Paper 2012 Class XII Subject Computer Science Time: 3 Hrs. M.M. 70 General instructions: 1) All questions are compulsory. 2) Read all the questions carefully. 3) Programming language C++. Q.1(a)
More informationPRINCE PUBLIC SCHOOL PRE-BOARD EXAMINATION ( ) SAMPLE PAPER-1 COMPUTER SCIENCE XII TIME ALLOWED: 3 HOURS
PRINCE PUBLIC SCHOOL PRE-BOARD EXAMINATION (2018-19) SAMPLE PAPER-1 COMPUTER SCIENCE XII TIME ALLOWED: 3 HOURS MAXIMUM MARKS: 70 General Instructions 1. This question paper contains 7 questions. 2. SECTION
More informationSample Paper COMPUTER SCIENCE (Theory) Class-XII Time Allowed: 3hours Maximum Marks: 70
Sample Paper- 2015 COMPUTER SCIENCE (Theory) Class-XII Time Allowed: 3hours Maximum Marks: 70 Note. (i) All questions are compulsory. (ii) Programming Language: C+ + Ques. 1 a) What is the use of inline
More informationCLASS XII COMPUTER SCIENCE(083) TimeAllowed : 3 HrsMax Marks : 70
1 CLASS XII COMPUTER SCIENCE(083) TimeAllowed : 3 HrsMax Marks : 70 General Instructions- (i) All questions are compulsory (ii) Programming Language: C++ 1. (a) Differentiate between call-by-value and
More informationSample Paper, 2015 Subject: Computer Science Class 12 th
Sample Paper, 2015 Subject: Computer Science Class 12 th Time: 3 Hours Max. Marks: 70 Instructions: i) All questions are compulsory and so attempt all. ii) Programming language: C++. iii) Please check
More informationvoid main() { int global=7 ; func( ::global,global) ; cout<<global<<, <<::global<< \n ; func(global,::global) ; cout<<global<<, <<::global<< \n ; }
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( )
More informationvoid Add() { cin >> trainnumber; gets(trainname); } void display() { cout<<trainnumber <<":"<<TrainName<<end;
. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE QUESTION BANK FOR BOARD EXAMINATION 016-17 SUBJECT COMPUTER SCIENCE (Code: 083) Q1. Answer the following questions: a) Name the header file(s) that shall be
More informationSample Paper Class XII SUBJECT : COMPUTER SCIENCE
Sample Paper - 2013 Class XII SUBJECT : COMPUTER SCIENCE FIRST SEMESTER EXAMINATION Instructions: (i) All questions are compulsory. (ii) (ii) Programming Language : C++ 1. (a) Name the header files that
More informationCOMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII
COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII TIME: 3 HOURS MAX.MARK: 70 General Instructions- (i) All questions are compulsory (ii) Programming Language: C++ 1 (a) When a function is overloaded,
More informationSample Paper 2013 SUB: COMPUTER SCIENCE GRADE XII TIME: 3 Hrs Marks: 70
Sample Paper 2013 SUB: COMPUTER SCIENCE GRADE XII TIME: 3 Hrs Marks: 70 INSTRUCTIONS: All the questions are compulsory. i. Presentation of answers should be neat and to the point. iii. Write down the serial
More informationTHE INDIAN COMMUNITY SCHOOL, KUWAIT
THE INDIAN COMMUNITY SCHOOL, KUWAIT SERIES : I SE / 2016-2017 CODE : N 083 MAX. MARKS : 70 TIME ALLOWED : 3 HOURS NO. OF PAGES : 9 COMPUTER SCIENCE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More informationJB Academy, Faizabad Half Yearly Examination Subject: Computer Science (083) Class XII
JB Academy, Faizabad Half Yearly Examination - 2017-18 Subject: Computer Science (083) Class XII Time: 3 Hours Max. Marks: 70 Instructions: i) All questions are compulsory and so attempt all. ii) Programming
More informationKUWAIT SAHODAYA EXAMINATION FIRST TERM SUBJECT : COMPUTER SCIENCE (083) : CLASS - XII SET - 3 Time : 3 Hours
KUWAIT SAHODAYA EXAMINATION FIRST TERM 08-09 SUBJECT : COMPUTER SCIENCE (08) : CLASS - XII SET - Time : Hours MM=70 Instructions- (Based on the model of CBSE Exams). a) Find and write the output of the
More informationCBSE GUESS PAPER. Roll No. Computer Sc. XII(083)/
Roll No. CBSE GUESS PAPER Computer Sc. XII(083)/2011-12 Time Allowed 3 Hours Maximum Marks- 70 General Instructions: (i) All questions are compulsory. (ii) The paper contains 7 questions. (iii) Programming
More informationKENDRIYA VIDYALAYA SANGATHAN (KOLKATA REGION) Second Pre Board Examination ( ) COMPUTER SCIENCE (Theory) Class-XII Marking Scheme
KENDRIYA VIDYALAYA SANGATHAN (KOLKATA REGION) Second Pre Board Examination (2014-15) COMPUTER SCIENCE (Theory) Class-XII Marking Scheme Ques. 1 a) [1] Automatic Type Conversion Type casting It is also
More informationEAS 230 Fall 2002 Section B
EAS 230 Fall 2002 Section B Exam #2 Name: Person Number: Instructions: ƒ Total points are 100, distributed as shown by [ ]. ƒ Duration of the Exam is 50 minutes. I ) State whether True or False [25] Indicate
More informationCS201 Latest Solved MCQs
Quiz Start Time: 09:34 PM Time Left 82 sec(s) Question # 1 of 10 ( Start time: 09:34:54 PM ) Total Marks: 1 While developing a program; should we think about the user interface? //handouts main reusability
More informationModel Sample Paper 2015
Time: 3 Hours MM: 70 Model Sample Paper 2015 Class XII Computer Science (083) Instructions: (i) (ii) All questions are compulsory. Programming Language C++. 1. (a) What is the difference between Actual
More information(a) Differentiate between a call by value and call by reference method.
ATOMIC ENERGY CENTRAL SCHOOL NO- RAWATBHATA Half Yearly Examination 05 Model Paper Class XII Subject Computer Science Time Allowed: hours Maximum Marks: 70 Note. (i) All questions are compulsory. (ii)
More informationSAMPLE PAPER. Class: XII SUBJECT COMPUTER SCIENCE. Time: 3 Hours MM: 70
SAMPLE PAPER Class - XII SUBJECT COMPUTER SCIENCE Subject: Computer Sc. Class: XII Time: 3 Hours MM: 70 1. (a) Differentiate between a global variable and a local variable. (b) Name the Header file(s)
More informationSeries SHC COMPUTER SCIENCE. Code No. 91. Roll No.
Roll No. Series SHC Code No. Please check that this question paper contains 11 printed pages. Code number given on the right hand side of the question paper should be written on the title page of the answer-book
More informationKendriyaVidyalayaSangathan Kolkata Region
KendriyaVidyalayaSangathan Kolkata Region Third Pre-Board Examination : 204-5 Please check that this question paper contains 7 questions. Please write down the Serial Number of the question before attempting
More informationComputer programs are associated to work with files as it helps in storing data & information permanently. File - itself a bunch of bytes stored on
Computer programs are associated to work with files as it helps in storing data & information permanently. File - itself a bunch of bytes stored on some storage devices. In C++ this is achieved through
More informationQuiz Start Time: 09:34 PM Time Left 82 sec(s)
Quiz Start Time: 09:34 PM Time Left 82 sec(s) Question # 1 of 10 ( Start time: 09:34:54 PM ) Total Marks: 1 While developing a program; should we think about the user interface? //handouts main reusability
More informationDATA FILE HANDLING FILES. characters (ASCII Code) sequence of bytes, i.e. 0 s & 1 s
DATA FILE HANDLING The Language like C/C++ treat everything as a file, these languages treat keyboard, mouse, printer, Hard disk, Floppy disk and all other hardware as a file. In C++, a file, at its lowest
More informationKENDRIYA VIDYALAYA SANGATHAN, COMPUTER SCIENCE (THEORY) I PRE-BOARD TIME 3 HRS CLASS XII M. Marks 70
KENDRIYA VIDYALAYA SANGATHAN, COMPUTER SCIENCE (THEORY) I PRE-BOARD TIME 3 HRS CLASS XII M. Marks 70 GENERAL INSTRUCTIONS : 1. ALL QUESTIONS ARE COMPULSORY. 2. PROGRAMMING LANGUAGE : C++ Q1. (a) Out of
More informationDELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION
DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION 2017 2018 Class: XII Subject : Computer Science Assignment No. 3 1. a) What is this pointer? Explain with example. b) Name the header file
More informationI BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions.
Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Reaccredited at the 'A' Grade Level by the NAAC and ISO 9001:2008 Certified CRISL rated 'A'
More informationUNIT- 3 Introduction to C++
UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage
More informationObject Oriented Pragramming (22316)
Chapter 1 Principles of Object Oriented Programming (14 Marks) Q1. Give Characteristics of object oriented programming? Or Give features of object oriented programming? Ans: 1. Emphasis (focus) is on data
More informationGuru Harkrishan Public School, Karol Bagh Pre Mock Class XII Sub: COMPUTER SCIENCE Allowed :3 hrs
Guru Harkrishan Public School, Karol Bagh Pre Mock 2014-15 Class XII Sub: COMPUTER SCIENCE Time Allowed :3 hrs M.M. 70 Please check that this question paper contains 9 printed pages. Please check that
More informationDELHI PUBLIC SCHOOL BOKARO STEEL CITY
DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION 2015-2016 Class: XII Subject : Computer Science Assignment No. 3 Question 1: (a) What is the difference between Call by Value and Call by
More informationBHARATIYA VIDYA BHAVAN S V.M.PUBLIC SCHOOL, VADODARA. Class : XII SAMPLE PAPER Max Marks : 70
BHARATIYA VIDYA BHAVAN S V.M.PUBLIC SCHOOL, VADODARA Class : XII SAMPLE PAPER Max Marks : 70 Subject : Computer Science Time Allotted : 3 hrs General Instructions : Programming Language : C++. All questions
More informationKE DRIYA VIDYALAYA SA GATHA,CHE AI REGIO. COMMO PRE-BOARD EXAMI ATIO COMPUTER SCIE CE CLASS- XII Time allowed : 3 hours Maximum Marks : 70
KE DRIYA VIDYALAYA SA GATHA,CHE AI REGIO. COMMO PRE-BOARD EXAMI ATIO 2008-09. COMPUTER SCIE CE CLASS- XII Time allowed : 3 hours Maximum Marks : 70 1. (a) Explain the difference between an actual parameter
More informationAfter going through this lesson, you would be able to: store data in a file. access data record by record from the file. move pointer within the file
16 Files 16.1 Introduction At times it is required to store data on hard disk or floppy disk in some application program. The data is stored in these devices using the concept of file. 16.2 Objectives
More information(1)Given a binary file PHONE.DAT, containing records of the following structure type class Phonlist { char Name[20]; char Address[30]; char
(1)Given a binary file PHONE.DAT, containing records of the following structure type class Phonlist char Name[20]; char Address[30]; char AreaCode[5]; char PhoneNo[15]; Public: void Register(); void Show();
More informationCode No. 083 Time allowed: 3 hours Maximum Marks: 70 Instructions: (i) All questions are compulsory. (ii) Programming language: C++
Sample Paper Class XII Subject Computer Science Please check that this question paper contains 7 printed pages. Code number given on the right hand side of the question paper should be written on the title
More informationA stream is infinite. File access methods. File I/O in C++ 4. File input/output David Keil CS II 2/03. The extractor and inserter form expressions
Topic: File input/output I. Streams II. Access methods III. C++ style Input, output, random access Stream classes: ifstream, ofstream IV. C style The FILE data type Opening files Writing to, reading text
More informationCOMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE
COMMON PRE-BOARD EXAMINATION 2017-2018 Subject Code: 083 CLASS: XII COMPUTER SCIENCE Time Allowed: 3 hours Maximum Marks: 70 Instructions- (i) Please check that this question paper contains 11 printed
More informationBRAIN INTERNATIONAL SCHOOL. Computer Science Assignment CLASS XII OCTOBER 2018 Chapter-7. Data File Handling in C++ Text Files
BRAIN INTERNATIONAL SCHOOL Computer Science Assignment CLASS XII OCTOBER 2018 Chapter-7. Data File Handling in C++ Text Files Question 1 Question 2 Question 3 Question 4 Question 5 Question 6 Write a C++
More informationCS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010
CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011 Lectures 1-22 Moaaz Siddiq Asad Ali Latest Mcqs MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please
More informationI Mid Semester May 2012 : Class XII : Computer Science Max Mark 50 : Time 2 Hrs. 1. a) What is macro in C++? Give example 2
I Mid Semester May 01 : Class XII : Computer Science Max Mark 50 : Time Hrs 1. a) What is macro in C++? Give example b) Give the Header file for the following functions:- i) gets ( ) ii) tolower( ) 1 c)
More informationObject Oriented Programming Using C++ UNIT-3 I/O Streams
File - The information / data stored under a specific name on a storage device, is called a file. Stream - It refers to a sequence of bytes. Text file - It is a file that stores information in ASCII characters.
More informationSPLIT-UP SYLLABUS ----CHENNAI REGION COMPUTER SCIENCE (Code: 083) Class-XII Academic Session
SPLIT-UP SYLLABUS ----CHENNAI REGION COMPUTER SCIENCE (Code: 083) Class-XII Academic Session 2008-09 Sr.No. Duration Number of Working Days From To Topic to be Covered Nos. of Periods required CAL/TAL
More informationHOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science
HOLIDAYS HOMEWORK 2017-18 CLASS : XII Subject : Computer Science Note : Attempt the following questions in a separate register and make yourself prepared to conquer the world. Chapter- 1 : C++ Revision
More informationvoid display(){ cout << trainno.<< :>>Description<<endl; }; void main() {TRAIN T; Entry.(); Display.(); d) 410 e) i) south:east:south f) temttoe
Marking Scheme SUBJECT COMPUTER SCIENCE Class XII Ist Preboard 2016 Q. No. 1 a) 1 Marks for definition and 1 marks for explain relation with classes objects. the wrapping of data and operation / function
More informationChapter-11 POINTERS. Important 3 Marks. Introduction: Memory Utilization of Pointer: Pointer:
Chapter-11 POINTERS Introduction: Pointers are a powerful concept in C++ and have the following advantages. i. It is possible to write efficient programs. ii. Memory is utilized properly. iii. Dynamically
More informationShort Notes of CS201
#includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system
More informationC++ Binary File I/O. C++ file input and output are typically achieved by using an object of one of the following classes:
C++ Binary File I/O C++ file input and output are typically achieved by using an object of one of the following classes: ifstream for reading input only. ofstream for writing output only. fstream for reading
More informationCOMPUTER SCIENCE
Final 2012-13 COMPUTER SCIENCE - 083 (Theory) CLASS XII Time allowed : 3 hours Maximum marks: 70 Instructions : i) All the questions are compulsory. ii) Programming Language : C++. 1. a) What is the difference
More informationUnit-V File operations
Unit-V File operations What is stream? C++ IO are based on streams, which are sequence of bytes flowing in and out of the programs. A C++ stream is a flow of data into or out of a program, such as the
More informationCS201 - Introduction to Programming Glossary By
CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with
More informationPOINTERS - Pointer is a variable that holds a memory address of another variable of same type. - It supports dynamic allocation routines. - It can improve the efficiency of certain routines. C++ Memory
More informationComputer Science XII Important Concepts for CBSE Examination Questions
Computer Science XII Important Concepts for CBSE Examination Questions LEARN FOLLOWIING GIVEN CONCEPS 1. Encapsulation: Wraps up data and functions under single unit through class. Create a class as example.
More informationCS201 Spring2009 Solved Sunday, 09 May 2010 14:57 MIDTERM EXAMINATION Spring 2009 CS201- Introduction to Programming Question No: 1 ( Marks: 1 ) - Please choose one The function of cin is To display message
More informationCome and join us at WebLyceum
Come and join us at WebLyceum For Past Papers, Quiz, Assignments, GDBs, Video Lectures etc Go to http://www.weblyceum.com and click Register In Case of any Problem Contact Administrators Rana Muhammad
More informationBasic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable
Basic C++ Overview C++ is a version of the older C programming language. This is a language that is used for a wide variety of applications and which has a mature base of compilers and libraries. C++ is
More informationCPE Summer 2015 Exam I (150 pts) June 18, 2015
Name Closed notes and book. If you have any questions ask them. Write clearly and make sure the case of a letter is clear (where applicable) since C++ is case sensitive. You can assume that there is one
More informationSAMPLE PAPER-2015 CLASS-XII COMPUTER SCIENCE. Sample paper-i. Time allowed: 3 hours Maximum Marks: 70 Name : Roll No.:
SAMPLE PAPER-2015 CLASS-XII COMPUTER SCIENCE Sample paper-i Time allowed: 3 hours Maximum Marks: 70 Name : Roll No.: General Instruction 1. Please check that this question paper contains 7 questions. 2.
More informationPointers, Dynamic Data, and Reference Types
Pointers, Dynamic Data, and Reference Types Review on Pointers Reference Variables Dynamic Memory Allocation The new operator The delete operator Dynamic Memory Allocation for Arrays 1 C++ Data Types simple
More information(d) Observe the following C++ code very carefully and rewrite it after removing any/all syntactical errors: [2] Include < iostream.
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
More informationC++_ MARKS 40 MIN
C++_16.9.2018 40 MARKS 40 MIN https://tinyurl.com/ya62ayzs 1) Declaration of a pointer more than once may cause A. Error B. Abort C. Trap D. Null 2Whice is not a correct variable type in C++? A. float
More informationKENDRIYA VIDYALAYA SANGATHAN (CHANDIGARH REGION) MARKING SCHEME (Ist Pre Board )
KENDRIYA VIDYALAYA SANGATHAN (CHANDIGARH REGION) MARKING SCHEME (Ist Pre Board 018-19) 1 Ans: (i) Relational (ii) Relational (iii)logical (iv) Arithmetic (a) ½ Marks for each correct (b) Ans:Following
More informationAdvanced File Operations. Review of Files. Declaration Opening Using Closing. CS SJAllan Chapter 12 2
Chapter 12 Advanced File Operations Review of Files Declaration Opening Using Closing CS 1410 - SJAllan Chapter 12 2 1 Testing for Open Errors To see if the file is opened correctly, test as follows: in.open("cust.dat");
More informationExam 3 Chapters 7 & 9
Exam 3 Chapters 7 & 9 CSC 2100-002/003 29 Mar 2017 Read through the entire test first BEFORE starting Put your name at the TOP of every page The test has 4 sections worth a total of 100 points o True/False
More informationKENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION CLASS:XII - (COMPUTER SCIENCE )
KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION 2014-15 CLASS:XII - (COMPUTER SCIENCE ) MaxMarks:70 Time Allowed :3 Hours Instructions: (i) All questions are compulsory.
More informationCLASS-XI COMPUTER SCIENCE
Roll No. Code : 112014-083-A Please check that this question paper contains 7 questions and 8 printed pages. CLASS-XI COMPUTER SCIENCE Time Allowed : 3 Hrs. Maximum Marks : 70 General Instructions : All
More informationThis chapter introduces the notion of namespace. We also describe how to manage input and output with C++ commands via the terminal or files.
C++ PROGRAMMING LANGUAGE: NAMESPACE AND MANGEMENT OF INPUT/OUTPUT WITH C++. CAAM 519, CHAPTER 15 This chapter introduces the notion of namespace. We also describe how to manage input and output with C++
More informationKENDRIYA VIDYALAYA SANGATHAN. Regional Office Delhi Split-up Syllabus Session Subject:-Computer Science Subject Code:-083
KENDRIYA VIDYALAYA SANGATHAN Regional Office Delhi Split-up Syllabus Session-2017-18 Subject:-Computer Science Subject Code:-083 COMPUTER SCIENCE (083)-Theory CLASS XII Unit wise Weightage of Marks Duration:3
More informationMock Test Paper-2. CBSE XII : Computer Science. Duration : 3hrs Max Marks : 70
Mock Test Paper-2 CBSE XII : Computer Science Mock Test Paper-2 1 Duration : 3hrs Max Marks : 70 1. (a) What is the difference between Object Oriented Programming and Procedural programming? 2 (b) Write
More informationA First Program - Greeting.cpp
C++ Basics A First Program - Greeting.cpp Preprocessor directives Function named main() indicates start of program // Program: Display greetings #include using namespace std; int main() { cout
More informationBLUE PRINT SUBJECT: - COMPUTER SCIENCE(083) CLASS-XI. Unit Wise Marks
BLUE PRINT SUBJECT: - COMPUTER SCIENCE(083) CLASS-XI Unit Wise Marks Unit No. Unit Name Marks 1. COMPUTER FUNDAMENTAL 10 2. PROGRAMMING METHODOLOGY 12 3. INTRODUCTION TO C++ 1. INTRODUCTION TO C++ 3 TOTAL
More informationDownloaded from
ASSIGNMENT 1 TOPIC : File Handling TYPE 1 QUESTION : ( Statement write type questions ) Q1. Observe the program segment given below carefully and fill the blanks marked as Statement 1 and Statement 2 using
More informationCPE 112 Spring 2015 Exam II (100 pts) March 4, Definition Matching (8 Points)
Name Definition Matching (8 Points) 1. (8 pts) Match the words with their definitions. Choose the best definition for each word. Relational Expression Iteration Counter Count-controlled loop Loop Flow
More informationSECTION A (15 MARKS) Answer ALL Questions. Each Question carries ONE Mark. 1 (a) Choose the correct answer: (10 Marks)
SECTION A (15 MARKS) Answer ALL Questions. Each Question carries ONE Mark. 1 (a) Choose the correct answer: (10 Marks) 1. The function is used to reduce function call a. Overloading b. Inline c. Recursive
More informationCLASS XII GUESS PAPER COMPUTER SCENCE (083)
CLASS XII GUESS PAPER COMPUTER SCENCE (083) TIME: 3 hours MARKS: 70 Q1. Please check that this question paper contains 11 printed pages. Code-snippets in questions may be printed wrong rectify the errors
More informationl 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)
Final Exam Exercises Chapters 1-7 + 11 Write C++ code to: l Determine if a number is odd or even CS 2308 Fall 2016 Jill Seaman l Determine if a number/character is in a range - 1 to 10 (inclusive) - between
More informationChapte t r r 9
Chapter 9 Session Objectives Stream Class Stream Class Hierarchy String I/O Character I/O Object I/O File Pointers and their manipulations Error handling in Files Command Line arguments OOPS WITH C++ Sahaj
More informationSAMPLE PAPER 2015 SUB - COMPUTER SCIENCE - (Theory) CLASS XII Time allowed: 3 hours Maximum marks: 70
SAMPLE PAPER 215 SUB - COMPUTER SCIENCE - (Theory) CLASS XII Time allowed: 3 hours Maximum marks: 7 Instructions : i) All the questions are compulsory. ii) Programming Language (for Q. 1-4): C++ iii) Write
More information4. BOOLEAN ALGEBRA 8 5. NETWORKING AND OPEN SOURCE SOFTWARE 10
SPLIT UP SYLLABUS SUBJECT : COMPUTER SCIENCE (083) SESSION:2014-15 Class XII (Theory) - C++ Duration: 3 hours Total Marks: 70 Unit No. Unit Name MARKS 1 OBJECT ORIENTED PROGRAMMING IN C++. 2. DATA STRUCTURE
More informationCOMPUTER SCIENCE Time allowed : 3hours] [Maximum Marks :70
COMPUTER SCIENCE-2010 Time allowed : 3hours] [Maximum Marks :70 Instructions (i) (ii) All questions are compulsory Programming Language : C++ 1. (a) What is the difference between automatic type conversion
More informationKENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE
CLASS- XII MAX MARKS-70 KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION 01-15 SUBJECT COMPUTER SCIENCE TIME- HOURS Q1 a) What is the Difference between Global Variable and Local Variable?
More informationDownloaded from Computer Science 083
Computer Science 083 (Solved Paper) Time Allowed : 3hours Maximum Marks 70 General Instructions 1. All Questions are compulsory 2. Programming Language : C++ 1. (a) Differentiate between a Logical Error
More informationKE DRIYA VIDYALAYA SA GATHA, CHE AI REGIO. COMMO PRE-BOARD EXAMI ATIO COMPUTER SCIE CE (CLASS-XII) MARKI G SCHEME
KE DRIYA VIDYALAYA SA GATHA, CHE AI REGIO. COMMO PRE-BOARD EXAMI ATIO 2008-09. COMPUTER SCIE CE (CLASS-XII) MARKI G SCHEME 1 1. (a) (i) Arrays bring together a group of items of the same data type whereas
More informationSAMPLE QUESTION PAPER CLASS-XII, SESSION: SUBJECT: COMPUTER SCIENCE
SAMPLE QUESTION PAPER CLASS-XII, SESSION: 07-8 SUBJECT: COMPUTER SCIENCE Time: hrs Max. Marks: 70 General Instructions: i. All questions are compulsory. ii. Programming language: C++ iii. Database query
More informationWhat is Pointer? Pointer is a variable that holds a memory address, usually location of another variable.
CHAPTER 08 POINTERS What is Pointer? Pointer is a variable that holds a memory address, usually location of another variable. The Pointers are one of the C++ s most useful and powerful features. How Pointers
More informationKENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SECOND PREBOARD EXAMINATION FOR CLASS XII SUBJECT: COMPUTER SCIENCE
KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SECOND PREBOARD EXAMINATION 2014-15 FOR CLASS XII SUBJECT: COMPUTER SCIENCE SET-I F.M. 70 General Instructions: Programming Language C++ All Questions are
More informationFor Teacher's Use Only Q No Total Q No Q No
Student Info Student ID: Center: Exam Date: FINALTERM EXAMINATION Spring 2010 CS201- Introduction to Programming Time: 90 min Marks: 58 For Teacher's Use Only Q No. 1 2 3 4 5 6 7 8 Total Marks Q No. 9
More informationCS2255 HOMEWORK #1 Fall 2012
CS55 HOMEWORK #1 Fall 01 1.What is assigned to the variable a given the statement below with the following assumptions: x = 10, y = 7, and z, a, and b are all int variables. a = x >= y; a. 10 b. 7 c. The
More informationDownloaded from
SAMPLE PAPER 4 COMPUTER SCIENCE (083) CLASS XII Time allowed: 3Hrs Maximum Marks :70 Instructions: i) All the questions are compulsory ii) Programming Language C++ 1. (a) What is the difference between
More informationVuZs Team's Work. CS201 Spring Solved by vuzs Team with Reference Written by Administrator Wednesday, 19 May :52
CS201 Spring2009 5 Solved by vuzs Team with Reference Written by Administrator Wednesday, 19 May 2010 17:52 MIDTERM EXAMINATION Spring 2009 CS201- Introduction to Programming Shared & Solved by vuzs Team
More informationKENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)
KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION CLASS XII COMMON PREBOARD EXAMINATION 05-06 COMPUTER SCIENCE (08) Time: hours Max. Marks: 70 Instructions: (i) All questions are compulsory. (ii) Programming
More informationQuestion Bank Class XII Subject : Computer Science
Question Bank Class XII Subject : Computer Science Q1. What is the difference between call by reference & call by value method in a user defined function in C++? Explain it with suitable example. Q.2.Write
More informationSTRUCTURED DATA TYPE ARRAYS IN C++ ONE-DIMENSIONAL ARRAY TWO-DIMENSIONAL ARRAY
STRUCTURED DATA TYPE ARRAYS IN C++ ONE-DIMENSIONAL ARRAY TWO-DIMENSIONAL ARRAY Objectives Declaration of 1-D and 2-D Arrays Initialization of arrays Inputting array elements Accessing array elements Manipulation
More informationData Structure using C++ Lecture 04. Data Structures and algorithm analysis in C++ Chapter , 3.2, 3.2.1
Data Structure using C++ Lecture 04 Reading Material Data Structures and algorithm analysis in C++ Chapter. 3 3.1, 3.2, 3.2.1 Summary Infix to Postfix Example 1: Infix to Postfix Example 2: Postfix Evaluation
More informationCOMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE
SET Subject Code: 08 COMMON PRE-BOARD EXAMINATION 07-08 COMPUTER SCIENCE CLASS XII Time Allowed: hours Maximum Marks: 70 General Instructions: Please check that this question paper contains 9 printed pages.
More informationFile I/O Christian Schumacher, Info1 D-MAVT 2013
File I/O Christian Schumacher, chschuma@inf.ethz.ch Info1 D-MAVT 2013 Input and Output in C++ Stream objects Formatted output Writing and reading files References General Remarks I/O operations are essential
More informationObject Oriented Programming In C++
C++ Question Bank Page 1 Object Oriented Programming In C++ 1741059 to 1741065 Group F Date: 31 August, 2018 CIA 3 1. Briefly describe the various forms of get() function supported by the input stream.
More informationGiven the C++ declaration statement below, which of the following represents the value of exforsys? e) None of the above. 1K
Instruction: When specified, you may choose more than one answer; otherwise, choose ONE answer for each question. Choose the answer(s) by circling it/them on the Answer Sheet provided. Questions 1-12 are
More information