DAV PUBLIC SCHOOLS, ODISHA, ZONE-II QUESTION BANK CLASS: XII-COMPUTER SCIENCE (083)

Size: px
Start display at page:

Download "DAV PUBLIC SCHOOLS, ODISHA, ZONE-II QUESTION BANK CLASS: XII-COMPUTER SCIENCE (083)"

Transcription

1 DAV PUBLIC SCHOOLS, ODISHA, ZONE-II QUESTION BANK CLASS: XII-COMPUTER SCIENCE (083) ALL THE BEST TO OUR BELOVED STUDENTS 0 P a g e

2 CHAPTER-I & II C++ REVISION TOUR & OOPS 1 Marks questions 1. Name the header files that shall be needed for the following code: void main( ) char String* + = String ; cout << setw(2)<<string; 2. Which C++ header file(s) will be essentially required to be include to run/execute the following C++ code: void main() int Rno=24; char name* += Alma Mater ; cout<<setw(10)<<rno<<setw(20)<<name<<endl; 3. Name the header file(s) that shall be needed for successful compilation of the following C++ code. void main( ) char String[20]; gets(string); strcat(string, CBSE ); puts(string); 4. Which C++ header file(s) will be essentially required to execute the following C++ code: void main() int x=8; float res; res=sqrt(x); cout<<setprecision(2)<<res; 5. Name the header files required to execute the following code: void main() double d = 32.5; char c = 3 ; if(isalnum(c)) cout<<ceil(d); 6. Name the header file(s), which are not necessary to run the following program segment : #include<iostream.h> #include<stdio.h> #include<ctype.h> #include<math.h> void main( ), char ch= m, ch1 ; if(islower(ch)) ch1=toupper(ch); else ; cout<<ch<< turned to <<ch1<<endl; 1 P a g e

3 07. Name the header file to which the following belong: (i) pow ( ) (ii)random( ) 08. Name the header files to which the following belong: (i) abs( ) (ii) strcmp( ) 09. Name the header files to which the following belong: [AI 2005] (i) puts( ) (ii) isalnum( ) 10. Write the names of the header files to which the following belong: (i) gets( ) (ii) strcmp( ) (iii) ceil( ) (iv) gotoxy( ) 11. Name the header files of C++ to which the following functions belong: (i)get( ) (ii)open( ) (iii)abs( ) (iv)strcat( ) 12. Name the header file, to which following built in function belong: (i) isupper( ) ( ii)setw() (iii)exp( ) (iv)strcmp( ) 13. Why main( ) function is so special. Give two reasons? 14. Name the header file of C++ to which following functions belong. (i)strcat( ) (ii) scanf( ) (iii) getchar( ) (iv)clrscr( ) 15. Name the header files, to which the following built in functions belongs to: (i)isalnum( ) (ii)setw( ) (iii)toupper( ) (iv)strcpy( ) 16. Name the header file to, which following built-in functions belong: (i) floor() (ii) isdigit() (iii) log() (iv) puts() 2 Marks/ 3 Marks questions: 1. Out of the following, find those identifiers, which can not be used for naming Variable, Constants or Functions in a C++ program: Total*Tax, double, Case, My Name, NeW, switch, Column31, _Amount 2. Out of the following, find those identifiers, which can be used for naming Variable, Constants or Functions in a C++ program: For, while, INT, NeW, delete, 1stName, Add+Subtract, name1 3. Out of the following, find any two identifiers, which can not be used for naming Variables, Constants or Functions and any two identifiers which can be used for naming Variables, Constants or Functions in a C++ program: Total*wages, NeW, double, switch,, INT, My Name, For, _Sum 4. What is reference variable? What is its usage? 5. What are actual and formal parameters of a function? 6. Differentiate between Local and Global variable. 7. What is the difference between #include pre-processor directive and a macro. Define with an example. 8. Differentiate between call by value and call by reference. 9. Differentiate between pre-test loop and post-test loop. 10. What is the use of the keyword typedef? Give an example. 11. Rewrite the following program after removing the syntactical error(s) if any. Underline each correction. #include<iostream.h> void main( ) F = 10, S = 20; test(f;s); test(s); void test(int x, int y = 20) x=x+y; count<<x>>y; 2 P a g e

4 12. Rewrite the following C++ program after removing the syntax error(s) if any. Underline each correction. include<iostream.h> class FLIGHT Long FlightCode; Char Description[25]; public void addinfo() cin>>flightcode; gets(description); void showinfo() cout<<flightcode<< : <<Description<<endl; ; void main( ) FLIGHT F; addinfo.f(); showinfo.f; 13. Rewrite the following program after removing the syntax error(s) if any. Underline each correction. #include<iostream.h> void main( ) One=10,Two=20; Callme(One,Two); Callme(Two); void Callme(int Arg1,int Arg2) Arg1=Arg1+Arg2; count<<arg1>>arg2; 14. In the following program, find the correct possible output(s)from the options: #include<stdlib.h> #include<iostream.h> void main( ) randomize( ); char Area* +*10+=, NORTH, SOUTH, EAST, WEST -; int ToGo; for(int I=0; I<3;I++) ToGo=random(2) + 1; cout<<area*togo+<< : ; - - Outputs: (i) SOUTH : EAST : SOUTH : (ii) NORTH : SOUTH : EAST : (iii) SOUTH : EAST : WEST : (iv) SOUTH : EAST : EAST : 15. Rewrite the following program after removing the syntactical error(s) if any. Underline each correction. #include<iostream.h> const int Max 10; void main() int Numbers[Max]; Numbers = 20,50,10,30,40; 3 P a g e

5 for(loc=max-1;loc>=10;loc--) cout>>numbers[loc]; 16. Look at the following C++ code and find the possible output(s) from the options (i) to (iv) following it. Also, write the maximum and the minimum values that can be assigned to the variable PICKER. Note: Assume all the required header files are already being included in the code. The function random(n) generates an integer between 0 and n 1 void main() randomize(); int PICKER; PICKER=1+random(3); char COLOR[][5]= BLUE, PINK, GREEN, RED ; for(int I=0;I<=PICKER; I++) for(int J=0; J<=I;J++) cout<<color[j]; cout<<endl; 17. In the following C++ program what is expected value of myscore from options (i) to (iv) given below. #include<stdlib.h> #include<iostream.h> void main( ) randomize( ); int score[ ]= 25, 20,34,56, 72, 63; int myscore=score[2+random(2)]; cout<<myscore<<endl; i) 25 ii) 34 iii) 20 iv) None of these 18. Find the output of the following program #include<iostream.h> void main( ) long NUM= ; int F=0,S=0; do int R=NUM % 10; if (R %2!= 0) F += R; else S += R; 4 P a g e

6 NUM / = 10; while (NUM>0); cout<<f-s; 19. Rewrite the following program after removing the syntactical error(s), if any. Underline each correction. #include<iostream.h> const int Multiple 3; void main( ) value = 15; for(int Counter = 1;Counter = <5;Counter ++, Value -= 2) if(value%multiple = = 0) cout<<value * Multiple; cout<<end1; else cout<<value + Multiple <<endl; 20. Find the output of the following program #include<iostream.h> #include<string.h> #include<ctype.h> void Convert(char Str[ ],int Len) for(int Count=0;Count<Len;Count++) if(isupper(str[count])) Str[Count]=tolower(Str[Count]); else if (islower(str[count])) Str[Count]=toupper(Str[Count]); else if(isdigit(str[count])) Str[Count]=Str[Count]+1; else Str[Count]=.*.; void main( ), char Text* += CBSE Exam 2005 ; int Size = strlen(text); Convert(Text,Size); cout<<text<<endl; for(int C=0,R=Size. 1;C<=Size/2;C++,R--) char Temp=Text[C]; Text[C]=Text[R]; Text[R]=Temp; cout<<text<<endl; 21. The following code is from a game, which generate a set of 4 random numbers. Praful is playing this game, help him to identify the correct option(s) out of the four choices given below as the possible set of such numbers generated from the program code so that he wins the game. Justify your answer. #include<iostream.h> #include<stdlib.h> const int LOW=25; void main() randomize(); int POINT=5, Number; for(int I=1;I<=4;I++) 5 P a g e

7 Number=LOW+random(POINT); cout<<number<<":" <<endl; POINT--; (i) 29:26:25:28: (ii)24:28:25:26: (iii) 29:26:24:28; (iv)29:26:25:26: 22. Rewrite the following program after removing the syntactical errors (if any). Underline each correction. #include [iostream.h] class MEMBER int Mno;float Fees; PUBLIC: void Register()cin>>Mno>>Fees; void Displaycout<<Mno<<" : "<<Fees<<endl; ; void main() MEMBER M; Register(); M.Display(); 23. Find the output of the following program: #include<iostream.h> #include<ctype.h> void main( ) char Mystring[ ] = "what@output!"; for(int I=0; Mystring*I+!= \0 ;I++) if(!isalpha(mystring[i])) Mystring*I+= * ; else if(isupper(mystring[i])) Mystring[I]=Mystring[I]+1; else Mystring[I] =Mystring[I+1]; cout<<mystring; 24. Find the output of the following program: #include<iostream.h> void Indirect(int Temp=20) for(int I=10;I<=Temp;I+=5) cout<<i<<, ; cout<<endl; void Direct(int &Num) Num+=10; Indirect(Num); void main( ) int Number=20; Direct(Number); Indirect( ); cout<< Number = <<Number<<endl; Find the output of the following program: #include<iostream.h> #include<ctype.h> 6 P a g e

8 void Secret(char Msg[],int N); void main( ), char SMS= reportme ; Secret(SMS,2); cout<<sms<<endl; void Secret(char Msg[],int N), for(int c=10;msg*+1= \0 ;c++) 15 if(c%2==0) Msg[c]= Msg[c]+N; else if (isupper(msg[c])) Msg[c]=tolower(Msg[c]); else Msg[c]= Msg[c]-N; 26. Find the output of the following program: #include<iostream.h> struct three_d int x,y,z; ; void movein(three_d &t, int step=1) t.x+=step; t.y+=step; t.z+=step; void moveout(three_d &t, int step=1) t.x-=step; t.y+=step; t.z-=step; void main() three_d t1=10,20,5,t2=30,10,40; movein(t1); moveout(t2,5); cout<<t1.x<<","<<t1.y<<","<<t1.z<<endl; cout<<t2.x<<","<<t2.y<<","<<t2.z<<endl; movein(t2,10); cout<<t2.x<<","<<t2.y<<","<<t2.z<<endl; 27. Write the output of the following program: #include<iostream.h> int func(int &x,int y=10) if(x%y==0) return ++x;else return y- -; void main( ) int p=20,q=23; q=func(p,q); cout<<p<<q<<endl; p=func(q); cout<<p<<q<<endl; q=func(p); cout<<p<<q<<endl; 28. Find the output of the following program. #include<iostream.h> #include<ctype.h> void Mycode(char Msg[],char ch) for(int cnt=0;msg[cnt]!='\0';cnt++) 7 P a g e

9 if(msg[cnt]>='b'&& Msg[cnt]<='G') Msg[cnt]=tolower(Msg[cnt]); else if(msg[cnt]=='a' Msg[cnt]=='a') Msg[cnt]=ch; else if(cnt%2==0) Msg[cnt]=toupper(Msg[cnt]); else Msg[cnt]=Msg[cnt-1]; void main() char MyText[]="ApEACeDriVE"; cout<<"new TEXT: "<<MyText<<" "<<endl; 29. Rewrite the following program after removing the syntactical errors (if any). Underline each correction. #include [iostream.h] class MEMBER int Mno;float Fees; PUBLIC: void Register()cin>>Mno>>Fees; void Displaycout<<Mno<<" : "<<Fees<<endl; ; void main() MEMBER M; Register(); M.Display(); 30. Rewrite the following codes after removing errors, if any, in the following snippet. Explain each error. #include<iostream.h> void main( ) int x[5], *y, z[5] for (i = 0; i < 5; i ++ x[i] = i; z[i] = i + 3; y = z; x = y; 31. Rewrite the following program after removing the syntactical error(s), if any Underline each correction: #include <iostream.h> void main( ) struct Book 8 P a g e

10 char Book_name[20]; char Publisher_name[20]; int Price = 170; New Book; gets(book_name); gets(publisher_name); 32. Rewrite the following program after removing the syntactical errors (if any). Underline each correction. #include<iostream.h> void main() char arr = 12, 23, 34, 45; int ptr = arr; int val = *ptr; cout << *val << endl; val = *ptr++; cout << val << endl; val = *ptr : cout << val >> endl; val = *++ptr; cout << val << endl; 33. Obtain the output of the following C++ program, which will appear on the screen after its execution. Important Note : All the desired header files are already included in the code, which are required to run the code. class Game int Level, Score; char Type; Game(char GType= P ) Level=1;Score=0;Type=GType; void Play(int GS); void Change(); void Show(), <<Level<<endl; cout<<score<<endl; ; void main(), Game A( G ),B; B.Show(); A.Play(11); A.Change(); B.Play(25); A.Show(); B.Show(); void Game::Change(), Type=(Type== P )? G : P ; - void Game::Play(int GS) 9 P a g e

