12th Computer Science CBSE JAC

JAC 12th Computer Science Questions 2023 Solution

JAC 12th Computer Science vvi important Questions 2023
Written by AIPS

In this , I am going to provide and practice JAC 12th Computer Science vvi important Questions 2023. It will will be very helpful to all those students who are going to appear JAC examination 2023. Lets begin.

COMPUTER SCIENCE XII 2023

Choose the correct alternative for the following:                       2*35=70

  1. C++ is a/an …………Language.

(1) English                                                             (2) High Level Language

(3) Assembly                                                            (4) None of these

2. main ( ) is a/an

(1) Literal                                                                       (2)Function

(3) Identifier                                                                    (4) None of these

3. A set of logical operator is

(1) +,-,*,/,%                                                              (2) &&,||,!

(3) ?  :                                                                (4) None of these

4. void data type represents

(1)   int data                                                                   (2) float data

(3) empty data                                                                (4) None of these

5.In C++, cin, cout, cerr are predefined stream

(1) Operator                                                                         (2) function

(3) Object                                                                        (4) none of these

6.’A’ is an example of

(1) Integer literal                                           (2) String literal

(3) Character literal                                                       (4) bool literal

7.A variable that holds memory address is called

(1) Array                                                                                 (2) Class

(3) Function                                                                             (4) Pointer

8. The prefix increment / decrement operators follow the rule

(1) Change then use                                                                         (2) use then change

(3) save and delete                                                                           (4) None of these

9.The order of the evolution of the expression A / B * C -D + E will be

(1) *,/,+,-                                                                          (2) *,-,*,/

(3) /,*,-,*                                                                           (4) None of these

10. Which of the following concepts means wrapping up of data and function together ?

(1) Inheritance                                                                                 (2) Encapsulation

(3) Construction                                                                                (4) 3

11. Which of the following is not the member of class?

(1) Static function                                         (2) Friend function

(3) Constructor function                                                  (4) None of these

12. Which of the following is not a feature of C++ ?

(1) Polymorphism                                                              (2) Inheritance

(3) Abstraction                                                                  (4) Reflection

13.Object Oriented Programming follows

(1) Top Down approach                                                    (2) Bottom up approach

(3) Left-Right approach                                                     (4) Right –Left approach

14. Wrapping up of data and functions into a single unit is called

(1) Inheritance                                                                   (2) Polymorphism

(3) Encapsulation                                                               (4) None of these

15.Instance of a class is called

(1) File                                                                               (2) object

(3) Keyword                                                                                (4) None of these

16. By default the members of a class are

(1) Public                                                                           (2) Private

(3) Protected                                                                      (4) None of these

17.A class can have the ………………members

(1) Data                                                                             (2) Member functions

(3) Bothe (1) and (2)                                                         (4) None of these

18. The operation of processing each element in the list is known as

(1) Sorting                                                                         (2) Merging

(3) Inserting                                                                       (4) Traversal

19. Beginning address of an array is called

(1) Top address                                                                 (2) Base address

(3) File address                                                                  (4) None of these

20. A line of people waiting for their turn to vote is an example of

(1) Stack                                                                            (2) Queue

(3) Linked list                                                                    (4) None of these

21.Stack follows.

(1) GIGO Technique                                                         (2) FIFO Technique

(3) LIFO Technique                                                          (4) None of these

22.The elements are inserted in a queue from the end called

(1) Top                                                                              (2) middle

(3) Rear                                                                             (4) Front

23. If a class X inherits from class Y, then Y is called ……………………of X.

(1) Super class                                                                         (2) Sub class

(3) Abstract class                                                                       (4) None of these

24.in Public inheritance, a protected data member of the base class will be treated in derived class as

(1) Public                                                              (2) Private

(3) Protected                                                                        (4) none of these

25.A stream is a sequence of

(1) loops                                                          (2) bytes

(3) files                                                         (4) None of these

26. fstream class supports

(1) Input operation                                                             (2) Output operation

(3) Input / Output operation                                               (4) None of these

27.The rows of a relation are known as

(1) Attribute                                                                        (2) Tuple

(3) Columns                                                                              (4) None of these

28.SQL means

(1) Simple Query Language                                               (2) Structure Query Language

(3) Standard Query Language                                             (4) None of these

29.Duplication of data is known as

(1) Default                                                                (2) Delta

(3) Data Redundancy                                                           (4) None of these

30.A Boolean expression that always results in false is called

(1)Fallacy                (2) Tautology                  

(3)Stack                      (4) None of these

31.Distributive law states

(1) X+(Y+Z)=(X+Y)+Z                                            (2) X+Y=Y+X

(3) X+YZ=(X+Y)(X+Z)                                       (4) None of these

32.Minterm designation of A B’CD’

(1) M10                              (2) m10

(3) m5                                 (4) None of these

33.First Network was

(1) ARPA net                                                                        (2) NSF net

(3) Internet                                                                          (4) None of these

34.The pattern of interconnection of nodes in a network is called

(1) Protocol                                                                        (2) Topology

(3) Modulation                                                                         (4) None of these

35.XML means

(1) Exempted Markup Language                                                      

(2) Extensible Module Language

(3) Extensible Markup Language

(4) None of these



COMPUTER SCIENCE XII

 2023

