1. Home
  2. /
  3. CBSE
  4. /
  5. Class 12
  6. /
  7. Computer Science
  8. /
  9. CBSE Question Paper 2007...

CBSE Question Paper 2007 class 12 Computer Science

myCBSEguide App

myCBSEguide App

Download the app to get CBSE Sample Papers 2024-25, NCERT Solutions (Revised), Most Important Questions, Previous Year Question Bank, Mock Tests, and Detailed Notes.

Install Now

CBSE Question Paper 2007 class 12 Computer Science conducted by Central Board of Secondary Education, New Delhi in the month of March 2007. CBSE previous year question papers with solution are available in myCBSEguide mobile app and cbse guide website. The Best CBSE App for students and teachers is myCBSEguide which provides complete study material and practice papers to CBSE schools in India and abroad.

Question Paper 2007 class 12 Computer Science

Download as PDF

Class 12 Computer Science list of chapters

  1. Review of Python
  2. Concept of Object Oriented Programming
  3. Classes in Python
  4. Inheritance
  5. Linear List Manipulation
  6. Stacks & Queues in list
  7. Data File Handling
  8. Exception Handling & Green Functions
  9. Databases Concepts and SQL
  10. Structure  Query Language
  11. Boolean Algebra
  12. Boolean Functions & Reduce Forms
  13. Application of Boolean Logic
  14. Networking Concepts  (Part 1)
  15. Networking Concepts  (Part 2)
  16. Networking Protocols
  17. Mobile Telecommunication Technologies, Network Security and Internet Services

CBSE Question Paper 2007 class 12 Computer Science

General Instructions:
  • All questions are compulsory.
  • Programming Language: C++

1. (a) Differentiate between a Logical Error and Syntax Error. Also give suitable example of each in C++. (2)
(b) Name the header file(s) that shall be needed for successful compilation of the following C++ code: (1)

void main( )

{

char Text[40];

strcpy(Text,”AISSCE”);

puts(Text);

}

(c) Rewrite the following program after removing the syntactical error(s), if any. Underline each correction. (2)

#include <iostream.h>

const int Size 5;

void main()

{

int Array[Size];

Array = {50,40,30,20,10};

for(Ctr=0; Ctr<Size; Ctr++)

cout>>Array[Ctr];

}

(d) Find the output of the following program: (2)

#include<iostream.h>

void main()

{

int Numbers[] = {2,4,8,10};

int *ptr = Numbers;

for (int C = 0; C<3; C++)

{

cout<< *ptr << “@”;

ptr++;

}

cout<<endl;

for(C = 0; C<4; C++)

{

(*ptr)*=2;

–ptr;

}

for(C = 0; C<4; C++)

cout<< Numbers [C]<< “#”;

cout<<endl;

}

(e) Find the output of the following program : (3)

#include<iostream.h>

void Indirect(int Temp=20)

{

for (int 1=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 ;

}

(f) In the following C++ program what is the expected value of Myscore from Options

(i) to (iv) given below. Justify your answer. (2)

#include<stdlib.h>

#include<iostream.h>

void main( )

{

randomize();

int Score[] = {25,20,34,56, 72, 63}, Myscore;

Myscore = Score[2 + random(2)];

cout<<Myscore<<endl; }

(i) 25

(ii) 34

(iii) 20

(iv) None of the above

2. (a) Differentiate between Protected and Private members of a class in context of Inheritance using C++. (2)

(b) Answer the questions (i) and (ii) after going through the following class: (2)

class Science

{

char Topic[20];

int Weightage;

public:

Science ( ) //Function 1

{

strcpy (Topic, “Optics” );

Weightage = 30;

cout<<“Topic Activated”;

}

~Science( ) //Function 2

{

cout’<<”Topic Deactivated”;

}

];

(i) Name the specific features of class shown by Function 1 and Function 2 in the above example.

(ii) How would Function 1 and Function 2 get executed?

(c) Define a class Travel in C++ with the description given below: (4)

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

300 <1000 & >=500

200 <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 * 300 + No_of_Children * 150

i.e. 3 * 300 + 2 * 150 = 1200

  • A function EnterTravel( ) 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 ShowTravel( ) which displays the content of all the data members for a Travel.

(d) Answer the questions (i) to (iv) based on the following code : (4)

class Teacher

{

char TNo[5], TName[20], DeptflO];

int Workload;

protected:

float Salary;

void AssignSal(float);

public:

Teacher( ) ;

void TEntry( ) ;

void TDisplay( );

};