11 Score+=GS; if(score>=30) Level=3; else if(score>=20) Level=2; else Level=1; 34. Find the output of the following program : #include<iostream.h> #include<ctype.h> class Class int cno, total; char section; Class (int no=10) cno=no; Section= A ; Total=50; Void admission (int c=20) section++; Total+=c; Void classshow () cout<<cno<< : <<section << : <<total<<endl; ; Void main() Class C1, C2(5); C1.admission (25); C1.classshow(); C2.admission (); C1.admission (30); C2.classshow (); C2.classshow (); 35. Write the output of the following C++ program code : #include<iostream.h> class Quiz int Round ; float Score ; Quiz( ) Round=1 ; Score=0; Quiz(Quiz &Q) Round=Q.Round+1 ; Score=Q.Score+10 ; void GetBonus(float B=5) Score+=B ; 10 P a g e

12 void ShowScore() cout<<round<<"#"<<score<<endl; ; void main() Quiz A ; A.GetBonus(10) ; A.ShowScore() ; Quiz B(A); B.GetBonus(); B.ShowScore(); 36. What will be the output of the given program segment? #include<iostream.h> #include<string.h> class country char *country name; int length; country ( ) length =0; country_name = new char [length+1]; country(char *s) length = strlen(s); country_name=new char [length +1]; strcpy (country_name, s); void display ( ) cout<< country_name <<endl; void Replace (country & a, country & b) length = a.length + b.length; delete country_name; country_name = new char [length + 1]; strcpy (country_ name, a.country_name); strcat (country_name, b.country name); ; void main ( ) char * temp = India ; country country1 (temp), country2 ( China ), country3 ( Nepal ), S1,S2; S1.Replace (country1, country2); S2.Replace (S1,country3); 11 P a g e

13 S1.display( ); S2.display ( ); 37. Find the output of the following program: #include <iostream.h> class student private: int m1,m2,m3; float per; student() M1=m2=m3=0; per=0.0; void calc(int a, int b, int c) m1=a;m2=b;m3=c; per=(m1+m2+m3)/3.0; void display() cout<<endl<< Percentage = << % ; ; void main() student S1; S1.display(); S1.calc(75,75,75); S1.display(); 38. Find the output of the following program: #include <iostream.h> class METRO int Mno, TripNo, PassengerCount; METRO(int Tmno=10) Mno = Tmno; TripNo = 0; PassengerCount = 0; void Trip (int PC = 50) TripNo++; PassengerCount + = PC; void StatusShow ( ) cout<<mno <<":"<< TripNo<<":"<< PassengerCount <<endl; ; void main ( ) 12 P a g e

14 39. METRO M (15), T ; M. Trip ( ) ; M. StatusShow ( ) ; T. StatusShow ( ) ; M.Trip(10); M. StatusShow ( ) ; 40. Find and write the output of the following C++ program code: Note: Assume all required header files are already being included in the program. class Share long int Code; float Rate; int DD; Share()Code=1000;Rate=100;DD=1; void GetCode(long int C,float R) Code=C; Rate=R; 13 P a g e

15 14 P a g e void Update(int Change,int D) Rate+=Change; DD=D; void Status() cout<< Date: <<DD<<endl; cout<<code<< # <<Rate<<endl; ; void main() Share S,T,U; S.GetCode(1324,350); T.GetCode(1435,250); S.Update(50,28); U.Update(25,26); S.Status(); T.Status(); U.Status();

16 CHAPTER III: FUNCTION OVERLOADING 2 Marks/ 3 Marks questions: 1. What do you understand by function overloading? Give an example illustrating its use in a C++ program. 2. What is operator overloading? Explain with example. 3. Is function overloading possible with different return type but having the same arguments? 4. Give the output of the following program : #include <iostream.h> void display(double d) cout << "Real : " << d << endl; void display(int i) cout << "Integer : " << i << endl; void display(char Ch) cout << "Character : " << Ch << endl; void display(char Ch[ ]) cout << "String : " << Ch << endl; void main() double F = ; display( A ); display(f); display("string"); display(45); 15 P a g e

17 CHAPTER IV & V: CLASSES AND OBJECTS/CONSTRUCTOR & DESTRUCTOR 2 Marks questions: 1. What do you understand by constructor and destructor functions used in classes? How are these functions different from other member functions? 2. Write any four important characteristics of Object Oriented Programming? Give example of any one of the characteristics using C What is the difference between Implicit and Explicit call to the constructor? Give example of each. 4. Distinguish between the following two statements : Time T1 (13, 10, 25); Time T1= Time (13, 10, 25); 5. What is Copy constructor? Give an example in C++ to illustrate copy constructor. 6. What is containership? How does it differ from inheritance? 7. Given the following C++ code, answer the questions (i) & (ii). class TestMeOut public : ~TestMeOut() // Function 1 cout << "Leaving the examination hall " << endl; TestMeOut() // Function 2 cout << "Appearing for examination " << endl; void MyWork() // Function 3 cout << "Attempting Questions " << endl; ; (i) In Object Oriented Programming, what is Function 1 referred as and when does it get invoked / called? (ii) In Object Oriented Programming, what is Function 2 referred as and when does it get invoked / called? 8. Answer the questions (i) and (ii) after going through the following class: class Seminar int Time; Seminar() //Function 1 Time=30;cout<<"Seminar starts now"<<end1; void Lecture() //Function 2 cout<<"lectures in the seminar on"<<end1; Seminar(int Duration) //Function 3 Time=Duration;cout<<"Seminar starts now"<<end1; ~Seminar() //Function 4 cout<<"vote of thanks"<<end1; ; 16 P a g e

18 i) In Object Oriented Programming, what is Function 4 referred as and when does it get invoked/ called? ii) In Object Oriented Programming, which concept is illustrated by Function 1 and Function 3 together? Write an example illustrating the calls for these functions. 9. Answer the questions (i) and (ii) after going through the following program #include<iostream.h> #include<string.h> class Bazar char Type[20]; char Product[20]; int Qty; float Price; Bazar() //Function 1 strcpy (Type, Electronic ); strcpy (Product, Calculator ); Qty = 10; Price=225; void Disp( ) //Function 2 cout<<type<< <<Product<< : <<Qty <<Price<<endl; ; void main( ) Bazar B; //Statement 1 B.Disp(); //Statement 2 (i) Will Statement 1 initialize all the data members for object B with the values given in the Function 1? (Yes OR No). Justify your answer suggesting the correction(s) to be made in the above code. (ii) What shall be the possible output when the program gets executed? (Assuming, if required the suggested correction(s) are made in the program) 10. Given a class as follows: class Match int Time; int Points; Match(int y, int p) //Conctructor1 Time=y; Points =p; Match(Match &M); // Constructor 2 ; (i) Create an object, such that it invokes Constructor 1. (ii) Write complete definition for Constructor P a g e

19 11. Observe the following C++ code and answer the questions (i) and (ii). Assume all necessary files are included: class BOOK long Code ; char Title[20]; float Price; BOOK() //Member Function 1 cout<< Bought <<endl; Code=10;strcpy(Title, NoTitle );Price=100; BOOK(int C,char T[],float P) //Member Function 2 Code=C; strcpy(title,t); Price=P; void Update(float P) //Member Function 3 Price+=P; void Display() //Member Function 4 cout<<code<< : <<Title<< : <<Price<<endl; ~BOOK() //Member Function 5 cout<< Book Discarded! <<end1; ; void main() //Line 1 //Line 2 BOOK B,C(101, Truth,350; //Line 3 for (int I=0;I<4;I++) //Line 4 //Line 5 B.Update(50);C.Update(20); //Line 6 B.Display();C.Display(); //Line 7 //Line 8 //Line 9 (i) Which specific concept of object oriented programming out of the following is illustrated by Member Function 1 and Member Function 2 combined together? Data Encapsulation Polymorphism Inheritance Data Hiding (ii) How many times the message Book Discarded! will be displayed after executing the above C++ code? Out of Line 1 to Line 9, which line is responsible to display the message Book Discarded! 18 P a g e

20 4 Marks questions: 1. Define a class TEST in C++ with following description: Private Members TestCode of type integer Description of type string NoCandidate of type integer CenterReqd (number of centers required) of type integer A member function CALCNTR() to calculate and return the number of centers as (NoCandidates/100+1) Public Members A function SCHEDULE() to allow user to enter values for TestCode, Description, NoCandidate & call function CALCNTR() to calculate the number of Centres A function DISPTEST() to allow user to view the content of all the data members 2. Define a class in C++ with following description: Private Members A data member Flight number of type integer A data member Destination of type string A data member Distance of type float A data member Fuel of type float A member function CALFUEL() to calculate the value of Fuel as per the following criteria: Distance Fuel <= more than 1000 and <= More than 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 3. Define a class Clothing in C++ with the following descriptions: Private Members: Code of type string Type of type string Size of type integer Material of type string Price of type float A function Calc_Price() which calculates and assigns the value of Price as follows: For the value of Material as COTTON Type Price (Rs.) TROUSER 1500 SHIRT 1200 For Material other than COTTON the above mentioned Price gets reduced by 25%. Public Members: A constructor to assign initial values of Code, Type and Material with the word NOT ASSIGNED and Size and Price with 0. A function Enter () to input the values of the data members Code, Type, Size and Material and invoke the CalcPrice() function. A function Show () which displays the content of all the data members for a Clothing. 19 P a g e

21 4. Define a class Travel in C++ with the description given below: Private Members: T_Code of type string No_of_Adults of type integer No_of_Children of type integer Distance of type integer TotalFare of type float Public Members: A constructor to assign initial values as follows : T_Code with the word NULL No_of_Adults as 0 No_of_Children as 0 Distance 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 Distance (Km) 500 >= <1000 & >= <500 For each Child the above Fare will be 50% of the Fare mentioned in the above table. For example : If Distance is 750, No_of_Adults = 3 and No_of_Children = 2 Then TotalFare should be calculated as No_of_Adults * No_of_Children * 150 i.e. 3 * * 150 = 1200 A function EnterTraveK ) to input the values of the data members T_Code, No_of_Adults, No_of_Children and Distance; and invoke the AssignFare( ) function. A function ShowTraveK) which displays the content of all the data members for a Travel 5. Define a class Book with following specifications : Private members of the class Book are Book_no integer Book_title 20 character 20 P a g e Price Total_cost( ) float A function to calculate the total cost for N number of copies, where N is passed to the function as argument. Public members of the class Book are Input( ) Function to read Book_no, Book_title and price Purchase( ) Function to ask the user to input the number of copies to be purchased. It invokes Total_cost( ) and prints the total cost to be paid by the user. 6. Define a class RESORT with the following specification : Private members: rno to store room no between 101 and 909 name charges days compute( ) Public members of class worker to store customer name to store per day charges to store number of days of stay a function to calculate and rerurn amount as days * charges and if the value of days*charges is more than then as 1.02 * days * charges