(PRACTICAL)

Full marks-30

Pass marks -10

Time -3 Hours

    GROUP- A

Figures in the margin indicate full marks.        

1.Answer any two of the following questions:                                       5*2=10

a) Write a program in C++ to calculate the sum of the following series.

COMPUTER SCIENCE XII

 2022

(PRACTICAL)

Full marks-30

Pass marks -10

Time -3 Hours

    GROUP- A

Figures in the margin indicate full marks.        

1.Answer any two of the following questions:                                       5*2=10

a) Write a program in C++ to calculate the sum of the following series.

   Sum=12+22+32+…………………..+n2

#include<iostream.h>
#include<conio.h>
void main()  
{
clrscr();
int n,i,s=0;	
cout<<”Enter value of n=”;
cin>>n;
for(i=1;i<=n;i++)
{
cout<<(i*i)<<”\t”;
s=s+(i*i);
}
cout<<”\nsum of series=”<<s;
getch();
}

Output

Enter value of n=5

1 4 9 16 25

sum of series=55

b) Write a program in C++ to display the following pattern.

 1

1 2

1  2  3

1  2  3  4  

1  2  3  4  5

#include<iostream.h>
#include<conio.h>
void main()  
{
clrscr();
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
cout<<j<<” \t”;
}
cout<<”\n”;
}
getch();
}

c)Write a program in C++ to show the concept of single Inheritance.

#include<iostream.h>
#include<conio.h>
class nips
{
public:
int a,b,c;
void input();
void process();
void show();
};
void nips::input()
{
a=10;
b=5;
}
void nips::process()
{
c=a+b;
}
void nips::show()
{
cout<<"Sum="<<c;
}


void main()
{
clrscr();
nips n1;
n1.input();
n1.process();
n1.show();
getch();
}

Output

Sum=15

d) Write a program in C++ to enter any 10 integers in 1 D Array and display the total sum of those digits.

#include<iostream.h>
#include<conio.h>
void swap(int &,int &);
void main()  
{
clrscr();
int a,b;
a=10;
b=20;
cout<<”Before swapping a=”<<a<<”\tb=”<<b;
swap(a,b);
cout<<”\nAfter swapping in main a=”<<a<<”\tb=”<<b;
getch();
}
void swap(int &x,int &y)
{
int z;
z=x;
x=y;
y=z;
cout<<”\n After swapping in function a=”<<x<<”\tb=”<<y;
}

Output

Before swapping a=10 b=20

After swapping in function a= 20 b=10

After swapping in main a=20 b=10

GROUP- B

2. Write SQL commands for  (a) to (e) on the basis of  FAMILY  relation given below:                                                                                1*5=5

 No.NameFemale MembersMale MembersIncome (Rs.)Occupation
1Mishra327,000Service
2Gupta4150,000Business
3Khan638,000Mixed
4Chadda2225,000Business
5Yadav7220,000Mixed
6Joshi3214,000Service
7Maurya635,000Farming
8Rao5210,000Service

a) To select all the information of family whose occupation is service .

SQL> SELECT * From FAMILY where Occupation=’Service’;

b) To list the names of family, where female members are more than 3.

SQL> SELECT Name From FAMILY Where Female Members >3;

c) To list the names of family with income in ascending order.

SQL> SELECT Name From FAMILY ORDER BY Income;

d) To list family’s name, number of male members and their business of business family.

SQL> SELECT COUNT(*) From SPORTS where Game=’Tennis’;

e) To count the number of family, whose income is less than Rs. 10,000.

SQL> SELECT DISTINCT Game From SPORTS’;

GROUP- C

3)Practical File                                                           5

4)Project Work                                                           5

5)Viva-voce                                                              5

JAC 12th Computer Science #2021

COMPUTER SCIENCE XII 2021

Choose the correct alternative for the following:                       2*35=70

  1. C++ is developed by

(1) Dennis Ritchie                                                              (2) Ken Thompson

(3) Martin Richard                                                             (4) B jarne Stroustru

2. The smallest individual unit in a program is called

(1) Token                                                                          (2) Keyword

(3) Operator                                                                       (4) None of these

3. “Reema” is an example of

(1) Integer literal                                                               (2) Character literal

(3) String literal                                                                 (4) None of these

4. Relational operators are

(1) +,-,*,/,%                                                                       (2) &&,||,!

(3) ?  :                                                                                (4) >,<,>=,<=,==,!=

5.Every C++ program must contain a ………………function.

(1) main( )                                                                         (2) strlen( )

(3) getch( )                                                                       (4) none of these

6.Char ,int , float , double and void are

(1) User defined data type                                          (2) Fundamental data type

(3) Derived data type                                                         (4) None of thes

7.x=++y +2y evaluates to (if y=6)

(1) 18                                                                                 (2) 21

(3) 20                                                                                (4) None of these

8. While loop checks condition on

(1) Top                                                                              (2) Bottom

(3) Left                                                                              (4) None of these

9.Jump statement(s) is / are

(1) go to                                                                            (2) continue

(3) break                                                                            (4) All of these

10. In C++, array index always starts from

(1) 0                                                                                  (2) 1

(3) 2                                                                                  (4) 3

11. In C++ programming strcat( ) function is used for

(1) count length of a string                                          (2) Converting string to character

