CBSE Class 12 Computer Science Header Files Worksheet

Access the latest CBSE Class 12 Computer Science Header Files Worksheet. We have provided free printable Class 12 Computer Science worksheets in PDF format, specifically designed for Header Files. These practice sets are prepared by expert teachers following the 2025-26 syllabus and exam patterns issued by CBSE, NCERT, and KVS.

Header Files Computer Science Practice Worksheet for Class 12

Students should use these Class 12 Computer Science chapter-wise worksheets for daily practice to improve their conceptual understanding. This detailed test papers include important questions and solutions for Header Files, to help you prepare for school tests and final examination. Regular practice of these Class 12 Computer Science questions will help improve your problem-solving speed and exam accuracy for the 2026 session.

Download Class 12 Computer Science Header Files Worksheet PDF

Header files, Find & Coorect errors, Outputs, Function Overloading ,Classes & Object
 
1. What do you understand by Polymorphism? Give a suitable example of the same.How matching is done in function overloading.
 
2. Using the concept of function overloading provide the appropriate prototype and coding for the following assumptions.
Print(50,’*’) – to display the character * 50 times
Print(void) – to display the character % 25 times
Print(’#’) – to display the character # 30 times
Print(10) – to display the character $ 10 times
 
3. Apply the Function overloading concept and provide the coding for the following assumptions.
Count(char[],char ) – to count and display the number of occurrences of a character in the character array.
Count(char[]) – to count & display the number of occurrences of the character ‘a’ in the character array.
Count(long) – to count the number of digits in the long variable.
 
4. Define the following : Data Encapsulation, Data Hiding, Class, Object, Data Abstraction (support with example)
 
5. Differentiate between public and private visibility modes in context of Object Oriented Programming using a suitable example illustrating each.
 
6. How are data abstraction and data encapsulation inter-related?
 
7. Find Header Files For The Following
 
(a) Write the names of the header files to which the following belong:
(i) setw() (ii) sqrt() (iii) toupper() (iv) frexp() (v) isalnum() (vi) pow() (vii)clrscr()
 
(b)Name the header files that shall be needed for the following code.
void main()
{ char str*+=” air force schools “;
cout<
}
8. Identify and correct the errors in the following :
(a ) #include [iostream.h]
class PAYITNOW
{
int Charge;
PUBLIC:
void Raise(){cin>>Charge;}
void Show{cout<
};
void main()
{
PAYITNOW P;
P.Raise();
Show();
}
(b ) #include
class MEMBER
{
int Mno;
float fees=0;
PUBLIC:
void Register(){cin>>Mno>>fees;}
void Display();
}
Class MEMBER::Display()
{cout<
};
9. (a) Give the output of the following program
#include
int a=3;
void demo(int x,int y,int &z)
{ a+= x+y ;
z= a+y;
y+=x;
cout<
}
void main()
{
int a=2, b=5;
demo(::a,a,b);
cout<<::a<
demo(::a,a,b); }
(b)Find the output of the following program
# include
struct play
{
int score, bonus;
};
void calculate ( play &p, int n=10)
{
p.score ++ ;
p.bonus +=n;
}
void main()
{
play pl={10,15};
calculate (pl,5);
cout<
calculate(pl);
cout<
calculate(pl,15);
cout<
 
10. 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
<=1000                                  500
more than 1000 and <=2000    1100
more than 2000                       2200
Public Members :
A function FEEDINFO() to allow user to enter values for Flight Number, Destination,Distance & call the function CALFUEL() to calculate the quantity of Fuel
A function SHOWINFO() to allow user to view the content of all the data members
 
11. Define a class batsman with the following specifications:
 
Private members:
bcode 4 digits, bname 20 characters, innings, notout, runs all of them integer type.
batavg, it is calculated according to the formula batavg =runs/(innings-notout)
calcavg() Function to compute batavg
Public members:
readdata() Function to accept value from bcode, name, innings, notout and invoke the function calcavg()
displaydata() Function to display all the data members on the screen.
 
12. 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 and Price of type float
A function CalcPrice() 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 15%.
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 of Clothing.


Please click on below link to download CBSE Class 12 Computer Science Header Files Worksheet

Header Files CBSE Class 12 Computer Science Worksheet

Students can use the Header Files practice sheet provided above to prepare for their upcoming school tests. This solved questions and answers follow the latest CBSE syllabus for Class 12 Computer Science. You can easily download the PDF format and solve these questions every day to improve your marks. Our expert teachers have made these from the most important topics that are always asked in your exams to help you get more marks in exams.

NCERT Based Questions and Solutions for Header Files

Our expert team has used the official NCERT book for Class 12 Computer Science to create this practice material for students. After solving the questions our teachers have also suggested to study the NCERT solutions  which will help you to understand the best way to solve problems in Computer Science. You can get all this study material for free on studiestoday.com.

Extra Practice for Computer Science

To get the best results in Class 12, students should try the Computer Science MCQ Test for this chapter. We have also provided printable assignments for Class 12 Computer Science on our website. Regular practice will help you feel more confident and get higher marks in CBSE examinations.

Where can I download the latest PDF for CBSE Class 12 Computer Science Header Files Worksheet?

You can download the teacher-verified PDF for CBSE Class 12 Computer Science Header Files Worksheet from StudiesToday.com. These practice sheets for Class 12 Computer Science are designed as per the latest CBSE academic session.

Are these Computer Science Class 12 worksheets based on the 2026 competency-based pattern?

Yes, our CBSE Class 12 Computer Science Header Files Worksheet includes a variety of questions like Case-based studies, Assertion-Reasoning, and MCQs as per the 50% competency-based weightage in the latest curriculum for Class 12.

Do you provide solved answers for CBSE Class 12 Computer Science Header Files Worksheet?

Yes, we have provided detailed solutions for CBSE Class 12 Computer Science Header Files Worksheet to help Class 12 and follow the official CBSE marking scheme.

How does solving CBSE Class 12 Computer Science Header Files Worksheet help in exam preparation?

Daily practice with these Computer Science worksheets helps in identifying understanding gaps. It also improves question solving speed and ensures that Class 12 students get more marks in CBSE exams.

Is there any charge for the Class 12 Computer Science practice test papers?

All our Class 12 Computer Science practice test papers and worksheets are available for free download in mobile-friendly PDF format. You can access CBSE Class 12 Computer Science Header Files Worksheet without any registration.