22 21 P a g e get_info( ) disp_info( ) a function to accept values for rno, name, charges, days. a function to display rno, name, charges, days and amount(amount to be displayed by calling function compute( ) 7. Define a class employee with the following specifications : private members of class employee empno integer ename 20 characters basic, hra, da float netpay float calculate() A function to calculate basic + hra + da with float return type public member function of class employee havedata() function to accept values for empno, sname, basic, hra, da and invoke calculate() to calculate netpay. dispdata() function to display all the data members on the screen. 8. Define a class Student with the following specifications : private members : roll_no integer name 20 characters class 8 characters marks[5] integer percentage float Calculate() a function that calculates overall percentage of marks and return the percentage of marks. public members : Readmarks() a function that reads marks and invoke the Calculate function. Displaymarks() a function that prints the marks. 9. Define a class report with the following specification: Private members: adno 4 digit admission number name 20 characters marks an array of 5 floating point values average average marks obtained getavg() to compute the average obtained in five subjects Public members : readinfo() function to accept values for adno, name, marks, and invoke the function getavg(). displayinfo() function to display all data members on the screen you should give function definitions. 10. Define a class Play in C++ with the following specifications : private members of class Play Playcode integer Playtitle 25 character Duration float Noofscenes integer public member function of class Play A constructor function to initialise Duration as 45 and Noofscenes as 5. NewPlay( ) function to accept values for Playcode and Playtitle. Moreinfo( ) function to assign the values of Duration and Noofscenes with the help of corresponding values passed as parameters to this function. Shoplay( ) function to display all the data members on the screen.

23 22 P a g e CHAPTER VI: INHERITANCE 2 Marks questions: 1. What is the difference between members in private visibility mode members in protected visibility in a class? Also, give a suitable C++ code to illustrate the both. 2. Define multilevel and multiple inheritance in context to object oriented programming. Give a suitable example to illustrate the same. 3. What is Inheritance? Give an example in C++ to show its implementation in C How inline member function is different from other member function of a class? 5. Differentiate between Multiple and Hierarchical inheritance. 4 Marks questions: 1. Consider the following declarations and answer the questions 9i) to (iv) given below : class ITEM int Id; char IName[20]; protected: float Qty; ITEM(); void Enter(); void View(); ; class TRADER int DCode; protected: char Manager[20]; 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? Single Level Inheritance Multi Level Inheritance Multiple Inheritance (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?

24 2. Consider the following declarations and answer the questions given below : 23 P a g e class WORLD int H; protected : int S; public : void INPUT(int); void OUTPUT(); ; class COUNTRY : private WORLD int T; protected : int U; public : void INDATA( int, int) void OUTDATA(); ; class STATE : public COUNTRY int M; public : void DISPLAY (void); ; (i) Name the base class and derived class of the class COUNTRY. (ii) Name the data member(s) that can be accessed from function DISPLAY(). (iii) Name the member function(s), which can be accessed from the objects of class STATE. (iv) Is the member function OUTPUT() accessible by the objects of the class COUNTRY? 3. Consider the following and answer the questions given below : class A void anyval(); protected : int x, y; public : void getvala(); void putvala(); ; class B : protected A int a, b; protected : int c, d; public : void putvalb( ); ; class C : public B

25 int P; protected : int q; void getval( ); public : void showval( ); ; (i) Name all the member functions, which are accessible by the objects of class C. (ii) Name all the protected members of class B. (iii) Name the base class and derived class of class B. (iv) Name the data members, which are accessible from member functions of class C. 4. Consider the following and answer the questions given below : class MNC char Cname[25]; // Company name protected : char Hoffice[25]; // Head office public : MNC( ); char Country[25]; void EnterDate( ); void DisplayData( ); ; class Branch : public MNC long NOE; // Number of employees char Ctry[25]; // Country protected: void Association( ); public : Branch( ); void Add( ); void Show( ); ; class Outlet : public Branch char State[25]; public : 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 Outlet. (iv) Name the data member(s), which are accessible from the object(s) of class Branch. 24 P a g e

26 5. Answer the questions (i) to (iv) based on the following code : class CUSTOMER int Cust_no; char Cust_Name[20]; protected: void Register(); CUSTOMER(); void Status(); ; class SALESMAN int Salesman_no; char Salesman_Name[20]; protected: float Salary; SALESMAN(); void Enter(); void Show(); ; class SHOP : private CUSTOMER, public SALESMAN char Voucher_No[10]; char Sales_Date[8]; SHOP(); void Sales_Entry(); void Sales_Detail(); (iii) Write the names of data members which are accessible from objects belonging to class CUSTOMER. (iv) Write the names of all the member functions which are accessible from objects belonging to class SALESMAN. (v) 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 SHOP? 6. Answer the questions (i) to (iv) based on the following: class PUBLISHER char Pub[12]; double Turnover; protected: void Register(); PUBLISHER(); void Enter(); void Display(); ; class BRANCH 25 P a g e

27 char CITY[20]; protected: float Employees BRANCH(); void Haveit(); void Giveit(); ; class AUTHOR : private BRANCH, public PUBLISHER int Acode; char Aname[20]; float Amount; AUTHOR(); void Start(); void Show(); ; (i) Write the names of data members, which are accessible from objects belonging to class AUTHOR. (ii) Write the names of all the member functions which are accessible from objects belonging to class BRANCH. (iii) Write the names of all the members which are accessible from member functions of class AUTHOR. (iii) How many bytes will be required by an object belonging to class AUTHOR? 7. Answer the questions (i) to (iv) based on the following code: class Dolls char DCode[5]; protected: float Price ; void CalcPrice(float); Dolls( ); void DInput( ); void DShow( ); ; class SoftDolls: public Dolls char SDName[20]; float Weight; SoftDolls( ); void SDInput( ); void SDShow( ); ; class ElectronicDolls: public Dolls char EDName[20]; 26 P a g e

28 27 P a g e char BatteryType[10]; int Battieries; ElectronicDolls ( ); void EDInput( ); void EDShow( ); ; (i) Which type of Inheritance is shown in the above example? (ii) How many bytes will be required by an object of the class ElectronicDolls? (iii) Write name of all the data members accessible from member functions of the class SoftDolls. (iv) Write name of all the member functions accessible by an object. 8. Answer the questions(i) to (iv) based on the following : class cloth char category[5]; char description[25]; protected: float price; void Entercloth( ); void dispcloth( ); ; class Design : protected cloth char design[21]; protected: float cost_of_cloth; int design_code; Design( ); void Enterdesign( ); void dispdesign( ); ; class costing : public cloth float designfee; float stiching; float cal_cp( ); protected: float costprice; float sellprice; void Entercost( ); void dispcost( ); costing ( ) ; ; (i) Write the names of data members which are accessible from objects belonging to class cloth. (ii) Write the names of all the members which are accessible from objects belonging to class Design. (iii) Write the names of all the data members which are accessible from member functions of class costing.

29 (iv) How many bytes will be required by an object belonging to class Design? 9. Answer the questions(i) to (iv) based on the following : class Regular char SchoolCode[10]; void InRegular( ); void OutRegular( ); ; class Distance char StudyCentreCode[5]; void InDistance( ); void OutDistance( ); ; class Course : public Regular, private Distance char Code[5]; float Fees; int Duration; void InCourse( ); void OutCourse( ); ; (i) Which type of Inheritance is shown in the above example? (ii) Write names of all the member functions accessible from Outcourse function of class Course. (iii) Write name of all the members accessible through an object of the Class Course. (iv) Is the function InRegular( ) accessible inside the function InDistance ( )? Justify your answer. 10. Answer the questions (i) to (iv) based on the following: class Book int year_publication; char title[25]; float price; Book( ); void input_data( ); void output_data( ); ; class Tape char comp_name[20]; protected: char comp_addr[35]; Tape( ); void read_data( ); void show_data( ); ; 28 P a g e

30 29 P a g e class Publication : private Book, public Tape int no_copies; Publication( ); void Pub_Entry( ); void Pub_Detail( ); ; (i) Write the names of data members which are accessible from objects belonging to class Publication. (ii) Write the names of all the member functions which are accessible from objects belonging to class Tape. (iii) Write in which order the constructors will be invoked when an object of class Publication is created. (iv) How many bytes will be required by an object belonging to class Publication? 11. Answer the questions (i) to (iv) based on the following code: class vehicle int wheels; protected: int passenger; void inputdata( ); void outputdata( ); ; class heavyvehicle : protected vehicle int diesel_petrol; protected: int load; void readdata(int, int); void writedata( ); ; class bus : private heavyvehicle char make[20]; void fetchdata( ); void displaydata( ); ; i) Name the base class and derived class of heavyvehicle class. ii) Name the data member(s) that can be accessed from the function displaydata(). iii) How many bytes will be required by an object of vehicle and heavyvehicle classes respectively? iv) Is the member function outputdata( ) accessible to the objects of the class heavyvehicle? 12. Answer the questions (i) to (iv) based on the following class declaration: class Medicine char category[10]; char Date_of_Manufacture[10];

31 30 P a g e char Date_Of_Expiry[10]; protected: char company[20]; int x,y; Medicine( ); void Enter( ); void Show( ); ; class Tablet :protected Medicine protected: char tablet_name[30]; char volume_label[20]; void disprin( ); float price; Tablet( ); void enterdet( ); void showdet( ); ; class PainReliever : public Tablet int Dosage_units; long int tab; char effects[20]; protected: int use_within_days; public : PainReliever( ); void enterpr( ); showpr( ); ; (i) How many bytes will be required by an object of class Drug and an object of class PainReliever respectively. (ii) Write names of all the data members which are accessible from the object of class PainReliever. (iii) Write names of all member functions which are accessible from objects of class PianReliever. (iv) Write the names of all the data members which are accessible from the functions enterpr().

32 1 Marks questions: CHAPTER VII: DATA FILE HANDLING 1. Differentiate between ifstream class and ofstream class. 2. Differentiate between seekg( ) and tellg( ). 3. Differentiate between seekp( ) and tellp( ). 4. Observe the program segment given below carefully, and answer the question that follows: class Applicant long AId; //Applicant s Id char Name*20+; //Applicant s Name float Score; //Applicant s Score void Enroll(); void Disp(); void MarksScore(); //Function to change Score long R_Aid() return Aid; ; void ScoreUpdate(long Id) fstream File; File.open( APPLI.DAT,ios::binary ios::in ios::out); Applicant A; int Record=0,Found=0; while (!Found&&File.read((char*)&C, sizeof(c))) if (Id==A.R_Aid()) cout<< Enter new Score ; cin>>a.marksscore(); //statement 1 //statement 2 Found = 1; Record++; if(found==1) cout<< Record Updated ; File.close(); Write the Statement1 to position the File Pointer at the beginning of the Record for which the Applicant s Id matches with the argument passed, and Statement2 to write the updated Record at that position. 5. Observe the program segment carefully and answer the question that follows: class student int student_no; char student_name[20]; int mark; void enterdetail( ); 31 P a g e

33 void showdetail( ); void change_mark( ); //Function to change the mark int getstudent_no( ) return student_no; ; void modify( int y ) fstream File; File.open( student.dat, ios::binary ios::in ios::out) ; student i; int recordsread = 0, found = 0; while(!found && File.read((char*) & i, sizeof (i))) recordsread++; if(i. getstudent_no( ) = = y ) i. change_mark( ); //Missing statement 1 //Missing statement 2 found = 1; if( found = = 1) cout<< Record modified ; File.close() ; If the function modify( ) is supposed to change the mark of a student having student_no y in the file student.dat, write the missing statements to modify the student record. 6. Observe the program segment carefully and answer the question that follows: class item int item_no; char item_name[20]; void enterdetail( ); void showdetail( ); int getitem_no( ) return item_no; ; void modify(item x, int y ) fstream File; File.open( item.dat, ios::binary ios::in ios::out) ; item i; int recordsread = 0, found = 0; while(!found && File.read((char*) &i, sizeof (i))) recordsread++; if(i. getitem_no( ) = = y ) //Missing statement File.write((char*) &x, sizeof (x)); 32 P a g e

34 found = 1; if(! found) cout<< Record for modification does not exist ; File.close() ; If the function modify( ) is supposed to modify a record in the file item.dat,which item_no is y, with the values of item x passed as argument, write theappropriate statement for the missing statement using seekp( ) or seekg( ),whichever is needed, in the above code that would write the modified record at its proper place. 7. Observe the program segment carefully and answer the question that follows: class member int member_no; char member_name[20]; void enterdetail( ); void showdetail( ); int getmember_no( ) return member_no; ; void update(member NEW ) fstream File; File.open( member.dat, ios::binary ios::in ios::out) ; member i; while(file.read((char*) & i, sizeof (i))) if(new. getmember_no( ) = = i. getmember_no( )) //Missing statement File.write((char*) &NEW, sizeof (NEW)); File.close() ; If the function update( ) is supposed to modify the member_name field of a record in the file member.dat with the values of member NEW passed as argument, write the appropriate statement for the missing statement using seekp( ) or seekg( ), whichever is needed, in the above code that would write the modified record at its proper place. 8. Find the output of the following C++ code considering that the binary file CUSTOMER.DAT exists on the hard disk with a data of 50 customers. class CUSTOMER int Ccode; char CName[30]; void Register ( ); void Display ( ); ; void main() 33 P a g e

35 fstream CFile; CFile.open( CUSTEMER.DAT,ios::binary ios::in); CUSTEMER C; CFile.read((char*)&C, sizeof(c)); CFile.read((char*)&C, sizeof(c)); CFile.read((char*)&C, sizeof(c)); cout<< Record: <<CFile.tellg()/sizeof(C)<<endl; CFile.read((char*)&C, sizeof(c)); CFile.read((char*)&C, sizeof(c)); cout<< Record: <<CFile.tellg()/sizeof(C)<<endl; CFile.close(); 9. Find the output of the following C++ code considering that the binary file MEMBER.DAT exists on the hard disk with records of 100 members: class MEMBER int Mno; char Name*20+; void In();void Out(); -; void main() fstream MF; MF.open("MEMBER.DAT,ios::binary ios::in); MEMBER M; MF.read((char*)&M,sizeof(M)); MF.read((char*)&M,sizeof(M)); MF.read((char*)&M,sizeof(M)); int POSITION=MF.tellg()/sizeof(M); cout<<"present RECORD:"<<POSITION<<endl; MF.close(); 10. Find the output of the following C++ code considering that the binary file CLIENT.DAT exists on the hard disk with a data of 1000 clients. class CLIENT int Ccode;char CName[20]; void Register();void Display(); ; void main() fstream CFile; CFile.open( CLIENT.DAT,ios::binary ios::in); CLIENT C; CFile.read((char*)&C, sizeof(c)); cout<< Rec: <<CFile.tellg()/sizeof(C)<<endl; CFile.read((char*)&C, sizeof(c)); CFile.read((char*)&C, sizeof(c)); 34 P a g e

36 cout<< Rec: <<CFile.tellg()/sizeof(C)<<endl; CFile.close(); 11. What will be the output of the given program. (Assume that all header files are included) void main() char ch[7]; int a; fstream file( mydata.txt,ios::out ios::in); file<< open source software ; file.seekg(2,ios::beg); file>>ch; a =file.tellg(); cout<<a; 2 Marks questions: 1. Write a user defined function in C++ to read the content from a text file NOTES.TXT, count and display the number of blank spaces present in it. 2. Write a user defined function in C++ to read the content from a text file STORY.TXT, count and display the number of alphabets present in it. 3. Assuming that a text file named First.TXT contains some text written into it, write a function named Vowel words, that reads the file FIRST.TXT and creates a new file named SECOND.TXT, to contain only those words from the file FIRST.TXT which start with a lowercase vowel (i.e., with a, e, i, o, u ). For example if the file FIRST.TXT contains Carry umbrella and overcoat when it rains Then the file SECOND.TXT shall contain Umbrella and overcoat it 4. Write a function in C++ to print the count of the word the as an independent word in a text file STORY.TXT. For example, if the content of the file STORY.TXT is : There was a monkey in the zoo. The monkey was very naughty. Then the output of the program should be Assume a text file coordinate.txt is already created. Using this file create a C++ function to count the number of words having first character capital. Example: Do less Thinking and pay more attention to your heart. Do Less Acquiring and pay more Attention to what you already have. Do Less Complaining and pay more Attention to giving. Do Less criticizing and pay more Attention to Complementing. Do less talking and pay more attention to SILENCE. Output will be : Total words are Write a function in C++ to count the number of lines present in a text file STORY.TXT. 7. Write a function in C++ to write the characters entered through the keyboard into the file myfile.txt, until a # character is entered. 8. Assume that a text file named text1.txt already contains some text written into it, write a function named vowelwords(), that reads the file text1.txt and create a new file named text2.txt, which shall contain only those words from the file text1.txt which don t start with an uppercase vowel (i.e., with A, E, I, O, U ). for example if the file text1.txt contains: Take One Apple And one glass milk daily. Then the file text2.txt shall contain : Take one glass milk daily. 35 P a g e

37 9. Assume a text file Test.TXT is already created. Using this file, create a function to create three files LOWER.TXT which contains all the lowercase vowels and UPPER.TXT which contains all the uppercase vowels and DIGIT.TXT which contains all digits. 10. Write a function in C++ to calculate the average word size in a text file Report.txt, each word is separated by single space or full stop. 11. Create a function FileLowerShow() in c++ which take file name(text files)as a argument and display its all data into lower case. 12. Write a function in C++ to count the number of words this or these present in a text file STORY.TXT. 3 Marks questions: 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]; void Register(); void Show(); int CheckCode(char AC[ ]) return strcmp(areacode,ac); ; Write a function TRANSFER ( ) in C++, that would copy all those records which are having AreaCode as DEL from PHONE.DAT to PHONBACK.DAT. 2. Given a binary file TELEPHON.DAT, containing records of the following class Directory: class Directory char Name[20]; char Address[30]; char AreaCode[5]; char Phone_No[15]; void Register(); void Show(); int CheckCode(char AC[]) return strcmp(areacode,ac[]); ; Write a function COPYABC in C++ that would copy only those records having AreaCode as 123 from TELEPHON.DAT to TELEBACK.DAT. 3. Given a binary file SPORTS.DAT, containing records of the following structure type : struct Sports char Event[20]; char Participant[10][30]; ; 36 P a g e