(3) comparing two strings                                                  (4) concatenating two strings

12. Which of the following is not a feature of C++ ?

(1) Polymorphism                                                              (2) Inheritance

(3) Abstraction                                                                  (4) Reflection

13.Object Oriented Programming follows

(1) Top Down approach                                                    (2) Bottom up approach

(3) Left-Right approach                                                     (4) Right –Left approach

14. Wrapping up of data and functions into a single unit is called

(1) Inheritance                                                                   (2) Polymorphism

(3) Encapsulation                                                               (4) None of these

15.Instance of a class is called

(1) File                                                                               (2) object

(3) Keyword                                                                                (4) None of these

16. By default the members of a class are

(1) Public                                                                           (2) Private

(3) Protected                                                                      (4) None of these

17.A class can have the ………………members

(1) Data                                                                             (2) Member functions

(3) Bothe (1) and (2)                                                         (4) None of these

18. The operation of processing each element in the list is known as

(1) Sorting                                                                         (2) Merging

(3) Inserting                                                                       (4) Traversal

19. Beginning address of an array is called

(1) Top address                                                                 (2) Base address

(3) File address                                                                  (4) None of these

20. A line of people waiting for their turn to vote is an example of

(1) Stack                                                                            (2) Queue

(3) Linked list                                                                    (4) None of these

21.Stack follows.

(1) GIGO Technique                                                         (2) FIFO Technique

(3) LIFO Technique                                                          (4) None of these

22.The elements are inserted in a queue from the end called

(1) Top                                                                              (2) middle

(3) Rear                                                                             (4) Front

23. A linked list is a collection of data elements, called

(1) Array                                                                           (2) Pointer

(3) Nodes                                                                          (4) None of these

24.Binary search works on only on

(1) Unsorted array                                                             (2) Sorted array

(3) int array                                                                        (4) none of these

