CBSE Board Class 12 Computer Science Sample Papers 2007


CBSE Board Sample Papers 2007 for Class 12 Computer Science

SAMPLE PAPER 2007
CLASS 12
COMPUTER SCIENCE

1.Please check that this question paper contains 4 printed pages.
2. 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 candidate.
3. Please check that this question paper contains 7 questions.
4. Please write down the serial number of the question before attempting it.

COMPUTER SCIENCE

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

1.  (a)  Find the syntax error(s), if any in the following program:   2
  Underline each correction. 
  #include<iostream.h>
const int size=5;
main()
{  int x[size],*y, z[size]
for(i=0;i<5;i++)
{  x[i]=I; z[i]=i+3;
  y=z;   x=z;
  size = size+1;  } }

(b) Give the output of the following program segment:.   2
  char * NAME = “a ProFiLe”;
  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-1]);
  else
  NAME[x]--;
  cout<<NAME<<endl;

(c)  Explain new and delete operators with examples.   3

(d)Find the output of the following program. Assume that all required headers files have been included.      2
void main( )
{ int x[ ]={10,20,30,40,50};
int *p,**q,*t;
p = x; t = x + 1; q = &t;
cout<<*p<<”;”<<**q”;”<<<<*t++;
}

2.   (a)  How is computer memory allocated for a two dimensional array? 2

(b)  An array J[15][10] is stored in memory with each element requiring two
  bytes of storage. If the base address of J is 3000, determine the location
  of J[8][7] when the array J is stored by (i) Row Major, (ii) Column
  Major.          3

(c)  An array X[1…160][1…10] is a two dimensional array. The first
   element of the array is stored at location 100. Each element of array     occupies 6 bytes. Find the memory location of X[2][4] when array is    stored in row wise and column wise.      3

(d) Arrange the following array of integers in ascending order using bubble
sort technique.  26, 21, 20, 23, 29, 17, 14     3

3. (a)  Write a function in C++ to find and display the sum of each row and
  each column of a 2D array of type float. Use the array and its size as
  parameters with float as its return type.      4

(b)  Complete the following class with all function definitions.  4
   class stack
   {  int data[10];
    int top;
    public:
    stack( )  { top=-1; }
    void push(); 
    void pop();  
    void delete(int ITEM);
// To delete all elements which are equal to ITEM
   };
(c)Write a function in C++ to perform insert operation on a dynamically

  allocated queue congaing names of students.     3

(d)Evaluate the following postfix expression using stack and show the contents of stack after execution of each operation.    3
  120, 45, 20, +, 25, 15, − , +, *

4. (a)  With 12 memory locations if front =10 and rear =3. If 4 elements are
  deleted from above queue what will be the value of front & rear? 1

(b)  What is a relation? What is the difference between tuple & attributes? 2

(c)  What is the difference between Primary Key, Candidate key and
Foreign key? Explain it with an example.     3

(d) What are DDL and DML?       2

5.  Write the SQL commands for (a) to (d) and write the output for (e) on
the basis of table Hospital :

(a)To show all information about the patients of cardiology department. 2

(b)To list the name of female patients who are in ENT department. 2

(c)To list names of all patients with their date of admission in ascending
order.          2

(d)To count the no of patients with age > 20.    2

(e)Give the output of the following SQL commands:   4
(i) Select COUNT(DISTINCT charges ) from hospital;
(ii) Select MIN(age) from hospital where Sex=’M’;
(iii)Select SUM(charges) from hospital where Sex =’F’;
(iv)Select avg(charges) from hospital where dateofadm>{12/05/06};

6.  (a) What is the difference between LAN & MAN?    2

(b) Explain the following terms:  (i)  FTP  (ii)  URL  2

(c) Differentiate between Hacker & Cracker?    1

(d)  TKM Centenary public school in Kollam is setting up the network
  between its different wings. There are four wings named as Seniors (S),
  Kids (K), Juniors (J) and Hostel (H). Distance between various buildings
  is given below:

(i) Suggest a valid topology for networking the computer of all wings 1
(ii) Name the wing where the server to be installed. Justify your answer. 1
(iii)Suggest the placement of Hub or Switch in the network.  1

7.  a) Expand the following terminology      1
(i)XML
(ii)GSM
(iii)CDMA
(iv)TCP/IP
(b) Differentiate between packet switching and message switching 1
(c) What are cookies? 

CBSE Board Best Sellers

In order to keep pace with technological advancement and to cope up with CBSE Board examinations, Pearson group has launched Edurite to help students by offering Books and CDs of different courses online.

Sign Up FREE

Get help on CBSE Board Sample Question Paper for class 12 Now

ALWAYS LEARNING