38 Write a function in C++ that would read contents from the file SPORTS.DAT and creates a file named ATHLETIC.DAT copying only those records from SPORTS.DAT where the event name is Athletics. 4. Write a function in C++ to search for a BookNo from a binary file BOOK.DAT, assuming the binary file is containing the objects of the following class. class BOOK int Bno; char Title[20]; int RBno()return Bno; void Enter()cin>>Bno;gets(Title); void Display()cout<<Bno<<Title<<endl; ; 5. 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. class STUD int Rno; char Name[20]; void Enter() cin>>rno;gets(name); void Display()cout<<Rno<<Name<<endl; ; 6. Write a function in C++ to read and display the detail of all the members whose membership type is L or M from a binary file CLUB.DAT. Assuming the binary file CLUB.DAT is containing objects of class CLUB, which is defined as follows: class CLUB int Mno. char Mname[20]; char Type; //Member Type: L Life Member M Monthly member G Guest void Register( ); void Display( ); char whattype( ) return type; ; 7. Assuming the class DRINKS defined below, write functions in C++ to perform the following : (i) write the objects of DRINKS to binary file. (ii) Read the objects of DRINKS from binary file and display them on screen when Dname has value -Pepsi. class DRINKS int DCode; char DName[13]; int Dsize; // size in litres. float Dprice; 37 P a g e

39 void getdrinks( ) cin>>dcode>>dname>>dsize>>dprice; void showdrinks( ) cout<< DCode<<DName<,Dsize<,Dprice; char *getname() return Dname; ; 8. Assuming the class Computer as follows: class Computer char chiptype[10]; int speed; void getdetails() gets(chiptype); cin>>speed; void showdetails() cout<<"chip"<<chiptype<<"speed = "<<speed; ; Write a function readfile() to read all the records present in an already existing binary file SHIP.DAT and display them on the screen, also count the number of records present in the file. 9. Assuming a binary file FUN.DAT is containing objects belonging to a class LAUGHTER(as defined below). Write a user defined function in C++ to add more objects belonging to class LAUGHTER at the bottom of it. class LAUGHTER int Idno; // Identification number char Type[5]; // LAUGHTER Type char Desc[255]; // Description public : void Newentry() cin>>idno; gets(type); gets(desc); void Shownscreen() cout<<idno<<":"<<type<<endl<<desc<<endl; ; 10. Assuming a binary file JOKES.DAT is containing objects belonging to a class JOKE(as defined below). Write a user defined function in C++ to add more objects belonging to class JOKE at the bottom of it. class JOKE int Jokeid; // Joke Identification number char Type[5]; // Joke Type char Jokedesc[255]; // Joke Description public : void Newjokeentry() cin>>jokeid; gets(type); gets(jokedesc); void Showjoke() cout<<jokeid<< ":"<<Type<<endl<<Jokedesc<<endl; ; 38 P a g e

40 CHAPTER VIII: POINTERS 2 Marks/ 3 Marks questions: 1. Predict the output of the following code: # include<iostream.h> #include<conio.h> void main() int arr[] = 12, 23, 34, 45; int *ptr = arr; int val = *ptr; cout << val << endl; val = *ptr++; cout << val << endl; val = *ptr; cout << val << endl; val = *++ptr; cout << val << endl; 2. Find the output of the following code. #include<iostream.h> #include<conio.h> void main() int arr[] = 12, 23, 34, 45; int *ptr = arr; int val = *ptr; cout << val << endl; val = *ptr++; cout << val << endl; val = *ptr; cout << val << endl; val = *++ptr; cout << val << endl; val = ++*ptr; cout << val << endl; 3. Find the output of the following code #include<iostream.h> #include<conio.h> void main() int arr[] = 12, 23, 34, 45; int *ptr = arr; int val = *ptr; cout << val << endl; val = (*ptr)++; cout << val << endl; val = *ptr; cout << val << endl; val = *++ptr; cout << val << endl; 4. Write the output of the following program: #include<iostream.h> #include<conio.h> void main( ) clrscr( ); int a =32; int *ptr = &a; char ch = A ; 39 P a g e

41 char *cho=&ch; cho+=a; // it is simply adding the addresses. *ptr + = ch; cout<< a << <<ch<<endl; 5. Write the output of the following program: #include<iostream.h> #include<conio.h> void main( ) clrscr( ); int a =32; int *ptr = &a; char ch = A ; char *cho=&ch; *cho+=a; // it is adding the values. cout<< a << <<ch<<endl; 6. Give the output of the following program : char *NAME = "CoMPutER"; for (int x = 0; x < strlen(name); x++) if (islower(name[x])) NAME[x] = toupper(name[x]); else if (isupper(name[x])) if (x%2==0) NAME[x] = tolower(name[x]); else NAME[x] = NAME[x-1]; puts(name); 7. Give the output of the following program segment(assume all required header files are included in the program) : char *s = "GOODLUCK"; for (int x = 0;x<strlen(s) 1 ; x>=0; x ) for ( int y=0; y<=x; y++) cout<<s[y]; cout<<endl; 8. Identify the syntax error(s), if any, in the following program. Also give reason for errors. void main() const int i = 20; const int * const ptr = &i; (*ptr)++; int j = 15; ptr = &j; 9. Give the output of the following program segment. (Assuming all required header files are included in the program) : void main() 40 P a g e

42 int a = 32, *X = &a; char ch = 65, &eco = ch; cho += a; *X += ch; cout << a << ',' << ch << endl; 10. Write the output of the following program: #include <iostream.h> static int i = 100; void Print(char *P) p = "Press"; cout <, "value is : " << p << endl; void main() char *q = "Best of Luck"; Print(q); cout << "New value is : " << q; 11. Give the output of the following program segment : char *Text*2+ =, Two, six -; for (int C=0;C<2;C++) for (int D=0; D<strlen(Text[0]); D++) if (islower(text[c][d])) cout<<(char)toupper(text[c][d]); else if (isupper(text[c][d]) && (D%2 ==0)) cout<<(char)tolower(text[c][d]); else cout<<text[c][d]; cout<<d<<endl; 41 P a g e

43 CHAPTER IX: ARRAYS 2 Marks/ 3 Marks questions: 1. Write the definition of a function Change(int P[], int N) in C++, which should change all the multiples of 10 in the array to 10 and rest of the elements as 1. For example, if an array of 10 integers is as follows: 2. Write the definition of a function FixSalary(float Salary[], int N) in C++, which should modify each element of the array Salary having N elements, as per the following rules: Existing Salary Values Required Modification in Value If less than Add 35% in the existing value If >= and <20000 Add 30% in the existing value If >= Add 20% in the existing value 3. Write a user-defined function in C++ to display the sum of row elements of a two dimensional array R[5][6] containing integers. 4. Write the user-defined function in C++ to display those elements of a two dimensional array T[4][4] which are divisible by 100. Assume the content of the array is already present and the function prototype is as follows : void Showhundred (int T[4][4]); 5. Write a function in C++ to find the sum of diagonal elements from a 2 dimensional array of type float. Use the array and its size as parameters with float as its return type. 6. Write a function in C++ which accepts an integer array and its size as arguments and replaces elements having even values with its half and elements having odd values with twice its value 7. Write a function in C++ which accepts an integer array and its size as argument and exchanges the value of first half side elements with the second half side elements of the array. Example : If an array of eight elements has initial content as 2,4,1,6,7,9,23,10 The function should rearrange the array as 7,9,23,10,2,4,1,6. 8. Write a function in c++ to find and display the sum of each row and each column of 2 dimensional array. Use the array and its size as parameters with int as the data type of the array. 9. Write a function in C++, which accepts an integer array and its size as parameters and rearrange the array in reverse. Example if an array of five members initially contains the elements as 6,7,8,13,9,19 Then the function should rearrange the array as 19,9,13,8,7,6 10. Write a function in C++, which accept an integer array and its size as arguments and swap the elements of every even location with its following odd location. Example : if an array of nine elements initially contains the elements as 2,4,1,6,5,7,9,23,10 Then the function should rearrange the array as 4,2,6,1,7,5,23,9, Write a function in C++ which accepts an integer array and its size as arguments and replaces elements having odd values with thrice and elements having even values with twice its value. Example : If an array of five elements initially contains the elements 3,4,5,16,9 Then the function should rearrange the content of the array as 9,8,15,32, Write function SORTPOINTS() in c++ to sort an array of structure Game in descending order of points using Bubble Sort Note: Assume the following definition of structure Game struct Game long PNo; // Player Number char PName[20]; long points; ; 42 P a g e

44 13. Write a c++ function to shift all the negative numbers to left and positive number in the right side. 14. Define a function SWPCOL() in C++ to swap ( interchange) the first column elements with the last column elements, for a two dimensional array passed as the argument of the function. Example : if the two dimensional array contains After swapping of the content of 1st and last column, it should be Define a function SWPROW() in C++ to swap ( interchange) the first row elements with the last row elements, for a two dimensional array passed as the argument of the function. Example : if the two dimensional array contains After swapping of the content of the array will be Write a function in C++ to print the product of each column of a 2D integer array passed as the argument of the function Example : if the two dimensional array contains Then the output should appears as Product of Column1 = 70 Product Column2 = 48 Product of column3= 168 Product of Column4= Write a function in C++ to print the product of each row of a 2D integer array passed as the argument of the function Example : if the two dimensional array contains Then the output should appears as Product of Row1 = 72 Product Row2 = 147 Product of Row3= 720 Product of Row4=28 43 P a g e

45 18. Write a function which accept 2D array of integers and its size as arguments and displays the sum of elements which lie on diagonals. [Assuming the 2D array to be a square matrix with odd dimension ie 3 x 3, 4 x 4 etc ] Example of the array content is Output through the function should be Diagonal One Sum : 21 Diagonal Two: Write a function in C++ which accepts a 2D array of integers and its size as arguments and displays the elements of middle row and the elements of middle column. [Assuming the 2D array to be a square matrix with odd dimension ie 3 x 3, 5 x 5, 7 x 7 etc ] Example of the array content is Output through the function should be Middle row: Middle Column Write a function in C++ which accepts an integer array and its size as arguments and assign the elements into a two dimensional array of integers in the following format If the array is 1,2,3,4,5,6 if the array is 1,2,3 The resultant 2D array is The resultant 2D array is Write a function in C++ which accepts an integer array and its size as arguments and assign the elements into a two dimensional array of integers in the following format If the array is 1,2,3,4,5,6 if the array is 1,2,3 The resultant 2D array is The resultant 2D array is Write a user defined function lowerhalf() which takes a 2D array, with size n rows and n cols as argument and prints the lower half of the matrix 23. Write the function to find the largest and second largest number from a two dimensional array. The function should accept the array and its size as argument. 24. Write a function in C++ to merge the contents of two sorted arrays A & B into third array C. Assuming array A is sorted in ascending order, B is sorted in descending order, the resultant array is required to be in ascending order. 25. An array S[10][15] is stored in the memory with each element requiring 4 bytes of storage. If the base address of S is 1000, determine the location of S[8][9] when the array is S stored by (i) Row major (ii) Column major. 44 P a g e

