CBSE Guess > Papers > Question Papers > Class XII > 2006 > Computer Science > Compartment Delhi Set -I 
            Computer science  — 2006 (Set I — Compartment   Delhi) 
            
				
              Q. 1.  
              
                - 	Name the header file to which the following belong: (1) 
 
                (i)	gets( ) 
                (ii)	open( ) 
                - Illustrate the use of local and global variables in C++. 				       (2 )
 
                - Rewrite the following program after removing the syntactical error(s), if any Underline each correction,									        (2)
 
                  #include <iostream.h> 
                  void main( ) 
                  {                      struct TV 
                        {     	char Manu_name[20]; 
                              char Tv_Type; 
                              int Price = 17000; 
                  }     New Tv;  
                        gets(Manu_name); 
                        gets(Tv_Type); 
                  } 
                - Find the output of the following program:						        (3)
 
                  #include<iostream.h> 
                  #include<string.h> 
                  class country 
                  {        char *country name;  
                          int length;  
                          public:. 
                          country ( ) {Iength =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 (“Nepal”), country3 (“China”), S1,S2;  
                          S1.Replace (country1, country2); 
                          S2.Replace (S1,country3); 
                          S1.display( ); 
                          S2.display ( ); 
                  } 
                - Find the output of the following program:						        (2)
 
                  #include < iostream.h> 
                  void main( ) 
                  {        int *Pointer Array [10]; 
                          int marks [ = {75, 68, 90, 34, 0, 10, 90, 65};  
                          for (int I = 0; marks [ I]!=0; I++) 
                          {                        PointerArray [I]=&marks[I]; 
                                  * (PointerArray [I] ) += 5; 
                          } 
                          int index = 0; 
                          while(index < I ) 
                          {        int p=*(PointerArray[index] ); 
                                  if(p >=60) cout <<p<<’,’; 
                                  index ++; 
                          } 
                  } 
                - What is the importance of constructor in object oriented programming? Explain with the help of an example. 								        (2)
 
               
              Q. 2.  
              
                - 	What is the difference between Multilevel and Multiple Inheritance in context to object oriented programming?								        (2)
 
                - Given a class as follows:
 
                  class Match 
                  {    	int Time; 
                        public: 
                        Match (int y) { Time = y;}	      //Constructor 1 
                        Match (Match& t);	                             //Constructor 2 
                };
				
				- Create an object, such that it invokes Constructor 1.
 
                - Write complete definition for Constructor 2.
 
				 
				 
                - Define a class named MOVIE in C++ with the following description 		        (4)
 
                  Private members 
                  HALL_NO 			                                integer 
                  MOVIE_NAME 			                        Array of characters (String) 
                  WEEK 				                                      integer (Total number of weeks the same movie is shown) 
                  WEEK_COLLECTION		          Float 
                  TOTAL_COLLECTION		         Float 
                  Public Members
				  
				  - Function Read_Data( ) to read an object of ADMISSION type
 
				  - Function Display( ) to display the details of an object
 
				  - Function Update( ) to update the total collection and Weekly collection once the week changes. Total collection will be incremented by Weekly collection and Weekly collection is made Zero.
 
				   
			     
                -  Answer the questions (i) to (iii) based on the following code:
 
                  class toys 
                  { 
                        char Code;  
                        char Manufacturer [10]; 
                        public: 
                        toys( ); 
                        void Read_toy_details ( ); 
                        void Disp_toy_details( ); 
                  }; 
                  class electronic : public toys 
                  { 
                        int no_of_types;  
                        float cost_of_toy;  
                        public: 
                        void Read_elect_details ( ); 
                        void Disp_elect_details ( ); 
                  }; 
                        class infants : private electronic 
                  { 
                        int no_of_buyers; 
                        char delivery date[10]; 
                        public: 
                        void Read_infant_details (); 
                        void Disp_jnfant_details(); 
                  }; 
                  void main ( ) 
                  {                      infants MyToy;      	}
				
				- Mention the member names which are accessible by MyToy declared in main () function.									        (1)
 
                - What is the size of MyToy in bytes?					        (1)
 
                 - Mention the names of functions accessible from the member function
                  Read_infant_details () of class printer.					        (2)
 
				   
			     
			   
				    Q. 3. 
				    
				      - 	Write a function in C++ which accepts an integer array and its size as arguments/ parameters and then assigns the elements into a two dimensional array of integers in the following format:								        (4)
 
				        
                          
                            If the array is 1, 2, 3, 4, 5, 6 
      The resultant 2 D array is given below | 
                            If the array is 1, 2, 3 
      The resultant 2 D array is given below | 
                           
                          
                            0 
        0 
        0 
        0 
        0 
        6  | 
                            0 
      0 
      0 
      0 
      5 
      5 | 
                            0 
      0 
      0 
      4 
      4 
      4 | 
                            0 
      0 
      3 
      3 
      3 
      3 | 
                            0 
        2 
        2 
        2 
        2 
        2  | 
                            1 
      1 
      1 
      1 
      1 
      1 | 
                            0 
      0 
      3 | 
                            0 
      2 
      2 | 
                            1 
      1 
      1 | 
                           
                         
				       
		                -  An array MAT [15] [7] is stored in the memory along the column with each element occupying 2 bytes of memory. Find out the base address and the address of element MAT [2] [5], if the location of MAT [5] [4] is stored at the address 100. 		        (4)
 
				        -  What is circular queue? How is it different from simple queue?
 
				          Write a function in C++ to perform Delete operation in dynamically allocated Queue containing names of students.							        (4) 
				        -  Write a function bubble_sort to sort the passed array of 10 integers in descending order using bubble sort.
 
				        - Evaluate the following postfix expression using a stack and show the contents of the stack after execution of each operation.
 
				          5,10,*,20,2,/,+ 
				     
              Q. 4.			   
              
                -  	Write a function to count the number of VOWELS present in a text file named “PARA.TXT”.									        (3)
 
                - Following is the structure of each record in a data file named “VEHICLE.DAT”. 
 
                  struct VEHICLE 
                  {      char Vehicle_Code [10]; 
                         char Vehicle_Name[10]; 
                         float cost; 
                  }; 
                  Write a function in C++ to update the tile with a new value of cost for a particular Vehicle. The value of Vehicle_Code and cost are read during the execution of the program.	        (3) 
               
              Q. 5. 
              
                - What is a Candidate Key?							      (2)
 
                - Study the following tables STAFF and SALARY and write SQL commands for the questions (i) to (iv) and give outputs for SQL queries (v) to (vi). 			       (6)
 
                  TABLE: STAFF 
                  
                    
                      | ID | 
                        NAME  | 
                        DEPT | 
                        SEX  | 
                        EXPERIENCE | 
                     
                    
                      | 101  | 
                        Siddharth | 
                        SALES  | 
                        M  | 
                        12 | 
                     
                    
                      | 104 | 
                        Raghav | 
                        FINANCE | 
                        M  | 
                        5 | 
                     
                    
                      | 107  | 
                        Naman | 
                        RESEARCH  | 
                        M | 
                        10 | 
                     
                    
                      | 114 | 
                        Nupur  | 
                        SALES | 
                        F | 
                        3 | 
                     
                    
                      | 109 | 
                        Janvi | 
                        FINANCE | 
                        F | 
                        9 | 
                     
                    
                      | 105  | 
                        Rama  | 
                        RESEARCH | 
                        M | 
                        10 | 
                     
                    
                      | 117 | 
                        James | 
                        SALES | 
                        F  | 
                        3 | 
                     
                    
                      | 111  | 
                        Binoy | 
                        FINANCE  | 
                        F  | 
                        12 | 
                     
                    
                      | 130 | 
                        Samuel | 
                        SALES | 
                        M  | 
                        15 | 
                     
                   
                   
                    TABLE SALARY 
                    
                      
                        | ID | 
                        BASIC  | 
                        ALLOWANCE | 
                        COMMISSION% | 
                       
                      
                        | 101 | 
                        12000 | 
                        1000 | 
                        3 | 
                       
                      
                        | 104 | 
                        23000 | 
                        2300  | 
                        5 | 
                       
                      
                        | 107 | 
                        32000 | 
                        4000 | 
                        5 | 
                       
                      
                        | 114 | 
                        12000  | 
                        5200  | 
                        10 | 
                       
                      
                        | 109  | 
                        42000  | 
                        1700  | 
                        20 | 
                       
                      
                        | 105 | 
                        18900 | 
                        1690 | 
                        3 | 
                       
                      
                        | 130  | 
                        21700 | 
                        2600  | 
                        30 | 
                       
                     
                
              
			  - Display NAME of all staff who are in “SALES” having more than 10 years experience from the table STAFF.
 
  			- Display the average salary of all staff working in “FINANCE” department using the tables STAFF and SALARY. SALARY BASIC + ALLOWANCE.
 
             - 	Display the minimum ALLOWANCE of female staff.
 
              - 	Display the highest commission% among all male staff.
 
              - 	SELECT count (*) from STAFF where SEX = “F”.
 
              - 	SELECT NAME, DEPT, BASIC from STAFF, SALARY where DEPT = “SALES” and STAFEID = SALARY.ID.
 
			   
			   
			   
		      Q. 6. 
			   
			     - 	State and verify De Morgan’s theorem.						        (2)
 
                 -  Write the equivalent expression for the following logical circuit:			        (2)
 
                     
                 - Express P’ + QR’ in canonical SOP form.
 
                 - Reduce the following Boolean expression using K-Map:
 
                   F(P,Q,R,S)=∑(l,3,5,8,11,12,15 
       
                   Q. 7.  
                   
                     - Explain function of Modem and Switch.
 
                     - Expand the following terms:
					 
					 - FTP
 
					 - HTML
 
					 - XML
 
					 - WWW
 
					  
					  
                     -  Write one advantage of BUS topology as compared to STAR topology. 		        (1)
 
                     -  ABC SWITCHEARS LTD in srinagar is setting up the network between its different departments located in different wings. There are 4 wings named as Manufacturing (M), Research (R), Administration (A) and Personnel (P).
 
                       Distances between various wings are given below: 
                       
                         
                           | Wing A to Wing M | 
                           100 m | 
                          
                         
                           | Wing A to Wing R | 
                           200 m  | 
                          
                         
                           | Wing A to Wing P | 
                           400 m | 
                          
                         
                           | Wing M to Wing R | 
                           300 m | 
                          
                         
                           | Wing M to Wing P | 
                           100m | 
                          
                         
                           | Wing R to Wing P  | 
                           450 m | 
                          
                        
                       Number of Computers: 
                       
                         
                           | Wing M | 
                           15 | 
                          
                         
                           | Wing R | 
                           100 | 
                          
                         
                           | Wing A  | 
                           50 | 
                          
                         
                           | Wing P | 
                           150 | 
                          
                        
					   
					   - Suggest a suitable Topology for networking the computers of all wings. 	        (1)
 
		              	- Name the wing where the Server is to be installed. Justify your answer. 	        (1)
 
						- Suggest the placement of Hub/Switch in the network. 			        (1)
 
						- Mention an economic technology to provide Internet accessibility to all wings.	        (1)
 
					     
					 
	   
                
              
                
                  |  Computer Science 2006 Question Papers Class XII | 
                 
                
                  | Delhi | 
                  Outside Delhi | 
                  Compartment Delhi  | 
                 
                
                    | 
                  Set I | 
                    | 
                  Set I | 
                    | 
                  Set I | 
                 
               
               
                       | 
    
     
  |