Read and download free pdf of CBSE Class 12 Computer Science Revision Worksheet Set B. Students and teachers of Class 12 Computer Science can get free printable Worksheets for Class 12 Computer Science All Chapters in PDF format prepared as per the latest syllabus and examination pattern in your schools. Class 12 students should practice questions and answers given here for Computer Science in Class 12 which will help them to improve your knowledge of all important chapters and its topics. Students should also download free pdf of Class 12 Computer Science Worksheets prepared by teachers as per the latest Computer Science books and syllabus issued this academic year and solve important problems with solutions on daily basis to get more score in school exams and tests
Worksheet for Class 12 Computer Science All Chapters
Class 12 Computer Science students should refer to the following printable worksheet in Pdf for All Chapters in Class 12. This test paper with questions and answers for Class 12 will be very useful for exams and help you to score good marks
Class 12 Computer Science Worksheet for All Chapters
Q1. Write the output of the following program:
#include<iostream.h>
int Execute (int M)
{
if(M%3==0)
return M=3;
else
return M+10;
}
void Output (int B=2)
{
for(int T=0;T<B;T++)
cout<<Execute(T)<<”*”;
cout<<endl;
}
void main()
{
Output(4);
Output();
Output(3);
}
Q2. Write an interactive program in C++ to read the values of three coefficients of quadratic equation (Ax2 + Bx + C=0). Find the roots of the equation and display them on your screen (including complex roots) specifying the nature of roots.
Q1. Differentiate between CALL by reference and CALL by value.
Q2. When will you make a function inline and why?
Q3. Differentiate between a run‐time error and syntax error. Give one example of each.
Q4. What is the difference between global variables and local variables?
Give an example to illustrate the same.
Q5. What would be output by the following segment of C++?
int fact, i;
fact=1;
i=2;
while (i<=6)
fact*=i;
i++;
cout<<fact;
Q6. What output will be produced by following codes?
(a) int i;
i=‐12;
do
{
cout<<i<<endl;
i=i‐1;
}
while(i>0);
(b)int i;
i=‐12;
do
{
cout<<i<<endl;
i=i‐1;
}
while(i<0);
Q7. How is an entry controlled loop different from exit controlled loop?
Q8. What is the similarity and difference between break and continue statements?
Q10. What is the difference between global variables and local variables? Give an example to illustrate the same.
Q1. Distinguish between an object and a class.
Q2. Differentiate between Data hiding and Encapsulation.
Q3. What is base class? What is a derived class? How are these two interrelated.
Q4. Define the following terms: (i) Inheritance (ii) Encapsulation.
Q5. What is polymorphism?
Q6. What is a reference variable? What is its use?
Q7. How is an entry controlled loop different from exit controlled loop?
Q8. What is the similarity and difference between break and continue statements?
Q9. What is an inline function?
Q10. What do you mean by function prototyping? Write down the advantages of function prototypes in C++.
1. a) Answer the questions (i) and (ii) after going through the following class:
class serial
{
int serialcode;
char title[20];
float duration;
int no_of_episode;
public:
serial() //function 1
{ duration = 30;
no_of_episode = 10;
}
serial(int d, int noe) //function 2
{ duration = d;
no_of_episode = noe;
}
serial( &s1) // function3
{ }
~serial() // function 4
{
cout<<”Destroying Object”<<endl;
}
};
i. Complete definition of function 3
ii. Give example how function1 and function 2 get executed when object is created.
iii. Write an explicit call to function 2
b) Define a class Bank to represent the bank account of a customer with the following
specification
Private Members:
- Name of type character array(string)
- Account_no of type long
- Type_of_account ( S for Saving Account, C for current Account) of type char
- Balance of type float
Public Members:
A constructor to initialize data members as follows
- Name NULL
- Account_no 100001
- Type_of_account ‘S’
- Balance 1000
A function NewAccount() to input the values of the data members Name,
Account_no, Type_of_account and Balance with following two conditions
• Minimum Balance for Current account is Rs.3000
• Minimum Balance for Saving account is Rs.1000
A function Deposit() to deposit money and update the Balance amount.
A function Withdrawal() to withdraw money. Money can be withdrawn if minimum
balance is as >=1000 for Saving account and >=3000 for Current account.
A function Display() which displays the contents of all the data members for a account.
c) Answer the questions (i) to (iv) based on the following code :
class PUBLISHER
{
char pub[12];
double turnover;
protected:
void register( );
public:
PUBLISHER( );
void enter( );
void display( );
};
class BRANCH
{
char city[20];
protected:
float employees;
public:
BRANCH( );
void haveit( );
void giveit( );
};
class AUTHOR: public BRANCH, private PUBLISHER
{
int acode;
char aname[20];
float amount;
public:
AUTHOR( );
void start( );
void show( );
};
i) Write the names of data members, which are accessible from objects belonging to class
AUTHOR.
ii) Write the names of all the member functions which are accessible from objects belonging
to class BRANCH.
iii) Write the names of all the members which are accessible from member functions of class
AUTHOR.
iv) How many bytes will be required by an object belonging to class AUTHOR?
2. Identify the errors with reasonin the following code fragmen . 5
class X {
int x;
static int ctr;
public:
X( ){x=0;}
X( int i ) { x = i ; }
void init ( void )
{ c=ctr=0; }
inline static void prn ( void )
{
prn( );
cout<<ctr<<x;
}
~X(int a ){}
}; void main( ){ X X, x1,x2; X.init( );};
3. Write the output of the following:
#include<iostream.h>
class item{
static int I ;
int no;
public :
item( )
{
cout<< “DC”<< “ ”;
}
item ( item & x)
{
cout<< “CC”<<” “;
}
void getdata( int aa )
{
no =aa ;
I ++ ;
}
void putdata()
{
cout <<“\n”<< I<<“\n”;
}
~Item()
{
cout<<”Des”<<I-- ;
}
};
int item::I ;
void main( )
{
item a;
item b=a ;
item c;
c=a;
a.getdata(100);
b.getdata(200);
a.getdata(300);
a.putdata();
b.putdata();
c.putdata();
}
4. Observe the following program carefully & choose the correct possible output (if any) from
the options (i) to (iv) 2
# include <iostream.h>
# include <conio.h>
# include <stdlib.h>
void main ()
{
char serial[] = {'E', 'X', 'A', 'M'};
int number[] = { 69, 66, 67, 68};
clrscr();
randomize();
cout << number[random(3)];
for (int i = 0; i < 4; i++)
cout << serial[sizeof(int) + random(2) - 1 ];
getch();
}
outputs:
(i) 67AXXA
(ii) 67AAAM
(iii) 67XXAX
(iv) 69AXXA
1. What is “? “ Operator? Explain with example?
2. What is use of comma operator?
3. What is selection statement in C? Explain.
4. What do you mean by loop? Explain various type of loop statement in C.
5. Write a program in C to find sum of first 10 natural numbers.
6. Write a program in C to check number is odd or even.
7. Write a program in C to find greater number between two numbers, where numbers are entered by user.
8. Write a program in C to find cube of a number where number is entered by user.
9. Write a program in C to print table a number, where numbers is entered by user.
10. Write a program in C to find total marks, percentage and grade of a student on the
Worksheet for CBSE Computer Science Class 12 All Chapters
We hope students liked the above worksheet for All Chapters designed as per the latest syllabus for Class 12 Computer Science released by CBSE. Students of Class 12 should download in Pdf format and practice the questions and solutions given in the above worksheet for Class 12 Computer Science on a daily basis. All the latest worksheets with answers have been developed for Computer Science by referring to the most important and regularly asked topics that the students should learn and practice to get better scores in their class tests and examinations. Expert teachers of studiestoday have referred to the NCERT book for Class 12 Computer Science to develop the Computer Science Class 12 worksheet. After solving the questions given in the worksheet which have been developed as per the latest course books also refer to the NCERT solutions for Class 12 Computer Science designed by our teachers. We have also provided a lot of MCQ questions for Class 12 Computer Science in the worksheet so that you can solve questions relating to all topics given in each chapter.
You can download the CBSE Printable worksheets for Class 12 Computer Science All Chapters for latest session from StudiesToday.com
There is no charge for the Printable worksheets for Class 12 CBSE Computer Science All Chapters you can download everything free
Yes, studiestoday.com provides all latest NCERT All Chapters Class 12 Computer Science test sheets with answers based on the latest books for the current academic session
CBSE Class 12 Computer Science All Chapters worksheets cover all topics as per the latest syllabus for current academic year.
Regular practice with Class 12 Computer Science worksheets can help you understand all concepts better, you can identify weak areas, and improve your speed and accuracy.