Practice Worksheets for Class 12 Computer Science: All Chapters
Access printable practice worksheets for All Chapters designed to align with the 2026-27 academic syllabus for Class 12 Computer Science. These structured exercises help students evaluate their conceptual understanding and improve exam readiness.
Practice All Chapters Worksheets for Class 12 Computer Science
View or download the dedicated All Chapters practice resource below. Engaging with these objective and subjective questions daily ensures continuous academic progress and mastery of the 2026-27 curriculum.
1. a) What is the difference between ios::nocreate and ios::noreplace?
b) Give the two overloaded functions of seekg().
2. Observe the following program segment given below carefully and fill the blanks marked as Statement 1 and Statement 2 using seekg( ) and tellg( ) functions for performing the required task:
#include
class Flight
{
int FNo,
char Fname[20];
public:
// Function1 to count total number of records.
Int CountRec( );
};
int Flight :: CountRec( )
{
Flight Obj;
fstream File;
File.open(“Flight.Dat”, ios::in | ios::binary);
……………………………………………… // Statement 1, to go to end of file
int bytes =……………………………………// Statement 2, to find no. of bytes
int count = bytes / sizeof(Obj);
File.close( );
return count;
}
3. Assuming the class DOLLS declared below, write a function in C++ to read objects of DOLLS from the binary file „DOLL.dat‟ and display those details of DOLLS which are meant for children in the Agerange of “6 to 10”.
Class DOLLS
{
int Dcode;
char Dname[20];
char Agerange[20];
void enter()
{
cin>>Dcode;
gets(Dname);
gets(Agerange);
}
void Display()
{
cout<
}
char* Whatage(){ return Agerange;}
};
4. Write a function in C++ to delete the record of a given membership number(Mno) from a binary file ‘Club.dat’ containing records of the following structure:
struct Member
{
int Mno; //membership number
char Mname[20];
char Type; //Membership type
};
5. Define a) heap b) this pointer
6. Obtain the ouput from the following C++ program as expected to appear on screen after its execution (Assume all required header files are included)
void main()
{
char *Text=”AJANTHA”;
int* P,Num[]={1,5,7,9};
P=Num;
Text++;