class Student

{

char Admno[10], SName[20], Stream[10];

protected:

int Attendance, TotMarks;

public:

Student( );

void SEntry( );

void SDisplay( );

};

class School : public Student, public Teacher

};

char SCode[10], SchName[20];

public:

School ( ) ;

void SchEntry( );

void SchDisplay( );

};

(i) Which type of Inheritance is depicted by the above example ?

(ii) Identify the member functiion(s) that cannot be called directly from the objects of class School from the following :

TEntry( )

SDisplay( )

SchEntry( )

(iii) Write name of all the member(s) accessible from member functions of class School.

(iv) If class School was derived privately from class Teacher and privately from class Student, then, name the member function(s) that could be accessed through Objects of class School.

3. (a) 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. (4)

Example : if an array of five elements initially contains the elements as

3, 4, 5, 16, 9

then the function should rearrange the content of the array as

6, 2, 10, 8, 18

(b) An array Arr[15][20] is stored in the memory along the row with each element occupying 4 bytes. Find out the Base Address and address of the element Arr[3][2], if the element Arr[5][2] is stored at the address 1500.

(c) Write a function in C++ to delete a node containing customer’s information, from a dynamically allocated Queue of Customers implemented with the help of the following structure : (4)

struct Customer

{

int CNo;

char CName[20];

Customer *Link;

};

(d) 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. (2)

[Assuming the 2D Array to be a square matrix with odd dimension i.e. 3×3, 5×5, 7×7 etc…]

Example, if the array content is

3 5 4

7 6 9

2 1 8

Output through the function should be :

Middle Row : 7 6 9

Middle Column : 5 6 1

(e) Evaluate the following postfix notation of expression : (2)

15 3 2 + / 7 + 2 *

4. (a) Observe the program segment given below carefully, and answer the question that follows : (1)

class Labrecord

{

int Expno;

char Experiment[20];

char Checked;

int Marks;

public :

//function to enter Experiment details

void EnterExp( );

//function to display Experiment details

void ShowExp ( ) ;

//function to return Expno

char RChecked ( ) {return Checked;}

//function to assign Marks

void Assignmarks(int M)

{ Marks = M;}91 7 P.T.O.

};

void MpdifyMarks()

{ fstream File;

File.open(“Marks.Dat”,ios::binary|ios::in|ios::out);

Labrecord L;

int Rec = 0;

while (File.read((char*)&L, sizeof(L)))

{

if(L.RChecked( )== ‘N‘ )

L.Assignmarks(0)

else

L.Assignmarks(10)

_____________________ //statement 1

_____________________ //statement 2

Rec ++ ;

}

File.close ();

}

If the funption ModifyMarks() is supposed to modify Marks for the records in the file MARKS.DAT based on their status of the member Checked (containing value either ‘Y’ or ‘N’). Write C++ statements for the statement 1 and statement 2, where, statement 1 is required to position the file write pointer to an appropriate place in the file and statement 2 is to perform the write operation with the modified record.

(b) Write a function in C++ to print the count of the word the as an independent word in a text file STORY.TXT. (2)

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 2.

(c) Given a binary file SPORTS.DAT, containing records of the following structure type :

struct Sports

{

char Event[20];

char Participant[10][30];

};

Write a function in C++ that would read contents from the file SPORTS.DAT and creates a file named ATHLETIC.DAT copying only those records from SPORTS.DAT where the event name is “Athletics”. (3)

5. (a) What is the importance of a Primary Key in a table? Explain with a suitable example.

(b) Consider the following tables Consignor and Consignee. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii). (6)

TABLE: CONSIGNOR

CnorlD CnorName CnorAddress City

ND01 Singhal 24, ABC Enclave New Delhi