46 26. Suppose an array ARR containing float is arranged in ascending order. Write a user defined function in C++ to search for one float from ARR with the help of binary search method. The function should return an integer 0 to show absence of the number and integer 1 to showpresence of the number in the array. The function should have the parameters as (i) an array ARR (ii) the number DATA to be searched (iii) number of elements N. 27. Suppose X, Y, Z are arrays of integers of size M,N and M+N respectively. The numbers in array X and Y appear in descending order. Write a user defined function in C++ to produce third array Z by merging arrays X and Y in descending order. 28. An array DATA[1..10][1..10] requires 8 bytes of storage. If the base address of array DATA is 1500, determine the location of DATA [4][5], when the array DATA is stored (i) Row Wise (ii) Column wise. 29. 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 C0, determine the location of A[10][5] when the array A is stored by column major. 30. Considering the following key set : 42, 29, 74, 11, 65, 58, use insertion sort to sort the data in ascending order and indicate the sequences of steps required. 31. An array X[30][10] is stored in the memory with each element requiring 4 bytes of storage. If the base address of X is 4500, find out memory locations of X[12][8] and X[2][14], if the content is stored along the row. 32. An Array Val[1..15][1..10] is stored in the memory with each elements requiring 4 bytes of storage. If the base address of array Val is 1500, determine the location of Val [12][9] when the array Val is stored (i) row wise (ii) column wise. 33. A 2-d array defined as A[4..7, -1..3] requires 2 words of storage space for each element. calculate the address of A[6,2], given the base address as 100, also calculate the address of A[7,0] If the array is stored in row major order 34. If an array B[11][8] is stored as column wise and B[2][2] is stored at 1024 and B[3][3] at Find out the base address, size of an element and address of B[5]3]. 35. An array ARR[35][15] is stored in the memory along the row with each of its element occupying 4 bytes. Find out the base address and the address of an element ARR[20][5], if the location ARR[2][2] is stored at the address An array S[40][30] is stored in the memory along the row with each of the element occupying 4 bytes, find out the memory location for the element S[15][5], if an element s[20][10] is stored at memory location An array ARR[10][20] is stored in the memory with each element occupying 2 bytes of space. Assuming the base address of ARR to be 800,compute the address of ARR[9][11], when the array is stored as : i) Row wise ii) Column wise 38. Assume an array E containing elements of structure Employee is required to be arranged in descending order of Salary. Write a C++ function to arrange the same with the help of bubble sort, the array and its size is required to be passed as parameters to the function. Definition of structure Employee is as follows : struct Employee int Eno; char Name[25]; float Salary; ; 45 P a g e

47 39. Define a function SwapArray(int [], int) that would accept a one dimensional integer array NUMBERS and its size N. The function should rearrange the array in such a way that the values of alternate locations of the array are exchanged ( Assume the size of the array to be even) Example : If the array initially contains 2, 5, 9, 14, 17, 8, 19, 16, then after rearrangement the array should contain 5, 2, 14, 9, 8, 17, 16, Write definition for a function DISPMID(int A[][5],int R,int C) in C++ to display the elements of middle row and middle column from a two dimensional array A having R number of rows and C number of columns. For example, if the content of array is as follows: The function should display the following as output Write a function REVROW(int P[][5],int N, int M) in C++ to display the content of a two dimensional array, with each row content in reverse order. For example, if the content of array is as follows: The function should display output as: P a g e

48 CHAPTER X: LINKED LIST, STACK AND QUEUES 2 Marks questions: 1. Obtain the postfix notation for the following infix notation of expression showing the contents of the stack and postfix expression formed after each step of conversion : A * B + ( C D/F) 2. Evaluate the following postfix expression using a stack and show the contents of stack after execution of each operation : 20, 45, +, 20, 10,, 15, +, * 3. Change the following infix expression into postfix expression. (A+B)*C+D/E-F 4. Evaluate the following Postfix notation of expression, show status of stack for each operations : 500, 20, 30, +, 10, *, + 5. Convert the expression (TRUE && FALSE)! (FALSE TRUE) to postfix expression. Show the contents of the stack at every step. 6. Evaluate the following postfix expression using a stack and show the Contents of stack after execution of each operation: (i) 50,40,+, 18,14,-,4,*,+ (ii) 100,40,8,+,20,10,-,+,* (iii) 5,6,9,+,80,5,*,-,/ (iv) 120,45,20,+,25,15,-,+,* (v) 20,45,+,20,10,-,15,+,* (vi) TRUE,FALSE, TRUE FALSE, NOT, OR, TRUE, OR,OR,AND 7. Give postfix form of the following expression: (i) A*(B+(C+D)*(E+F)/G)*H (ii) A+[(B+C)*(D+E)*F]/G (iii) A*(B+D)/E-F-(G+H/K) (iv) ((A-B)*(D/E))/(F*G*H) (v) (True && false)!(false true) 4 Marks questions: 1. Write a function in C++ to perform a PUSH operation in a dynamically allocated stack considering the following : struct Node int X,Y; Node *Link; ; class STACK Node * Top; STACK( ) TOP=NULL; void PUSH( ); void POP( ); ~STACK( ); ; 2. Define function stackpush( ) to insert nodes and stackpop( ) to delete nodes, for a linked list implemented stack having the following structure for each node: struct Node char name[20]; int age; Node *Link; ; 47 P a g e

49 class STACK Node * Top; STACK( ) TOP=NULL; void stackpush( ); void stackpop( ); ~STACK( ); ; 3. Write a function in C++ to perform a PUSH operation in a dynamically allocated stack considering the following: struct node int x,y; Node *Link;; 4. Write a function in C++ to perform a DELETE operation in a dynamically allocated queue considering the following description: struct Node float U,V; Node *Link; ; class QUEUE Node *Rear, *Front; QUEUE( ) Rear =NULL; Front= NULL; void INSERT ( ); void DELETE ( ); ~QUEUE ( ); ; 5. Define member functions queins() to insert and quedel() to delete nodes of the linked list implemented class queue, where each node has the following structure: struct node char name[20]; int age; node * Link; ; class queue node *rear, *front; public : queue() rear = NULL; front = NULL; void queins(); void quedel(); ; 6. Consider the following portion of a program, which implements passengers Queue for a train. Write the definition of function Insert (whose prototype is shown below); to insert a new node in the queue with required information : struct NODE long Ticketno; char PName[20]; //Passenger Name NODE * NEXT; 48 P a g e

50 ; class Queueoftrain NODE *Rear, *Front; public : Queueoftrain( ) Rear = NULL, Front = NULL; void Insert( ); void Delete( ); ~Queueoftrain( ); ; 7. Given the following class, char *msg[ ] = "over flow", "under flow"; class Stack int top, //the stack pointer stk[5]; //the elements void err_rep(int e_num) cout << msg[e_enum]; //report error message void init( ) top = 0; //initialize the stack pointer void push(int); //put new value in stk void pop( ); //get the top value ; Define pop outside the Stack. In your definition take care of under flow condition. Function pop should invoke error_rep to report under flow. 8. Define functions stackpush() to insert nodes and stackpop() to delete nodes, for a linked list implemented stack having the following structure for each node : struct node char name[20]; int age; node *Link; ; class stack node *top; stack() top = NULL;; void stackpush(); void stackpop(); ; 9. Write a function in C++ to perform a DELETE operation in a dynamically allocated queue considering the following description: Struct Node float U,V; Node *Link; ; class QUEUE Node *Raer, *Front; Public: QUEUE( ) Rear =NULL; Front= NULL; Void INSERT ( ); Void DELETE ( ); 49 P a g e

51 ~QUEUE ( ); 10. Define function stackpush( ) to insert nodes and stackpop( ) to delete nodes, for a linklist implemented stack having the following structure for each node: Struct Node char name[20]; int age; Node *Link; ; class STACK Node * Top; Public: STACK( ) TOP=NULL; Void stackpush( ); Void stackpop( ); ~STACK( ); ; 11. Consider the following portion of a program which implements passengers Queue for a bus. Write the definition of function Insert, to insert a new node in the queue with required information. Struct Node float U,V; Node *Link; ; class QUEUE Node *Raer, *Front; Public: QUEUE( ) Rear =NULL; Front= NULL; Void INSERT ( ); Void DELETE ( ); ~QUEUE ( ); ; 50 P a g e

52 2 Marks questions: CHAPTER XI: DATABASE CONCEPTS 1. What are DDL and DML? 2. What do you understand by normalization? what is First Normal Form? 3. What is a primary key in a table? Define first normal form. 4. What is relation? Define the relational data model. 5. What is relation? What is the difference between a tuple and an attribute? 6. Observe the following table WORKER carefully and write its (i) Degree and Cardinality and (ii) most appropriate column, which can be considered as Primary Key. 7. What do you understand by selection and projection operation in relation algebra. 8. Define : (i) Candidate key (ii) Alternate Key 9. What is Foreign Key? 10. What do you mean by Data Independence? 11. What do you mean by data redundancy? 12. Define Selection operation with an example. 13. Define Projection operation with an example. 14. Define Cartesian product with an example. 15. Differentiate between Union operation and Intersection operation with an example. 16. Differentiate between Primary Key and Alternate Key. CHAPTER XII: SQL 6 Marks Questions : 1. Write the SQL commands from (i) to (iv) and output from (v) to (viii) for the following on the basis of tables HOSPITAL. 51 P a g e

53 (i) To show all information about the patients of cardiology department. (ii) To list the names of female patients who are in ENT department. (iii) To list names of all patients with their date of admission in ascending order. (iv) The display Patients Name, charges, age for female patients only. (v) Select COUNT (DISTINCT Charges) from HOSPITAL; (vi) Select MIN (Age) from HOSPITAL where Sex = F ; (vii) Select SUM(Charges) from HOSPITAL where Department = ENT ; (viii) Select AVG (Charges) from HOSPITAL where Dateofadm < 12/02/98; 2. Write the SQL commands from (a) to (d) and output from (e) to (h) for the following on the basis of tables GARMENT and FABRIC Table: GARMENT Table: FABRIC GCODE DESCRIPTION PRICE FCODE READYDATE FCODE TYPE PENCIL SKRIT 1150 F03 19-DEC FORMAL SHIRT 550 F01 07-MAR BABY TOP 300 F02 11-SEP EVENING GOWN 545 F04 05-JAN FROCK 575 F01 03-OCT-07 F04 F02 F03 F01 POLYSTER COTTON SILK TERELENE (a) To display gcode and description of each garment in descending order of gcode. (b) To display the details of all the garments which have readydate in between 08-Dec-07 and 16- Nov-08(inclusive of both dates) (c) To display the average price of all the garments fcode wise. (d) To display gcode, description, price from garment table and type from fabric table. (e) SELECT SUM(PRICE) FROM GARMENT WHERE FCODE= F01 ; (f) SELECT DESCRIPTION, TYPE FROM GARMENT,FABRIC WHERE GARMENT.FCODE = FABRIC.FCODE AND GARMENT.PRICE= 1150; (g) SELECT MAX(PRICE) FROM GARMENT; (h) SELECT COUNT(FCODE) FROM GARMENT; 3. Consider the following tables PRODUCT and CLIENT. Write SQL commands for the statements (a) to (d) and give outputs for SQL queries (e) to (h). Table: PRODUCT P_ID PRODUCTNAME MANUFACTURER PRICE TP01 TALCOM POWDER LAK 40 FW05 FACE WASH ABC 45 BS01 BATH SOAP ABC 55 SH06 SHAMPOO XYZ 120 FW12 FACE WASH XYZ P a g e

54 53 P a g e Table: CLIENT C_ID CLIENTNAME CITY P_ID 01 COSMETIC SHOP DELHI FW05 06 TOTAL HEALTH MUMBAI BS01 12 LIVE LIFE DELHI SH06 15 PRETTY WOMAN DELHI FW12 16 DREAMS BANGALORE TP01 (a) To display the details of those clients whose city is Delhi. (b) To display the clientname, city from table client and productname and price from table product with their corresponding matching p_id. (c) To display the manufacturer of FACE WASH. (d) To increase the price of all products by 10. (e) SELECT DISTINCT CITY FROM CLIENT; (f) SELECT MANUFACTURER, MAX(PRICE), MIN(PRICE), COUNT(*) FROM PRODUCT GROUP BY MANUFACTURER; (g) SELECT CLIENTNAME, MANUFACTURER FROM PRODUCT, CLIENT WHERE CLIENT.P_ID = PRODUCT.P_ID; 4. Consider the following tables PRODUCT and CLIENT. Write SQL commands for the statements (a) to (f) and give outputs for SQL queries (g). Table : SchoolBus Rtno Area_overed Capacity Noofstudents Distance Transporter Charges 1 Vasant kunj Shivamtravels Hauz Khas Anand travels Pitampura Anand travels Rohini Anand travels Yamuna Vihar Bhalla Co Krishna Nagar Yadav Co Vasundhara Yadav Co Paschim Vihar Speed travels Saket Speed travels Jank Puri Kisan Tours (b) To show all information of students where capacity is more than the no of student in order of rtno.

