Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
20Activity
0 of .
Results for:
No results containing your search query
P. 1
Sample Papers Class XII Computer Science

Sample Papers Class XII Computer Science

Ratings: (0)|Views: 4,534|Likes:
Published by KNOWLEDGE CREATORS

More info:

Published by: KNOWLEDGE CREATORS on Mar 07, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

02/01/2013

pdf

text

original

 
Contact Dr. T.K. Jain (91-9414430763) regarding starting AFTERSCHO?ï OL centres inyour college / institution / organisation. Promote social entrepreneurship, join PGPSE andbecome a social entrepreneur. Emial us : afterschoool@in.comAFTERSCHO?nOL CENTRE FOR SOCIAL ENTREPRENEURSHIP –Let us Change the World www.afterschoool.tk Join PGPSE along with CS after class 12
MODEL PAPER
Class XII (COMPUTERSCIENCE)
Sample Question Paper –1Time Duration 3 Hrs Max. Marks 70
Note
1. All question ae Compulsory2. Programming Language C++
1 Answer the followingA Name the header file of c++ which following function belongs 2i) clrscr() ii gets() iii toupper() iv isdigit()B What is the difference between local and global variables ? Give the Examplesof boths 2C Rewrite the following program after removing all syntaxerrors if any 2#include(iostream.h)Void main();{int X[]=60,50,30,40},Y=0;count=4;cin>>Y;for(i=count-1;i>=0,i--)switch(i){case 0 :case 2: cout<<Y*X[i]<<endl;break;case 1 :case 3 : cout>> Y+X[i];}}D Write the output of the following program 2void main(){int x=5;int y=5;cout<<x--;cout<<”,”;cout<< --x;cout<<”,”;cout<<y--<<”,”<< --y;}E. Explain Nested Structure with Example 2F. Will the syntax error if any (Give the reason for error) 2Class ABC{int x=10;
 
Contact Dr. T.K. Jain (91-9414430763) regarding starting AFTERSCHO?ï OL centres inyour college / institution / organisation. Promote social entrepreneurship, join PGPSE andbecome a social entrepreneur. Emial us : afterschoool@in.comAFTERSCHO?nOL CENTRE FOR SOCIAL ENTREPRENEURSHIP –Let us Change the World www.afterschoool.tk Join PGPSE along with CS after class 12
float y;abc(){ y=5;}~( ){ }void main(){ABC a1,a2;}2 Answer the followingA Explain Protected, Private and public members of a class in context of inhertence 2B Answer the following question i and ii after going through the following class 2class Exam{int marks;char subject[20];public :Exam() //Function 1{ marks=0;strcpy(subject,”Computer”);}Exam(char s[]) //Function 2{ marks=0;strcpy(subject,s);}Exam(int m) //Function 3{ marks=m;strcpy(subject,”Computer”);}Exam(int m, char s[]) //Function 4{ marks=m;strcpy(subject,s);}}i Write a statement in C++ that would execute functions 3 and function 4 of class Examii Which features ogf object oriented programming is demonstrated using function 1 function 2function 3 and function 4 in the above class.C Define a class travel in c++ with the following descriptions 4Private membersTravel code of type longPlace of type character arrayNo_of_travellers of type integerNo_of_buses of type integerPublic membersAconstructor to assign initial values of travel code as 201, place as “Nanital” ,no_of_travellers as10 no_of buses as 1A function newtravel() which allow user to enter travel code place and no_oftravelers also assign a value of no_of_buses as per the following conditionNo of traveler no of busesLess than 20 1Equal to 20 or less than 40 2Equal to 40 o more than 40 3A function show_travel() to display the content from all the data members on screen.
 
Contact Dr. T.K. Jain (91-9414430763) regarding starting AFTERSCHO?ï OL centres inyour college / institution / organisation. Promote social entrepreneurship, join PGPSE andbecome a social entrepreneur. Emial us : afterschoool@in.comAFTERSCHO?nOL CENTRE FOR SOCIAL ENTREPRENEURSHIP –Let us Change the World www.afterschoool.tk Join PGPSE along with CS after class 12
D. Explain polymorphism with suitable example? 43 Answer the followingA
Write a Function in C++ to print the sum of all four corners of a twodimensional array.
[Assuming the 2D Array to be a square matrix with odd dimension 3i.e. 3×3, 5×5, 7×7 etc...]Example, if the array content is3 5 47 6 92 1 8Output through the function should be :The sum of corner is 3+4+2+8= 17
B An Array MAT[30][10] is to stored in memory column wise with each elements occupying 8bytes of memory. Find out the base address and the address of element MAT[20][5], if thelocation of MAT[5][7] is stored at address 1000. 4C Write a Function in UPPER HALF() which takes a two dimensional array A with size N rowsand N columns as argument and point the upper half of the array. 2ThaArray is3 4 2 5 52 1 2 3 42 1 2 3 34 2 1 2 11 2 4 7 1The output is3 4 2 5 51 2 3 42 3 32 11D Write a function to perform a PUSH Operation on a dynamically allocated stack containg realnumber? 3E Evaute the expression 562+*124/- in tabular form showing stack after every step 24 Answer the followingA Assuming that a text file named First.TXT contains some text written into it, write a functionnamed vowelwords(), that reads the first.txt and create a new file named second.txt to containonly those words from the file First.txt which start with a lowercase vowel(i.e. ‘a’,’e’,’I’,’o’,’u’) Forexample 3Carry umbrella and overcoat when it rainsThen the file second.txt containsUmbrella and overcoat itB Write a function to open a files in read and write mode 1C Write a c++ function copies all the lowercase letters in text file called “mytext.txt” into file calledlower.txt2

Activity (20)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
sultancenter liked this
Gurpreet Singh liked this
Kavita Chauhan liked this
Akshay Jiniwal liked this
Subodh Kumar liked this
Champ Plunky added this note
bekar hai
Rahul Tiwari liked this
Seema Bharti liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->