ND02 Amit Kumar 123, Palm Avenue New Delhi

MU15 Kohli 5/A, South Street Mumbai

MU50 S Kaur 27-K, Westend Mumbai

TABLE: CONSIGNEE

CneelD CnorlD CneeName CneeAddress CneeCity

MU05 ND01 Rahul Kishore 5, Park Avenue Mumbai

ND08 ND02 PDhingra 16/J, Moore Enclave New Delhi

KO19 MU15 A P Roy 2A, Central Avenue Kolkata

MU32 ND02 S Mittal P 245, AB Colony Mumbai

ND48 MU50 B P Jain 13, Block D, A Vihar New Delhi

(i) To display the names of all Consignors from Mumbai.’

(ii) To display the CneelD, CnorName, CnorAddress, CneeName, one address for every Consignee.

(iii) To display consignee details in ascending order of CneeName.

(iv) To display number of consignors from each city,

(v) SELECT DISTINCT City FROM CONSIGNEE;

(vi) SELECT A.CnorName, B.CneeName

FROM Consignor A, Consignee B

WHERE A.CnorID = B.CnorlD AND B.CneeCity = ‘Mumbai’;

(vii) SELECT CneeName, CneeAddress

FROM Consignee

WHERE CneeCity NOT IN (‘Mumbai’, ‘Kolkata’);

(viii) SELECT CneelD, CneeName

FROM Consignee

WHERE CnorID=’MU15′ OR CnorID=’ND01′;91 9 P.T.O.

6. (a) State De Morgan’s Theorems and verify the same using truth table. (2)

(b) Write the equivalent Canonical Product of Sum Expression for the following Sum of Product Expression (2)

F(X, Y, Z) = Σ (0, 2, 4, 5)

(c) Write the equivalent Boolean expression for the following Logic Circuit. (2)

(d) Reduce the following Boolean expression using K-Map : (2)

F(A, B, C, D) = π(5,6,7,8,9,12,13,14,15)

7. (a) What is the significance of Cyber Law? (1)

(b) Expand the following terms with respect to Networking : (2)

(i) XML

(ii) WWW

(iii) WLL

(iv) TCP/IP

(c) Which of the following units measures the speed with which data can be transmitted from one node to another node of a network? Also, give the expansion of the suggested unit. (1)

(i) KMph

(ii) Mbps

(iii) MGps

(d) “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

Head Office Kolkata Office 1291 KM

Head Office Ahmedabad Office 790 KM

Head Office Coimbatore Office 1952 KM91 11 P.T.O.

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 very 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”. (4)

These are questions only. To view and download complete question paper with solution install myCBSEguide App from google play store or login to our student dashboard.

Download myCBSEguide App

Last Year Question Paper Class 12 Computer Science 2007

Download class 12 Computer Science question paper with solution from best CBSE App the myCBSEguide. CBSE class 12 Computer Science question paper 2007 in PDF format with solution will help you to understand the latest question paper pattern and marking scheme of the CBSE board examination. You will get to know the difficulty level of the question paper.

Previous Year Question Paper for class 12 in PDF

CBSE question papers 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005 and so on for all the subjects are available under this download link. Practicing real question paper certainly helps students to get confidence and improve performance in weak areas.

To download CBSE Question Paper class 12 Accountancy, Chemistry, Physics, History, Political Science, Economics, Geography, Computer Science, Home Science, Accountancy, Business Studies and Home Science; do check myCBSEguide app or website. myCBSEguide provides sample papers with solution, test papers for chapter-wise practice, NCERT solutions, NCERT Exemplar solutions, quick revision notes for ready reference, CBSE guess papers and CBSE important question papers. Sample Paper all are made available through the best app for CBSE students and myCBSEguide website.

myCBSEguide App

Test Generator

Create question paper PDF and online tests with your own name & logo in minutes.

Create Now
myCBSEguide App

myCBSEguide

Question Bank, Mock Tests, Exam Papers, NCERT Solutions, Sample Papers, Notes

Install Now

1 thought on “CBSE Question Paper 2007 class 12 Computer Science”

Leave a Comment