25.ABC* + D – EF/* is a/ an

(1) Infix expression                                                           (2) Prefix expression

(3) Postfix expression                                                        (4) None of these

26. Duplication of data is known as

(1) Delta                                                                            (2) Dque

(3) Data redundancy                                                          (4) None of these

27.A relational data model organizes the data into tables known as

(1) Relation                                                                        (2) Network

(3) File                                                                               (4) None of these

28.A row in a relation is called

(1) Data                                                                             (2) Tuple

(3) Domain                                                                        (4) None of these

29.Which of the following searching algorithms is of divide and conquer type?

(1) Linear Search                                                               (2) Binary search

(3) File searching                                                               (4) None of these

30.DBMS stands for

(1)Database Management system                   (2) Database Manual System                   

(3)Define Management Solution                    (4) None of these

31.The………………….command creates a new table.

(1) CREATE TABLE                                              (2) CREATE VIEW

(3) CREATE EMPLOYEE                                      (4) None of these

32.COUNT( ) is used to

(1) Count total number of rows                               (2) Count total number of columns

(3) Count total number of files                                (4) None of these

33.Network devices (s) is /are

(1) Modem                                                                        (2) Hub

(3) Router                                                                          (4) All of these

34.The pattern of interconnection of nodes in a network is called

(1) Protocol                                                                       (2) Topology

(3) E-mail                                                                          (4) None of these

35.HTTP means

(1) Height type Transfer protocol                                                         

(2) Hyper Text Transfer Protocol

(3) Hyper Text Transfer Power

(4) None of these

JAC 12th Computer Science #2009 Questions

1) . (a) Write the name of the header files on which the following belongs:

(i) abs()                           (ii) setw()

Ans:- #include<math.h> #include<iomanip.h>

(b) Differentiate between datatype and Data Structure.

(c) Find the output:

#include<iostream.h>
void main()
{
int i=5;
for(;i<10;)
cout<<i++<<" "<<endl;
}

       Output:

5

6

7

8

9

(e) Explain the following in brief:

  1. Data abstraction
  2. Encapsulation

(f)Write the output of the following program:

2.(a) Write the output of the following program segment:

(b) Write a program in C++ to check the input number is prime or not.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,i;
cout<<"Enter any number=";
cin>>n;
for(i=2;i<n;i++)
{

if(n%i==0)
break;

}

if(i= = n)
cout<<"Number is prime";
else
cout<<"Number is not prime";

getch();
}

(d) Write a program in C++ to generate Fibonacci series between 1-100.

JAC 12th Computer Science #Test 14/08/2021

1) STACK follows

       i) GIGO Technique                                                      ii) FIFO  Technique   

      iii) LIFO Technique                                                     iv) None of these

2) A set of  conditional/ ternary operator(s) is/are

       i) +,-,*,/,%                                                                    ii) >,<,>=,<=,==,!=             

      iii) &&,||,!                                                                      iv) ?:

JAC 12th Computer Science #Test 13/08/2021

1)………. is a Browser.

          i) C++                                                                         ii) Firefox

          iii) Telnet                                                                    iv) Cookies

2) People standing in a line is an example of

       i) STACK                                                                     ii) QUEUE  

      iii) ARRAY                                                                   iv) Linked list

JAC 12th Computer Science #Test 12/08/2021

1) Main is a/an

       i) Object                                                                      ii) Function

      iii) Literal                                                                       iv) None of these

2) A set of logical operators is

       i) +  –  *  /  %                                                               ii) ? :

      iii) >  <   >=  <=                                                             iv) None of these

JAC 12th Computer Science #Test 11/08/2021

a) C++ is developed by

       i) Dennis Ritchie                                                           ii)Ken Thompson             

      iii) Martin Richard                                                         iv) B jarne Stroustrup

b) String Terminator character is

       i) ‘\0’                                                                            ii) ‘\n’

      iii) ‘\b’                                                                    iv) None of these

c) DBMS stands for

       i) Database Management System                     ii) Database Manual System          

      iii) Define Management Solution                                   iv) None of these

d) The smallest individual unit is

       i) Semicolon                                                                ii) Data type  

      iii) Token                                                                       iv) Keyword

COMPUTER SCIENCE XII

        2021

(PRACTICAL)

Full marks-30

Pass marks -10

Time -3 Hours

    GROUP- A

Figures in the margin indicate full marks.        

1.Answer any two of the following questions:                                       5*2=10

a) Write a program in C++ to display the following pattern.

 1

2  2

3  3  3

4  4  4  4  

5  5  5  5  5

#include<iostream.h>
#include<conio.h>
void main()  
{
clrscr();
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
cout<<i<<” \t”;
}
cout<<”\n”;
}
getch();
}

b) Write a program in C++ to calculate the sum of the following series.

   Sum=12+22+32+…………………..+n2

#include<iostream.h>
#include<conio.h>
void main()  
{
clrscr();
int n,i,s=0;	
cout<<”Enter value of n=”;
cin>>n;
for(i=1;i<=n;i++)
{
cout<<(i*i)<<”\t”;
s=s+(i*i);
}
cout<<”\nsum of series=”<<s;
getch();
}

Output

Enter value of n=5

1 4 9 16 25

sum of series=55

c)Write a program in C++ to show the concept of Encapsulation(class & object).

#include<iostream.h>
#include<conio.h>
class nips
{
public:
int a,b,c;
void input();
void process();
void show();
};
void nips::input()
{
a=10;
b=5;
}
void nips::process()
{
c=a+b;
}
void nips::show()
{
cout<<"Sum="<<c;
}


void main()
{
clrscr();
nips n1;
n1.input();
n1.process();
n1.show();
getch();
}

Output

Sum=15

d) Write a program in C++ to swap the values of two integer variables using call by reference method.

#include<iostream.h>
#include<conio.h>
void swap(int &,int &);
void main()  
{
clrscr();
int a,b;
a=10;
b=20;
cout<<”Before swapping a=”<<a<<”\tb=”<<b;
swap(a,b);
cout<<”\nAfter swapping in main a=”<<a<<”\tb=”<<b;
getch();
}
void swap(int &x,int &y)
{
int z;
z=x;
x=y;
y=z;
cout<<”\n After swapping in function a=”<<x<<”\tb=”<<y;
}

Output

Before swapping a=10 b=20

After swapping in function a= 20 b=10

After swapping in main a=20 b=10

GROUP- B

2. Write SQL commands for  (a) to (e) on the basis of  SPORTS  relation given below:                                                                               1*5=5

 Student      No.ClassNameGameGradeSex
107SamirCricketBM
118SujitTennisAM
127KamalSwimmingBM
137VinaTennisCF
149ArchanaBasketballAF
1510ArpitaCricketAF
169AlokSwimmingCM
178NituTennisAF

a) To display the names of students who have opted the game ‘Cricket’

SQL> SELECT Name From SPORTS where Game=’Cricket’;

b) To display the details of all students in descending order of number of students.

SQL> SELECT * From SPORTS ORDER BY Student_No Desc’;

c) To display the names of female students who got grade ‘A’.

SQL> SELECT Name From SPORTS where Grade=’A’ AND Sex=’F’;

d) To display the number of students having game ‘Tennis’.

SQL> SELECT COUNT(*) From SPORTS where Game=’Tennis’;

e) To display distinct game from ‘Sports’ relation.

SQL> SELECT DISTINCT Game From SPORTS’;

Q. What do you understand by Object Oriented Approach?

Object Oriented Approach is a way of computer Programming that allows modularization of a program by forming separate memory area for Data as well as function.

  • It works with Bottom up approach.
  • Program is divided in to classes and objects.
  • It is suitable for most business applications, Game development projects etc.
  • It allows Reusability of code using Inheritance.
  • It supports other features of OOP like Class, Object, Polymorphism, Encapsulation, Inheritance etc.

Q. Give the output of the following:

#include<iostream.h>
void main()
{
int i;
for(i=1;i<=10;i++)
{
cout<<10<<”x”<<i<<”=”<<i*5<<endl;
}
}

Output

10 X 1=5

10 X 2=10

10 X 3=15

10 X 4=20

……………

……………

10 X 10=50

Q. Given the values of x, y and z, evaluate the following (Answer in true / false)

(x>=y)||(!(z==y)&&(z<x))

  1. x=10, y=5, z=1 (1 True)
  2. x=9, y=10, z=2 (0 False)

Q. Given the following family relation. Write SQL commands for the following.

NONAMEFEMALE MEMBERSMALE MEMBERSINCOMEOCCUPATION  
1MISHRA3210000SERVICES
2GUPTA4125000BUSINESS
3KHAN6315000MIXED
4YADAV7218000MIXED
5JOSHI3214000SERVICES
6MORYA5210000SERVICES

a) To Select all the information of family whose occupation is services.

b) To list the name of family where female are more than 3.

c) To list all the name of family with income in ascending order.

d) To display the family name, male member and occupation of mixed family.

e) To count the number of family whose income is less than 15000.

f) To insert  a new records in the family table with the following data

“amit”, 2, 1, 15000,”Services”

g) Add a new field phno in the table family.

Q. Differentiate between class and object.

A class is a blueprint from which we can create the instance (objects).An object is the instance of the class, which helps to use variables and methods from inside the class.
Class is a group of similar objects.Object is a real world entity such as pen, chair, mobile, laptop etc.
Class does not exist physically, i.e., it exists logically.Object has physical existence.  
Class does not allocate memory spaces when it is created.Object allocates memory when it is created.
Class is declared only once.Objects can be declared several times depending on the need.
class nips
{
private:
…….
public:
…….
protected:
……..
};
class nips
{
private:
…….
public:
…….
protected:
……..
};
void main()
{
nips n1;  // n1 is object
}

Q. How is an Entry controlled loop is different from Exit controlled loop?

Entry control loopExit control loop
Entry control loop checks the condition first then the body of the loop is executed.Exit control loop first executes the body of the loop then checks the condition at last.
The body of the loop may or may not be executed at all.The body of the loop will be executed at least once because condition is checked at last.
for,while are an example of entry control loop.do-while loop is an example of exit control loop.
for(i=1;i<=5;i++)
{
cout<<”\nNIPS ACADEMY”;
}

    i=1;
while(i<=5)
{
cout<<”\nNIPS”;
i++;
}  
i=1;
do
{
cout<<”\nNIPS ACADEMY”;
i++;
}while (i<=5);

Q. Differentiate between DDL and DML.

DDLDML
It stands for Data Definition language which is used to define database structure or schema.It stands for Data Manipulation Language which is used to manipulate data in database.
It basically defines the columns (Attributes) of the table.It adds or updates the row of the table.
It does not use WHERE clause in its statement.DML uses WHERE clause in its statement.
Ex:- CREATE, DROP, RENAME,ALTER etc.Ex:- INSERT, UPDATE, DELETE, SELECT,MERGE etc.
Changes done by DDL command can’t be rolled back.Changes can be rolled back.

Find Output

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
int r;
for(int i=2;i<5;i++)
{
r=pow(i,i);
cout<<"\n"<<i<<"\t"<<r;
}

getch();
}

Database Management System(DBMS)

Cardinality:- the total number of tuples in a relation is called the cardinality of a relation.

Degree:- The total number of attribute in a relation is called  the degree of a relation.

Domain:- A domain is a set of possible values that are designed to each column of a table.

Cardinality:- the total number of tuples in a relation is called the cardinality of a relation.

Degree:- The total number of attribute in a relation is called  the degree of a relation.

Domain:- A domain is a set of possible values that are designed to each column of a table.

12th C++ Revision

Q.Write a program to print your name five times using while loop.

#include<iostream.h>
#include<conio.h>
void main()  
{
clrscr();
int i;	
i=1;
while(i<=5)
{
cout<<”\n NIPS ACADEMY”;
i++;
}
getch();
}

JAC 12th Computer Science #Test 6/10/2020

Q1. Write a program to find 10% discount on input amount if amount is greater than 1000.

JAC 12th Computer Science #Test 5/10/2020

Q1. write a program to find sum of five numbers using constructor.

JAC 12th Computer Science #Test 4/10/2020

Q1. Write a program in C++ to check number is even or odd using conditional operator.

Q2.Write a program in C++ to check number is even or odd using simple if.

Q3.Write a program in C++ to check number is even or odd using if else.

JAC 12th Computer Science #Test 3/10/2020

Q1. Write a program to find simple interest in C++.

Q2. Write a program to find compound interest in C++.

Q3. Write a program to find simple and compound interest in C++.

JAC 12th Computer Science #Test 2/10/2020

Q1. Write a program to find area and perimeter of a Rectangle.

JAC 12th Computer Science #Test 1/10/2020

Q1. Draw a logic circuit diagram for NAND to AND gate.

Q2. Draw a Logic circuit diagram for NAND to OR gate.

JAC 12th Computer Science #Test 30/09/2020

Q1. Define Truth Table?

Q2. Write Identity Law.

JAC 12th Computer Science #Test 29/09/2020

Q1. Define Literals.

Q2. Define Minterm.

Q3. Define Maxterm.

JAC 12th Computer Science #Test 28/09/2020

Q1. How many gates would be required to implement the following Boolean expression after
simplification?
XY+X(X+Z)+Y(X+Z)

JAC 12th Computer Science #Test 27/09/2020

Q1. Obtain a simplified form for the following Boolean Expression
using Karnaugh Map:
F(A,B,C,D)=∑ (0,1,2,4,5,6,8,9,10,12,13,14)

JAC 12th Computer Science #Test 26/09/2020

Q1. State and verify the De Morgan’s law in Boolean algebra using
truth table .

JAC 12th Computer Science #Test 25/09/2020

Q1. Obtain a simplified form for the following Boolean Expression
using Karnaugh Map:
F(A,B,C,D)=∑ (0,1,2,3,4,5,6,7,8,9,10,11)

JAC 12th Computer Science #Test 24/09/2020

Q1. Obtain a simplified form for the following Boolean Expression
using Karnaugh Map:
F(A,B,C,D)=∑ (0,2,5,7,8,1013,15)

JAC 12th Computer Science #Test 19/09/2020

Q1. State and verify the De Morgan’s law in Boolean algebra using
truth table .

JAC 12th Computer Science #Test 18/09/2020

Q1. What is logic gate? Explain fundamental logic gates with circuit diagram and truth table.

JAC 12th Computer Science #Test 17/09/2020

Q1. Write Identity Law.

Q2. Write Inverse(Complementary Law)

JAC 12th Computer Science #Test 16/09/2020

Q1. Prepare a truth table for XY+Y Z’+X ‘Z’

JAC 12th Computer Science #Test 15/09/2020

Q1. Prepare a truth table for XY+Y Z’+X ‘Z’

JAC 12th Computer Science #Test 14/09/2020

Q1. Prepare a truth table for XYZ+Y Z’+X’ Z’

JAC 12th Computer Science #Test 13/09/2020

Q1. Draw the circuit and truth table of X+X’ Y

JAC 12th Computer Science #Test 12/09/2020

Q1. Prepare a truth table for ABC’+BC

JAC 12th Computer Science #Test 11/09/2020

Q1. For a given variable “a=, initialized by 10, what is the difference between statements a++ and ++a? Explain briefly.

Answer:-

if we use a++(as Postfix) then original value of ‘a’ is returned first then, ‘a’ is incremented by 1.

If we use ++a(as Prefix) then the value of ‘a’ is incremented by 1 then, it returns the value.

JAC 12th Computer Science #Test 10/09/2020

Q1. Evaluate the following C++ expression s where a,b,c are integers and d,f are floating point numbers .The values are a=4,b=4 and d=1.5.
a) c=a+++++b*++d

b) f=++ b*b++ – ++a

JAC 12th Computer Science #Test 9/09/2020

Q1. Evaluate the following C++ expression s where a,b,c are integers and d,f are floating
point numbers .The values are a=3,b=5 and d=1.5.
a) c=a++ +b++d

b) f= b*b++ – ++a

JAC 12th Computer Science #Test 8/09/2020

Q1.Evaluate the following C++ expressions where a,b,c are integers and d,f are floating point numbers .The values are a=5,b=6 and d=3.5.

a) c=a++ – (b ++) * (- -d)
b) f=(++b) * b – a++

JAC 12th Computer Science #Test 7/09/2020

Write a program to create a class RESORT in C++ with the following description:
Private Members:
Rno Room no.

Name Customer name
Charges Per day charges
Days no. of days stay
Compute A function to calculate and return amount as
DaysCharges and if the value of DaysCharges is
more than 11000 then as 1.02DaysCharges.
Public Member:
Getinfo ( ) A function to enter the content rno, name, charges
and days.
Dispinfo ( ) A function to display rno, name, charges, days and
amount.
(Amount to be displayed by calling function
compute ( ) )

JAC 12th Computer Science #Test 6/09/2020

Q1. Compare and contrast between Bubble sort and Selection sort.

Ans:- Sorting Algorithms and Programs in C++

JAC 12th Computer Science #Test 5/09/2020

Q1. An electricity board charges according to following rates:
For the First 100 units—— Rs 2 per unit
For the Next 200 units—— Rs 3 per unit

Beyond 300 units—— Rs 4 per unit.
All users are charged meter charge also, which is Rs 50. Write a program in C++ to read the number of units consumed and print out the charges.

JAC 12th Computer Science #Test 4/09/2020

Q1. Obtain postfix notation for the following infix notation manually:

a) A+C-D*B

b) (A+B)*C+D/E-F

JAC 12th Computer Science #Test 3/09/2020

Q1. Evaluate the following postfix expression using a stack and show the contents of stack
after execution of each operation:
120, 45, 20, +, 25, 15,-, +,*

JAC 12th Computer Science #Test 2/09/2020

Q1, What data types would you use to represent the following items?
i) The average marks in a class
ii) The number of students in the class
iii) The registration letter of a car
iv) The population of a city

JAC 12th Computer Science #Test 1/09/2020

Q1. What data types would you use to represent the following items?
i) The number of employees in a Department
ii) The salary of an employee
iii) The identification number of an employee
iv)The registration number of a vehicle

JAC 12th Computer Science #Test 15 /08/2020

Q1.What is array in C++? Explain its types.[JAC 2020]

Q2.Define Single inheritance and explain with suitable example. [JAC2020]

JAC 12th Computer Science #Test 14 /08/2020

Q1.What is Inheritance?

Q2.Define Data type. Explain different types of data type with example

JAC 12th Computer Science #Test 13 /08/2020

Q1.Write the difference between Unary operator and Ternary operator. [JAC 2020]

Q2. ) Give the output of the following:

#include<iostream.h>
 void main( )
{
int  x;
for(x=1;x<=12;x*=2)
cout<<x<<endl;
}

JAC 12th Computer Science #Test 12 /08/2020

Q1. What is Token? What are the names of different types of Token?[JAC 2020]

Q2. Write the difference between Data and Information.[JAC 2020]

JAC 12th Computer Science #Test 11 /08/2020

Q1. Write a program in C++ to find the sum of any five odd numbers.

Q2. Write a program in C++ to find the product of any five numbers using constructor member functions.

JAC 12th Computer Science #Test 10 /08/2020

True and False Questions

  1. Push and Pop term are related to stack data structure. T
  2. Enqueue and Dequeue are terms related to queue data structure. T
  3. The postfix conversion of a infix expression and recursion are internally implemented through stack. T
  4. The circular queue better utilises the space in a fixed size queue. T
  5. Pushing in a full fixed size stack results into an error.T
  6. Popping from an empty stack results into an error. T
  7. Inserting in a full fixed size queue results into an error. T
  8. Deleting from an empty queue results into an error. T
  9. For reversing the order of a list of values , queues are internally used.F
  10. Like circular and double -ended queues , implementation formats of stacks may also be varied. F

JAC 12th Computer Science #Test 09 /08/2020

Q1. Obtain postfix notation for the following infix notation manually:

          a)  A+C-D*B

Answer:

Symbol  StackExpression
A A
++A
C AC+
AC+
D AC+D-
**AC+D-
B AC+D-B*

Postfix= AC+D-B*

Check       AC+D-B*

                  A+C D-B*

                A+C-D B*

                A+C-D*B                

        

  b)  (A+B)*C+D/E-F

Answer

SymbolStackExpression
(( 
A(A
+(+A
B(+A B
) AB+
**AB+
C AB+C*
++AB+C*
D AB+C*D+
//AB+C*D+
E AB+C*D+E/
AB+C*D+E/
F AB+C*D+E/F-

Postfix:  AB+C*D+E/F-

Check:  

AB+C*D+E/F-

A+B C*D+E/F-

A+B*C D+E/F-

A+B*C+D E/F-

A+B*C+D/E F-

A+B*C+D/E-F

Q2. Transform each of the following expressions to prefix and postfix form:

          a)  (A-B*(C+D))/E*F

Answer:

SymbolStackExpression
(( 
A(A
(-A
B(-A   B
*(-*A  B
((-*(A  B
C(-*(A  B  C
+(-*(+A  B  C
D(-*(+A  B  C  D
)(-*(+)A  B  CD+
)(-*)ABCD+*-
//ABCD+*-
E ABCD+*- E/
**ABCD+*- E/
F ABCD+*- E/F*

Postfix: ABCD+*- E/F*

Check

ABCD+*- E/F*

ABC+D*-E/F*

AB*C+D-E/F*

A-B*C+D E/F*

A-B*C+D/E F*

A-B*C+D/E*F

          b)  (A+B)-C*D

Answer:

SymbolStackExpression
(( 
A(A
+(+A
B(+A   B
) AB+
AB+
C AB+ C-
**AB+C-
D AB+C-D*

Postfix:  AB+C-D*

Check

AB+C-D*

A+B C – D *

A+B-C D*

A+B-C*D

Q3. Transform each of the following expressions to infix form:

          a)  + * ABC

          b)  +/AC^D/EFG

Q4.Transform each of the following expressions to infix form:

a)  + – ABC

 b)  +A-BC

c)  +-/AC*D^EFG

Q5. Transform each of the following expressions to infix form:

a)  + – ABC

b)  +A-BC

c)  +-/AC*D^EFG

JAC 12th Computer Science #Test 08 /08/2020

Objective Type Questions:

1.Data structure stack is also known as …………list.

(i) First In First Out

(ii) First In Last Out

(iii) Last In First Out

(iv) All of these

2. Data Structure Queue is also known as ……….list.

(i) First In First Out

(ii) First In Last Out

(iii) Last In First Out

(iv) All of these

3.In a Stack, all insertions take place at……….end(s).

 (i) Top

(ii) Front

(iii) Rear

(iv) Any

4.In a Queue, all insertions take place at……….end(s).

 (i) Front

(ii) Top

(iii) Rear

(iv) Any

5.In a Queue, deletions take place at……….end(s).

 (i) Front

(ii) Top

(iii) Rear

(iv) Any

6.In a Stack, deletions take place at……….end.

 (i) Front

(ii) Top

(iii) Rear

(iv) Any

7.The term Push and Pop are related to

(i)Queue

(ii)Stack

(iii)Both

(iv)None

8.Choose correct output for the following sequence of operations(* signifies top)

Pust(5),Pust(8),Pop,Pust(2),Pust(5),Pop,Pust(1),

(i)8 5 2 5 1

(ii)8 5 52 1

(iii)2 5 51

(iv)5 2 1

9.In which data structure element is inserted at one end called Rear and deleted at other end called Front.

(i)Stack

(ii)Queue

(iii)Both

(iv)Tree

10.Insertion and Deletion operations in queue are known as ……………

(i)Push and Pop

(ii)Enqueue and Dequeue

(iii)Insert and Delete

(iv)None

11.…………Form the access is used to add and remove nodes from a queue.

(i)LIFO, Last In First Out

(ii)FIFO, First In First Out

(iii)Both (a) and (b)

(iv)None of these

12.…………form of access is used to add/remove nodes from a stack.

(i)LIFO

(ii)FIFO

(iii)Both (a) and (b)

(iv)None of these

13.Stack follows the strategy of ………………

(i)LIFO

(ii)FIFO

(iii)LRU

(iv)Random

14.Which of the following is an application of stack?

(i)Finding Factorial

(ii)Reversing of a a string

(iii) Infix to Postfix

(iv)All of the above

15.When a stack, implemented as an array/list of fixed size, is full and no new element can be accommodated, it is called an…………….

(i)OVERFLOW

(ii)UNDERFLOW

(iii) EXTRANFLOW

(iv)NOFLOW

16.When a stack is empty and an element’s deletion is tried from the stack , it is called an…………….

(i)OVERFLOW

(ii)UNDERFLOW

(iii) EXTRANFLOW

(iv)NOFLOW

17.If a user tries to remove an element from empty queue, it is called an…………….

(i)Underflow

(ii)Empty collection

(iii)Overflow

(iv)Garbage Collection

18.Pushing an element into stack already having five elements and stack has fixed size of 5 , then …………….occurs.

(i)Overflow

(ii)Cash

(iii)Underflow

(iv)User flow

19.What is the term for inserting into a full queue known as ?

(i)Overflow

(ii)Cash

(iii)null pointer exception

(iv)program won’t be compiled

20.A queue in which elements get added in empty area in the front of a queue is called…………..

(i)Full queue

(ii)Circular queue

(iii)rounded queue

(iv)rotated queue

JAC 12th Computer Science #Test 07 /08/2020

Q1. Evaluate the following postfix expression using a stack and show the contents of  stack after execution  of each operation:

          300, 10, 30, +, 20, *, +

Answer:

Sl. NoStackOutput
1300300
210300,10
330300,10,30
4+300,40
520300,40,20
6*300,800
7+1100

Output= 1100

Q2. Evaluate the following postfix expression using a stack and show the contents of  stack after execution  of each operation:

          500, 20, 30, 10, *, +

Q3. Evaluate the following postfix expression using a stack and show the contents of  stack after execution  of each operation:

          120, 45, 20, +, 25, 15,-, +,*

Answer:

Sl. NoStackOutput
1120120
245120,45
320120,45,20
4+120,65
525120,65,25
615120,65,25,15
7120,65,10
8+120,75
9*9000

Output= 9000

Q4. Evaluate the following postfix operation:AB + C * D /       if    A=2,B=3,C=4 & D=5 using stack

Answer:

                A B + C * D /

Given      2,3,+,4,*,5,/

Sl. NoStackOutput
122
232,3
3+5
445,4
5*20
6520,5
7/4

   Output=4

Q5. Evaluate the following postfix expression using a stack and show the contents of  stack after execution  of each operation:

          120, 45, 20, +, 25, 15,-, +,*

Answer:

Sl. NoStackOutput
1120120
245120,45
320120,45,20
4+120,65
525120,65,25
615120,65,25,15
7120,65,10
8+120,75
9*9000

Output= 9000

What is the Difference Between Stack and Queue
StackQueue
1. It is a collection of elements that follows Last In First Out (LIFO) order.1.  It is a collection of elements that follows First In First Out (FIFO) order.
2. In Stack insertion and deletion is performed from same End called ‘Top’.2. In Queue insertion and deletion is performed from different end called ‘Rear’ and ‘Front’.
3. Top is incremented by one when the new element is inserted and this term is known as PUSH.3.  Rear is incremented by one when the new element is inserted and this term is known as Enqueue.
4. Top is Decremented by one when an element is deleted and this term is known as POP.4.  Front is incremented by one when an element is deleted and this term is known as Dequeue.
5. A collection of dinner plates at a wedding Party is an example of stack.5.People standing for boarding a bus is an example of Queue.
 Diagram…. 

12th Computer Science Important Program

C++ Programming

C++ Programming Language Tutorial

Translators in Programming languages

Tokens in C++ Programming Language

Operators in C++ Programming Language

Conditional statements in C++ Language

Switch Statement in C++ Language

Loops / Iteration statement in C++ Language

Jump statements in C++ with best example

Arrays in C++ Programming Language

Functions in C++ Programming Language

Passing Arguments in Functions

Method / Function overloading in C++

String Functions in C++ with Example

Character Handling Functions in C++ with Example

How to create own Header File in C++ with example

Console Input Output in C++ with Example

Class and Object in C++ Programming Best concept

Concept of Object Oriented Programming in C++

C++ Development Environment Setup with VS Code

Constructor and Destructor in C++ with Example

Inheritance in C++ with Example Program

Friend Function and Friend Class in C++ with example

Data Structure

Data Structure class 12th Computer Science Best Concept

Stack Data structure in C++(Introduction, Algorithm, Program)

Queue Data structure in C++ Best example

Boolean Algebra

Introduction to Boolean Algebra- Best concepts

Important Law of Boolean algebra with Best concepts

Logic Gates and their types -Best Concept

De Morgan’s Law and their Applications

Applications of Boolean Algebra in Computer Science

DBMS

Introduction to DBMS | Database Management System

Communication and Network Concept

Introduction to Communication and Networks

11th Computer Science

C++ Basic Program for 11th Computer Science

To be continued… Please check daily for more updates..

About the author

AIPS

Leave a Comment