55 (c) To show area_covered for buses covering more than 20 km., but charges less then (d) To show transporter wise total no. of students traveling. (e) To show rtno, area_covered and average cost per student for all routes where average cost per student is - charges/noofstudents. (f) Add a new record with following data: (11, Moti bagh,35,32,10, kisan tours, 35000) (g) Give the output considering the original relation as given: (i) select sum(distance) from schoolbus where transporter= Yadav travels ; (ii) select min(noofstudents) from schoolbus; (iii) select avg(charges) from schoolbus where transporter= Anand travels ; (iv) select distinct transporter from schoolbus; 5. TABLE : GRADUATE S.NO NAME STIPEND SUBJECT AVERAGE DIV. 1 KARAN 400 PHYSICS 68 I 2 DIWAKAR 450 COMP. Sc. 68 I 3 DIVYA 300 CHEMISTRY 62 I 4 REKHA 350 PHYSICS 63 I 5 ARJUN 500 MATHS 70 I 6 SABINA 400 CEHMISTRY 55 II 7 JOHN 250 PHYSICS 64 I 8 ROBERT 450 MATHS 68 I 9 RUBINA 500 COMP. Sc. 62 I 10 VIKAS 400 MATHS 57 II (a) List the names of those students who have obtained DIV 1 sorted by NAME. (b) Display a report, listing NAME, STIPEND, SUBJECT and amount of stipend received in a year assuming that the STIPEND is paid every month. (c) To count the number of students who are either PHYSICS or COMPUTER SC graduates. (d) To insert a new row in the GRADUATE table: 11, KAJOL, 300, computer sc, 75, 1 (e) Give the output of following sql statement based on table GRADUATE: (i) Select MIN(AVERAGE) from GRADUATE where SUBJECT= PHYSICS ; (ii) Select SUM(STIPEND) from GRADUATE WHERE div=2; (iii) Select AVG(STIPEND) from GRADUATE where AVERAGE>=65; (iv) Select COUNT(distinct SUBDJECT) from GRADUATE; 6. Write SQL command for (i) to (vii) on the basis of the table SPORTS Table: SPORTS Student NO Class Name Game1 Grade Game2 Grade Sammer Cricket B Swimming A 11 8 Sujit Tennis A Skating C 12 7 Kamal Swimming B Football B 13 7 Venna Tennis C Tennis A 14 9 Archana Basketball A Cricket A Arpit Cricket A Atheletics C (a) Display the names of the students who have grade C in either Game1 or 54 P a g e Game2 or both.

56 (b) Display the number of students getting grade A in Cricket. (c) Display the names of the students who have same game for both Game1 and Game2. (d) Display the games taken up by the students, whose name starts with A. (e) Assign a value 200 for Marks for all those who are getting grade B or grade A in both Game1 and Game2. (f) Arrange the whole table in the alphabetical order of Name. (g) Add a new column named Marks. 7. Employees Empid Firstname Lastname Address City 010 Ravi Kumar Raj nagar GZB 105 Harry Waltor Gandhi nagar GZB 152 Sam Tones 33 Elm St. Paris 215 Sarah Ackerman 440 U.S. 110 Upton 244 Manila Sengupta 24 Friends street New Delhi 300 Robert Samuel 9 Fifth Cross Washington 335 Ritu Tondon Shastri Nagar GZB 400 Rachel Lee 121 Harrison St. New York 441 Peter Thompson 11 Red Road Paris EmpSalary Empid Salary Benefits Designation Manager Manager Director Manager Clerk Clerk Clerk Salesman 55 P a g e

57 Write the SQL commands for the following : (i) To show firstname,lastname,address and city of all employees living in paris (ii) To display the content of Employees table in descending order of Firstname. (iii) To display the firstname,lastname and total salary of all managers from the tables Employee and empsalary, where total salary is calculated as salary+benefits. (iv) To display the maximum salary among managers and clerks from the table Empsalary Give the Output of following SQL commands: (i) Select firstname,salary from employees,empsalary where designation = Salesman and Employees.empid=Empsalary.empid; (ii) Select count(distinct designation) from empsalary; (iii) Select designation, sum(salary) from empsalary group by designation having count(*) >2; (iv) Select sum(benefits) from empsalary where designation = Clerk ; CHAPTER XIII: BOOLEAN ALGEBRA 1 Mark Questions 1. Write the Product of sum form of the function G(U, V, W). Truth table representation of G is as follows: 2. Write the dual of the Boolean expression (x+y).(x'+y').(y+z). 3. Write sum of product form of the following F(x, y, z). The truth table representation for the function F is given below : 56 P a g e

58 4. State and prove the absorption law algebraically. 6. Write SOP and POS forms of function F(A, B, C) whose truth table is given below. A B C F Marks Questions 1. State and prove INVOLUTION LAW of Boolean algebra. 2. Implement the following Boolean expression. Y= A.B.C+A.B.C +A.B C+A.B.C with minimum number of gates. 3. Convert the following Boolean expression into its equivalent Canonical Sum of Products form (SOP): (X+Y+Z) (X+Y+Z ) (X +Y+Z) (X +Y +Z ) 4. State and prove the following theorems (a) DeMorgans Theorem b) Absorption Theorem 5. State and verify Associative Law in Boolean algebra. 6. Write the equivalent Boolean expression for the following Logic Circuit. A B 7. Find the complement of (AB) + (A B) 8. Obtain a simplified form for the boolean expression given below(using K-map): F(a, b, c, d) = π(0, 1, 2, 4, 5, 8, 10, 12, 13) 9. Draw the logic circuit diagram of the following expression using only NAND gates only. a + b c + c d 10. Give the duals of XYZ + (XY + 1) 11. Convert X + X Y +X Y to canonical SOP form. 12. Verify XY Z + XY Z + X Y Z = XY + Y Z algebraically. 57 P a g e

59 15. Interpret the following Logic Circuit as Boolean Expression : 16. (a) Implement the following Boolean expression using NOR gates only. F(A, B, C) = A.B.C + A.B.C + A.B.C in POS form.. (b) Find the complement of (A+B) + (A +B) 17. State Absorption Laws. Verify one of the Absorption Laws using a truth table. 18. Prove X + Y'Z = (X + Y' + Z')(X + Y' + Z)(X + Y + Z) algebraically. 19. State and prove Distributive Law. 20. Convert the following Boolean expression into its equivalent Canonical Sum of Product Form((SOP) (X +Y+Z ).(X +Y+Z).(X +Y +Z).(X +Y +Z ) 21. Convert the following Boolean expression into its equivalent Canonical Product of Sum form (POS): A.B.C + A.B.C +A.B.C 22. Draw a Logical Circuit Diagram for the following Boolean Expression: A.(B+C ) 23. Write the equivalent Boolean Expression F for the following circuit diagram : 24. Prove that XY+YZ+YZ =Y algebraically 25. Express the F(X,Z)=X+X Z into canonical SOP form. 26. Write the equivalent Boolean Expression for the following Logic Circuit. 27. Interpret the following logical circuit as Boolean expression 28. Design (A+B).(C+D) using NAND Gate 29. Simplify the following Boolean Expression using Boolean postulates and laws of Boolean Algebra. Z=(a +a).b.c+a.b.c +a.b.(c+c ) 30. Prove x.y +y.z = x yz+x yz +xyz+x yz algebraically. 3 Marks Questions 1. If F(a,b,c,d)= (0,2,4,5,7,8,10,12,13,15), obtain the simplified form using K-Map. 2. If F(a,b,c,d) = (0,1,3,4,5,7,8,9,11,12,13,15), obtain the simplified form using KMap 3. Obtain a simplified form for a boolean expression F(U,V,W,Z)= (0,1,3,5,6,7,10,14,15) 4. Reduce the following boolean expression using K-Map F(A,B,C,D) = (5,6,7,8,9,12,13,14,15) 5. Reduce the following Boolean expression using K-Map: F(A,B,C,D)= (0,1,2,4,5,8,9,10,11) 6. Reduce the following Boolean expression using K Map F (A, B, C, D) = (0,2,3,4,6,7,8,10,12) 7. Reduce the following Boolean Expression using K-Map: F(A,B,C,D)= (0,1,2,4,5,6,8,10) 8. Obtain a simplified form for a Boolean expression : F(x, y, z, w) = Σ(0, 1, 3, 5, 7, 9, 10, 11, 13, 15) using Karnaugh map. 9. Obtain simplified from for a Boolean expression F(X, Y, Z, W) = (0, 1, 4, 5, 7, 8, 9, 12, 13, 15) using K Map method. 58 P a g e

60 59 P a g e CHAPTER XIV: COMMUNICATION AND NETWORK CONCEPTS 1 Mark Questions 1. What is the purpose of using a repeater in the context of networking? 2. Write an advantage and a disadvantage of using optical fibre cables. 3. What is the difference between MAN and WAN? 4. Define Packet Switching. 5. Explain the following terms in short : (i) FTP (ii) URL 6. What is the difference between Video Conferencing and Chat. 7. Write one characteristics each for 2G and 3G Mobile Technologies. 8. Which type of network (out of LAN, PAN and MAN) is formed, when you connect to mobiles using Bluetooth to transfer a picture file. 9. Write two characteristics of Wi-Fi. 10. Write any two characteristics of Cloud Computing. 11. Expand the following: i) GSM ii) GPRS 12. How firewall protect our Network? 13. Expand the following: SMS, URL, WLL, PPP, TCP/IP, FSF, FLOSS, FTP, SMTP, POP, SLIP, FTP, OSS 14. Write one advantage and disadvantage of various network topologies 15. Write short notes for the following Hub, switch, server, modem, repeater 16. What are OSS and FLOSS? 17. What is a network? Why is it needed? 18. What are cookies? 19. How is a hacker different from a crackers? 20. What do you understand by Cyber Law? 21. What is Web Hosting? 22. How Trojan Horses are different from Worms? Mention any one difference. 23. Name one server side scripting language and one client side scripting language. 24. What are Bridge, Gateway and Router? 25. Differentiate between Freeware and Shareware? 26. What is Ethernet? 27. Which media have the ability to communicate over oceans? 28. What is the difference between microwave and radiowave transmission? 29. Which is the special case of microwave relay system? 30. What is bleeding of signal? 31. Which communication medium is to be suggested for very effective and fast communication in guided medium? 32. In harsh industrial environment which cable would you like to use? 33. Which transmission medium is useful for sparsely populated areas? 34. In which transmission medium Bandwidth allocation is limited? 35. What is baud? 36. Which network is easy to expand? 37. In which network there is no server? 38. In Ethernet card which connection is used for coaxial cable or twisted pair or for both? 39. Which device filter the data and which device can handle different protocol? 40. Which device do not control broadcast, filter traffic and filter collision?

61 41. Which networking device is used for less no. of nodes or which is for more no. of nodes? 42. What do you mean by Spam Mails? How can you protect your mailbox from Spam? 43. What do you understand by the terms, Hackers and Crackers? 4 Marks Questions 1. Kanganalay Cosmetics is planning to start their offices in four major cities in Uttar Pradesh to provide cosmetic product support in its retail fields. The company has planned to set up their offices in Lucknow at three different locations and have named them as Head office, Sales office, & Prod office. The company s regional offices are located at Varanasi, Kanpur & Saharanpur. A rough layout of the same is as follows. UP Sales offic e LUCKNOW Head offic e Prod offic e Varanasi offic e Saharanpur offic e Kanpur offic e An approximate distance between these offices as per network survey team is as follows: Place from Place to Distance Head office Sales office 15 KM Head office Prod office 8 KM Head office Varanasi Office 295 KM Head office Kanpur Office 195 KM Head office Saharanpur office 408 KM Number of computers : Head office 156 Sales office 25 Prod office 56 Varanasi Office 85 Kanpur Office 107 Saharanpur office P a g e

62 (i) Suggest the cable layout(s) for connecting the offices. (ii) Name the branch where the server should be installed. Justify your answer. (iii) Suggest the device to be procured by the company for connecting all the computers within each of its offices out of the following devices: Modem Telephone Switch/Hub iv) The company is planning to link its head office situated in Lucknow with the office at Saharanpur. Suggest an economic way to connect it; the company is ready to compromise on the speed of connectivity. Justify your answer. 2. Bhartiya Connectivity Association is planning to spread their offices in four major cities in India to provide regional IT infrastructure support in the field of Education & Culture. The company has planned to setup their head office in New Delhi in three locations and have named their New Delhi offices as Front Office, Back Office and Work Office. The company has three more regional offices as South Office, East Office and West Office located in other three major cities of India. A rough layout of the same is as follows : INDIA New Delhi Front Office Back Office Work Office West Office South Office East Office 61 P a g e Approximate distances between these offices as per network survey team is as follows: Place From Place To Distance BackOffice Front Office 10KM Back Office Work Office 70 Meter Back Office East Office 1291 KM BackOffice West Office 790 KM Back Office South Office 1952 KM In continuation of the above, the company experts have planned to install the following number of computers in each of their offices :Back Office 100 Front Office 20Work Office 50 East Office 50 West Office 50 South Office 50 (i) Suggest network type (out of LAN, MAN, WAN) for connecting each of the following set of their offices : Back Office and Work Office Back Office and South Office

63 (ii) Which device you will suggest to be procured by the company for connecting all the computers with in each of their offices out of the following devices? Switch/Hub Modem Telephone (iii) Which of the following communication medium, you will suggest to be procured by the company for connecting their local offices in New Delhi for very effective and fast communication? Telephone Cable Optical Fiber Ethernet Cable (iv) Suggest a cable/wiring layout for connecting the company s local offices located in New Delhi. Also, suggest an effective method/technology for connecting the company s regional offices- East Office, West Office and South Office with offices located in New Delhi. 3. Lantastic corporation caters to many high profile clients, and has 6 building where it runs its operation. 50mtr 30mtr Pro Grey Wizard 65mtr 120mtr 45mtr 35mtr 30mtr Robo 40mtr Master The distance between buildings are shown through in above diagram. The number in [ ], indicate number of computers in each buildings. a) Buildings Pro has 55 computers. b) Buildings Gray has 185 computers. c) Buildings Wizard has 60 computers. d) Buildings Master has 70 computers. e) Buildings Ribo has 55 computers. Answer the following questions on the basic of above given information. a) suggest the possible cable layouts for the buildings. b) Where would you suggest the placement of server. c) Suggest the cable type that should be used. d) The management wants that the network traffic should be minimized. for this which networks devices and why? (i) hub (ii) bridge (iii) repeater. 4. Hindustan Connecting World Association is planning to start their offices in four major cities in India to provide regional IT infrastructure support in the field of Education & Culture. The company has planned to set up their head office in New Delhi in three locations and have named their New Delhi offices as Sales Office, Head Office and Tech Office. The company s regional offices are located at Coimbatore, Kolkata and Ahmedabad. A rough layout of the same is as follows: Approximate distances between these offices as per network survey team is as follows: Place From Place To Distance Head Office Sales Office 10 KM Head Office Tech Office 70 Meter 62 P a g e

64 Head Office Kolkata Office 1291 KM Head Office Ahmedabad Office 790 KM Head Office Coimbatore Office 1952 KM In continuation of the above, the company experts have planned to install the following number of computers in each of their offices: Head Office 100 Sales Office 20 Tech Office 50 Kolkata Office 50 Ahmedabad Office 50 Coimbatore Office 50 (i) Suggest network type (out of LAN, MAN, WAN) for connecting each of the following set of their offices: - Head Office and Tech Office - Head Office and Coimbatore Office (ii) Which device will you suggest to be procured by the company for connecting all the computers within each of their offices out of the following devices? - Modem - Telephone - Switch/ Hub (iii) Which of the following communication media, will you suggest to be procured by the company for connecting their local offices in New Delhi for ver effective and fast communication? - Ethernet Cable - Optical Fiber - Telephone Cable (iv) Suggest a cable/ wiring layout for connecting the company s local offices located in New Delhi. Also, suggest an effective method/ technology for connecting the company s regional offices at Kolkata, Coimbatore and Ahmedabad P a g e

65 P a g e

66 (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 building and the head office situated in Kolkata. Answer the questions (e1) to (e4) after going through the building positions in the campus and other details, which are given below. [4] 65 P a g e

67 9. (e1) Suggest the most suitable place (i.e. block) to house the server of this organization. Also give a reason to justify your suggested location. (e2) Suggest a cable layout of connections between the building inside the campus. (e3) Suggest the placement of the following devices with justification (i) Switch (ii) Repeater (e4) 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? (i) Optical Fibre (ii) Co-axial Cable (iii) Ethernet Cable 10. Freshminds University of India is starting its Campus in Ana Nagar of South India with its center admission office in Kolkata. The university has 3 major blocks comprising of Office Block, Science Block and Commerce Block in the 5 km area Campus. As a network expert, you need to suggest the network plan as per (i) to (iv) to the authorities keeping in mind the distance and other given parameters. 66 P a g e Kolkata Admission Office Freshminds University Ana Nagar Campus Office Block Commerce Block Science Block

QUESTION BANK SUB: COMPUTER SCIENCE(083)

QUESTION BANK SUB: COMPUTER SCIENCE(083) BHARATIYA VIDYA BHAVAN S V M PUBLIC SCHOOL, VADODARA QUESTION BANK SUB: COMPUTER SCIENCE(083) CHAPTER 5 Data File Handling 1 Mark Questions 1. Observe the program segment carefully and answer the question

More information

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

Q2) Define a class candidate in C++ with following Description: Private Members 4 Number) of type long KVITBP DEHRADUN SUMMER BREAK HOMEWORK, XII COMP SC, LEVEL A Q1) Define a class TEST in C++ with following description: Private Members: TestCode of type integer Description of type string NoCandidate of

More information

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

INTERNATIONAL INDIAN SCHOOL, RIYADH. Ch 1 C++ Revision tour Grade- XII Computer Science Worksheet Ch 1 C++ Revision tour 1) Explain in brief the purpose of function prototype with the help of a suitable example. 2) What is the benefit of using default parameter/argument

More information

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

Assignment-I. Date of Submission: (Computer Science) Assignment-I Date of Submission: 23-04-3013 (Computer Science) FIND THE OUTPUT OF FOLLOWING LINE OF CODE FROM QUESTION 1 TO 13 GENERAL /CALL BY VALUE AND CALL BY REFERENCE/SCOPE RESOLUTION Q 1 int f =

More information

ASSIGNMENT CLASS : XII ( ) COMPUTER SCIENCE

ASSIGNMENT CLASS : XII ( ) COMPUTER SCIENCE ASSIGNMENT CLASS : XII (2015-16) COMPUTER SCIENCE Short answer typequestions: 1.(a)What is the difference between logical error and runtime error? Give suitable example for the same. (b) What is the difference

More information

Sample 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 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 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 (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 information

High Order Thinking Skill Questions Subject : Computer Science Class: XII 1 Mark Questions Programming in C++ 1. Observe the program segment carefully and answer the question that follows: int getitem_no(

More information

Downloaded from 1 Mark Questions Programming in C++

Downloaded from   1 Mark Questions Programming in C++ 1 Mark Questions Programming in C++ 1. Observe the program segment carefully and answer the question that follows: class item int item_no; char item_name[20]; void enterdetail( ); void showdetail( ); int

More information

Constructor & Classes Questions

Constructor & Classes Questions (1)Answer the questions (i) and (ii) after going through the following program: class Match int Time; Match() //Function 1 Time=0; cout

More information

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

(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 information

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:

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: SECOND PREBOARD EXAMINATION (2017 18) CLASS: XII Subject: COMPUTER SCIENCE Date: 24.1.2018 Time Allowed: 3 Hours Maximum Marks: 70 General instructions: (1) All questions are compulsory. (2) Marks are

More information

THE INDIAN COMMUNITY SCHOOL, KUWAIT

THE 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 information

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

KENDRIYA 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 information

Downloaded from

Downloaded from DATA FILE HANDLING IN C++ Key Points: Text file: A text file stores information in readable and printable form. Each line of text is terminated with an EOL (End of Line) character. Binary file: A binary

More information

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

Sample 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 information

Computer Science, Class XII, Chapter No.7 (Data File Handling)

Computer Science, Class XII, Chapter No.7 (Data File Handling) Chapter No.7 (Data File Handling) 1. What is a file? How a text file is different from binary file? 2. What is stream? Name and define the streams generally used for file I/O? 3. Which header file is required

More information

BRAIN 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 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 information

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

JB 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 information

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

PRINCE 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 information

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

Series 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 information

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

HOLIDAYS 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 information

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

void 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 information

If the function modify( ) is supposed to change the mark of a student having student_no y in the file student.dat, write the missing statements to modify the student record. 10. Observe the program segment

More information

DELHI PUBLIC SCHOOL BOKARO STEEL CITY

DELHI 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 information

CLASS XII GUESS PAPER COMPUTER SCENCE (083)

CLASS 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 information

SAMPLE PAPER-2015 Class-XII SUB:-COMPUTER SCIENCE

SAMPLE PAPER-2015 Class-XII SUB:-COMPUTER SCIENCE SAMPLE PAPER-2015 Class-XII SUB:-COMPUTER SCIENCE MAX.MARKS: 70 DURATION : 3 Hrs. 1. a) Observe the program segment given below carefully, and answer the question that follows. [1] class Book { int Book_no

More information

(4) Find the syntax error(s), if any, in the following program: #include main() int x[5],*y,z[5]; for(i=0;i<5;i++) x[i]=i; z[i]=i+3; y=z; x=y; (5) Rew

(4) Find the syntax error(s), if any, in the following program: #include main() int x[5],*y,z[5]; for(i=0;i<5;i++) x[i]=i; z[i]=i+3; y=z; x=y; (5) Rew (1)Rewrite the following program after removing the syntactical error(s), if any Underline each correction, struct TV char Manu_name[20]; char Tv_Type; int Price = 17000; New Tv; gets(manu_name); gets(tv_type);

More information

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

(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 information

Downloaded from

Downloaded from QUARTERLY EXAMINATION, 2013 14 SUBJECT: COMPUTER SCIENCE TIME : 3 hrs CLASS : XII M.M.-70 Instructions: (1) All the questions are compulsory. (2) Programming Language C++ 1 (a) Illustrate the concept of

More information

File.seekp(File.tellp( )-sizeof(c)); //Statement 1 //File.seekp(Record*sizeof(C));

File.seekp(File.tellp( )-sizeof(c)); //Statement 1 //File.seekp(Record*sizeof(C)); DATA FILE HANDLING OUTSIDE DELHI : 2008 4.a)Observe the program segment given below carefully, and answer the question that follows : class candidate { long Cid ; // Candidate s Id char CName[20] ; //

More information

Computer Science XII Important Concepts for CBSE Examination Questions

Computer 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 information

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

KENDRIYA 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 information

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

Please check that this question paper contains 11 printed pages. Please write down the serial number of the question before attempting it. Code No. 91 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 by the

More information

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

void 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 information

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

Mock 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 information

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST PRE-BOARD EXAMINATION COMPUTER SCIENCE

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST PRE-BOARD EXAMINATION COMPUTER SCIENCE KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST PRE-BOARD EXAMINATION 2014-15 COMPUTER SCIENCE Time allowed: 3 hours Maximum Marks : 70 Instructions: (i) All questions are compulsory. (ii) Programming

More information

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

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 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 information

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

KENDRIYA 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 information

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

KENDRIYA VIDYALAYA NO.02 AFS HINDAN G.BAD Holiday Homework Class XII Computer Science KENDRIYA VIDYALAYA NO.02 AFS HINDAN G.BAD Holiday Homework 2018-19 Class XII Computer Science Topics covered 1) Classes and objects 2) Constructors and destructors 3) Inheritance 4) Review of class XI

More information

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

Code 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 information

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

Guru 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 information

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

KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOME WORK XII COMPUTER SCIENCE ARRAY AND STRUCTURES KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOME WORK- 2018-19 XII COMPUTER SCIENCE ARRAY AND STRUCTURES 1. Write a function which will take a string and returns the word count. Each word is separated

More information

Computer Science, Class XII ( ) (Summer Vacation-2015) (Holiday H.W) Chapter No.1 to 3

Computer Science, Class XII ( ) (Summer Vacation-2015) (Holiday H.W) Chapter No.1 to 3 (Summer Vacation-2015) (Holiday H.W) Chapter No.1 to 3 1. Why main function is so special in C++? Give at least two reasons. /* CBSE 1999 */ 2. Differentiate between call by value & call by reference with

More information

AUTUMN BREAK HOLIDAY HOMEWORK

AUTUMN BREAK HOLIDAY HOMEWORK AUTUMN BREAK HOLIDAY HOMEWORK 2018-19 Subject Computer Class 3 Q1. Write about the Keyboard and its use? Q2. Define what is CPU? Q3 Write about the MS Paint? Q4. What is the use of Enter and Del keys?

More information

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

COMPUTER SCIENCE. Time allowed : 3 hours Maximum Marks : 70 Series OSR Code No. 91 Roll No. Candidates must write the Code on the title page of the answer-book. Please check that this question paper contains 16 printed pages. Code number given on the right hand

More information

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

SECTION A [Only for candidates, who opted for C++] PRINCE PUBLIC SCHOOL HALF YEARLY EXAMINATION (2018-19) SAMPLE PAPER-1 COMPUTER SCIENCE XII TIME ALLOWED: 3 HOURS MAXIMUM MARKS: 70 General Instructions 1. This question paper conations 4 questions. 2.

More information

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

Home Assignment for Class XII(Summer Vacation) Subject: CS Based on Library Functions ( 1 Mark) Home Assignment for Class XII(Summer Vacation) Subject: CS Based on Library Functions ( 1 Mark) Q1. Write the names of the header files to which the following belong: (i) isdigit() (vi) setw() (ii) strcmp()

More information

Model Sample Paper 2015

Model 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

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

CLASS 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 information

Q2 Based on Class Concept and features Total Marks 10. Q2(A) Theory Based on Class Concept Marks :2

Q2 Based on Class Concept and features Total Marks 10. Q2(A) Theory Based on Class Concept Marks :2 Q2 Based on Class Concept and features Total Marks 10 Q2(A) Theory Based on Class Concept Marks :2 1. Differentiate between members, which are present within the private visibility mode with those which

More information

Sample Paper 2015 Class XII Subject Computer Science

Sample Paper 2015 Class XII Subject Computer Science Sample Paper 2015 Class XII Subject Computer Science MAX. MARKS: 70 Note (i) (ii) All questions are compulsory. (ii) Programming Language : C++ TIMES: 3 HOURS Q1. (a) Write a macro using #define directive

More information

KENDRIYA VIDAYALAYA PANGODE MONTHLY TEST AUGUST 2015

KENDRIYA VIDAYALAYA PANGODE MONTHLY TEST AUGUST 2015 KENDRIYA VIDAYALAYA PANGODE MONTHLY TEST AUGUST 2015 CLASS: XII COMPUTER SCIENCE TIME: 1½ hrs TOTAL MARKS: 35 1. How can we make private members inheritable? (1) 2. Find out errors in the following program:-

More information

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

CLASS XII SECOND TERM EXAMINATION SUBJECT : COMPUTER SCIENCE SET A2 (SOLUTIONS) CLASS XII SECOND TERM EXAMINATION 2017-2018 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

More information

KENDRIYA 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 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 information

KENDRIYA VIDYALAYA SANGATHAN

KENDRIYA VIDYALAYA SANGATHAN KENDRIYA VIDYALAYA SANGATHAN KENDRIYA VIDYALAYA SANGATHAN REGIONAL OFFICE JAWAHAR NAGAR, NIPCCD ROAD KHANAPARA GUWAHATI 781 002 (ASSAM) (2014-15) STUDY MATERIAL AND HOTS (COMPUTER SCIENCE) 1 Class XII

More information

INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION

INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION Roll Number SET 1 INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION COMPUTER SCIENCE CLASS: XII Sub. Code: 08 Time Allotted: Hr 09.05.018 Max. Marks: 70 GENERAL INSTRUCTIONS: 1. All questions are compulsory..

More information

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

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 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 information

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 =

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 = HOLIDAY HOMEWORK ASSIGNMENT-5 Q1. What will be the output of the following program segment Class Num { int x; float y; void init( ) { x = y = 0; void read(int i, float j) { x = i; y = j; void Display (

More information

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

DATA FILE HANDLING. The function should create another file OUT.TXT with the text DATA FILE HANDLING (a) What is the purpose of seekp() and seekg( )1) (b) Write a function in C++ to read a text file SPACE.TXT. Using this file create another file OUT.TXT by replacing more than one space

More information

Computer Science, Class XII ( ) (Autumn Break-2015) (Holiday H.W) Chapter No.4 to 6, 11 to 13

Computer Science, Class XII ( ) (Autumn Break-2015) (Holiday H.W) Chapter No.4 to 6, 11 to 13 (Autumn Break-2015) (Holiday H.W) Chapter No.4 to 6, 11 to 13 1. How does a class enforce data hiding, abstraction and encapsulation? Give a suitable example using a C++ code to illustrate the same. 2.

More information

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

ITL Public School Pre-Board( ) Computer Science (083) Time:3 hrs M. M: 70 ITL Public School Pre-Board(04-5) Date:..04 Class:XII Computer Science (08) Time: hrs M. M: 70 General Instructions:. Programming Language C++. Try to give Examples a) What is the difference between Actual

More information

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

Mock Test Paper-3. Computer Science. Duration : 3hrs Max Marks : 70 Mock Test Paper-3 Computer Science Mock Test Paper-3 11 Duration : 3hrs Max Marks : 70 1. (a) How does a class inforce data hiding? 2 (b) Name the header files to which the following belong- 1 (c) Rewrite

More information

DATA FILE HANDLING FILES. characters (ASCII Code) sequence of bytes, i.e. 0 s & 1 s

DATA 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 information

4 Marks Questions Programming in C++ 1. Define a class Serial in C++ with the following specifications: Private members of class Serial Serialcode integer Title 20 characters Duration float Noofepisodes

More information

KENDRIYA VIDYALAYA NO-1 ARMAPUR

KENDRIYA VIDYALAYA NO-1 ARMAPUR HOME ASSIGNMENT FOR SUMMER VACATION DAYS LESSONS MLL (MINIMUM LEVEL LEARNING) HOT(HIGH ORDER THINKING) 1 2 3 4 1. Differentiate between call by value & call by reference with suitable examples in reference

More information

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

DELHI 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 information

QUESTION BANK SUB: COMPUTER SCIENCE(083)

QUESTION BANK SUB: COMPUTER SCIENCE(083) BHARATIYA VIDYA BHAVAN S V M PUBLIC SCHOOL, VADODARA QUESTION BANK SUB: COMPUTER SCIENCE(083) CHAPTER 6 Pointers 2 MARKS QUESTION 1. Rewrite the following codes after removing errors, if any, in the following

More information

Computer 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 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 information

KendriyaVidyalayaSangathan Kolkata Region

KendriyaVidyalayaSangathan 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 information

Session Chapter 4: Classess & Object

Session Chapter 4: Classess & Object Session 2017-18 Chapter 4: Classess & Object How does a class enforce data-hiding, abstraction, and encapsulation? What is the significance of access specifiers in a class? How are class and object different

More information

JB ACADEMY HALF-YEARLY EXAMINATION 2016 CLASS XII COMPUTER SCIENCE. Time: 3:00 Hrs. M.M.: 70

JB ACADEMY HALF-YEARLY EXAMINATION 2016 CLASS XII COMPUTER SCIENCE. Time: 3:00 Hrs. M.M.: 70 JB ACADEMY HALF-YEARLY EXAMINATION 2016 CLASS XII COMPUTER SCIENCE Time: 3:00 Hrs. M.M.: 70 Q.1 (a) Explain in brief the purpose of function prototype with the help of a suitable example. (b) Identify

More information

BHARATIYA 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 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 information

case control statement (switch case)

case control statement (switch case) KEY POINTS: Introduction to C++ C++ is the successor of C language & developed by Bjarne Stroustrup at Bell Laboratories, New Jersey in 1979. Tokens- smallest individual unit. Following are the tokens

More information

AISSCE COMMON MODEL EXAMINATION Subject Computer Science [083] Time Allotted: 3 Hours Maximum Marks: 70

AISSCE COMMON MODEL EXAMINATION Subject Computer Science [083] Time Allotted: 3 Hours Maximum Marks: 70 AISSCE COMMON MODEL EXAMINATION 2011-12 Subject Computer Science [083] Time Allotted: 3 Hours Maximum Marks: 70 General Instructions: General Instructions: Please check that this question paper contains

More information

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

CBSE 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 information

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

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

COMPUTER SCIENCE. Time allowed : 3 hours Maximum Marks : 70. General Instructions: All questions are compulsory. Programming Language: C++

COMPUTER SCIENCE. Time allowed : 3 hours Maximum Marks : 70. General Instructions: All questions are compulsory. Programming Language: C++ COMPUTER SCIENCE Time allowed : 3 hours Maximum Marks : 70 General Instructions: (i) (ii) All questions are compulsory. Programming Language: C++ QUESTION PAPER CODE 91/1 1. (a) What is the difference

More information

Data File Handling FILL IN THE BLANKS EACH QUESTION CARRY 1 MARK

Data File Handling FILL IN THE BLANKS EACH QUESTION CARRY 1 MARK Data File Handling FILL IN THE BLANKS EACH QUESTION CARRY 1 MARK 1.. Observe the program segment given below carefully, and answer the question that follows: class Labrecord int Expno; char Expriment[20];

More information

DELHI PUBLIC SCHOOL, RUBY PARK, KOLKATA CLASS XII SUBJECT: COMPUTER SCIENCE QUESTION BANK FILE HANDLING:-

DELHI PUBLIC SCHOOL, RUBY PARK, KOLKATA CLASS XII SUBJECT: COMPUTER SCIENCE QUESTION BANK FILE HANDLING:- DELHI PUBLIC SCHOOL, RUBY PARK, KOLKATA CLASS XII SUBJECT: COMPUTER SCIENCE QUESTION BANK FILE HANDLING:- 1. Write a function in C++ to count and display the number of lines not starting with alphabet

More information

CLASS-XI COMPUTER SCIENCE

CLASS-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 information

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

KUWAIT 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 information

Class and object Holiday Homework

Class and object Holiday Homework Class and object Holiday Homework 1.Define a class student with the following specification: Private members admno integer type sname 20 character eng, math,sci, total float ctotal( ) A function to calculate

More information

m) sin() n) endl o) getch() p) cout

m) sin() n) endl o) getch() p) cout SAMPLE PAPER 1. a) Name the header file for the following built-in functions: a) log() b) exp() c) getch() d) isalnum() e) fabs() f) isalpha() g) toupper() h) cos() i) random() j) gets() k) abs() l) tolower()

More information

KENDRIYA VIDYALAYA SANGATHAN MODEL QUESTION PAPER-5 BLUE PRINT CLASSS XII COMPUTER SCIENCE (083) TIME: 03:00 Hrs. MAX. MARKS: 70 S.No.

KENDRIYA VIDYALAYA SANGATHAN MODEL QUESTION PAPER-5 BLUE PRINT CLASSS XII COMPUTER SCIENCE (083) TIME: 03:00 Hrs. MAX. MARKS: 70 S.No. KENDRIYA VIDYALAYA SANGATHAN MODEL QUESTION PAPER-5 BLUE PRINT CLASSS XII COMPUTER SCIENCE (83) TIME: 3: Hrs. MAX. MARKS: 7 S.No. UNIT VS A (1 TOTAL SA I (2 Marks) SA II (3 Marks) L A (4 Marks) Mark) Review

More information

CLASS: XII COM.SCIENCE

CLASS: XII COM.SCIENCE CLASS: XII COM.SCIENCE HIGHER ORDER THINKING SKILLS 2008-2009 KENDRIYA VIDYALAYA SANGATHAN B A N G A L O R E R E G I O N Page 1 QUESTION BANK HIGHER ORDER THINKING SKILLS CLASS XII COMPUTER SCIENCE Chief

More information

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

Autumn Break 2017 Exam Oriented Assignment Class-XII B, Computer Science Autumn Break 2017 Exam Oriented Assignment Class-XII B, Computer Science S.No. 1 Name of Chapter/Topic CLASSES AND OBJECTS HOT Questions 1. What do you understand by member function? 2. Differentiate between

More information

Disadvantages: Not suitable for long distance due to high attenuation. Low bandwidth support. Low Speed

Disadvantages: Not suitable for long distance due to high attenuation. Low bandwidth support. Low Speed Types: Unshielded Twisted Pair (UTP) Shielded Twisted Pair (STP STP offers greater protection from interference and crosstalk due to shielding. But it is heavier and costlier than UTP. USE: 1. In local

More information

CBSE Sample Paper for Computer Science Class XII.

CBSE Sample Paper for Computer Science Class XII. CBSE Sample Paper for Computer Science Class XII. Time allowed : 3 hours Maximum marks : 70 Question-1 1. (a) Define Multilevel and Multiple Inheritance with example. [ 2 Mark] (b) Define a class ELECTION

More information

Computer Science 330 Assignment

Computer Science 330 Assignment Computer Science 330 Assignment Note: All questions are compulsory. The marks for each question are given at the same place. Max. Marks: 20 (ii) Write your name, enrolment number, AI name and subject etc.

More information

Object Oriented Pragramming (22316)

Object 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 information

ITL Public School First Term( )

ITL Public School First Term( ) ITL Public School First Term(06-7) Date:9.09.6 Class: XI Computer Science(08) Time: hrs. M. M: 70 General Instructions: There are 7 questions in total. Marks are given against all the questions Try to

More information

KENDRIYA VIDYALYA CLRI COMPUTER SCIENCE XII WORKSHEET ON OUTPUT QUESTIONS

KENDRIYA VIDYALYA CLRI COMPUTER SCIENCE XII WORKSHEET ON OUTPUT QUESTIONS KENDRIYA VIDYALYA CLRI COMPUTER SCIENCE XII WORKSHEET ON OUTPUT QUESTIONS 1. What will be the output of following: void main ( ) int val = 10; cout

More information

COMPUTER SCIENCE(083) SAMPLE QUESTION PAPER CLASS XII

COMPUTER 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 information

KENDRIYA VIDYALAYA GOMTINAGAR, LUCKNOW (SHIFT-II) DAY-WISE ASSIGNMENT FOR WINTER BREAK CLASS XII SUBJECT : COMPUTER SCIENCE

KENDRIYA VIDYALAYA GOMTINAGAR, LUCKNOW (SHIFT-II) DAY-WISE ASSIGNMENT FOR WINTER BREAK CLASS XII SUBJECT : COMPUTER SCIENCE KENDRIYA VIDYALAYA GOMTINAGAR, LUCKNOW (SHIFT-II) DAY-WISE ASSIGNMENT FOR WINTER BREAK 2015-16 CLASS XII SUBJECT : COMPUTER SCIENCE Instructions : Revise the topic (if required) and then solve the related

More information

SAMPLE 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.: 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 information

[Time allowed : 3hours] [Maximum Marks: 70] Instructions (i) All questions are compulsory (ii) Programming Language: C++

[Time allowed : 3hours] [Maximum Marks: 70] Instructions (i) All questions are compulsory (ii) Programming Language: C++ 1(a) XII COMPUTER SCIENCE CBSE Board - 010 [Time allowed : 3hours] [Maximum Marks: 70] Instructions (i) All questions are compulsory (ii) Programming Language: C++ What is the difference between call by

More information

COMMON PRE-BOARD EXAMINATION COMPUTER SCIENCE

COMMON 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 information

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

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION. REVISION Examination 2013 COMPUTER SCIENCE (083) CLASS XII KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION REVISION Examination 01 COMPUTER SCIENCE (08) CLASS XII Time Allowed: Hours Maximum Marks: 70 Instructions: (i) All questions are compulsory. (ii) Programming

More information

Q4. Based on File Handling 6-8 Marks File Pointers tellg() tellp() seekp()seekg() 1-2 Marks Binary File 4 Marks Text file 2 Marks

Q4. Based on File Handling 6-8 Marks File Pointers tellg() tellp() seekp()seekg() 1-2 Marks Binary File 4 Marks Text file 2 Marks Q4. Based on File Handling 6-8 Marks File Pointers tellg() tellp() seekp()seekg() 1-2 Marks Binary File 4 Marks Text file 2 Marks 1. (a) Observe the program segment given below carefully and the questions

More information