Chapter 8: Communication Open Source Concept | class 12th | mcqs of computer science

class 12th – Open Source Initiative computer science

1. A guideline for the OSS licenses other than the GPL.
a) OSI
b) OSD
c) OSE
d) OSL
View Answer

Answer: b
Explanation: OSS is the open source software. In 1997, OSI or the open source initiative was founded and it developed the OSD (Open Source Definition). OSD is a guideline for OSS licenses other than the GPL.

2. GPL of GNU says that every copy of a program governed by GPL license, even if modified, must be subject to GPL again.
a) True
b) False
View Answer

Answer: a
Explanation: The statement is true. GPL is the general public license. In the 90s, GPL+Internet, many new open source projects started.

3. Richard Stallman from MIT, established a special license, the ________ license.
a) GNU
b) Free
c) Package
d) Commercial
View Answer

Answer: a
Explanation: It was called the GNU license. It ensured that software is free and open to anyone. He was from MIT and his main motive was to develop a free alternative to Unix.

4. In 1969 AT&T laboratories developed ______ which supported and worked on different hardware platforms.
a) Linux
b) Unix
c) Windows
d) Ubuntu
View Answer

Answer: b
Explanation: Unix was found in that year. It worked well on different hardware platforms. Commercial users had to pay a license fee.

5. OSS stands for ___________
a) Open System Service
b) Open Source Software
c) Open System Software
d) Open Synchronized Software
View Answer

Answer: b
Explanation: OSS stands for open source software. OSS allows any user to download, view, modify and redistribute the software. Also, the user can fix bugs according to needs.

6. Public domain software is usually __________
a) System supported
b) Source supported
c) Community supported
d) Programmer supported
View Answer

Answer: c
Explanation: The public domain software is generally community supported. It is community supported as an author does not support users directly.

7. Set of a program which consists of full documentation.
a) Software Package
b) System Software
c) Utility Software
d) File package
View Answer

Answer: a
Explanation: It is called a software package. Software is nothing but a collection of programs. A software package can solve a specific problem or perform a specific type of job.

8. Interpreter is used as a translator for?
a) Low level language
b) High Level Language
c) COBOL
d) C
View Answer

Answer: b
Explanation: It is generally used to make the code into a machine understandable format. Interpreter is used with the high level languages similarly. Assembler is used in case of low level languages.

9. What do you call a specific instruction designed to do a task?
a) Command
b) Process
c) Task
d) Instruction
View Answer

Answer: a
Explanation: A program is a set of instructions. A command is given to do a specific job. A program in execution is called a process.

10. They normally interact with the system via user interface provided by the application software.
a) Programmers
b) Developers
c) Users
d) Testers
View Answer

Answer: c
Explanation: Users interact with the system via user interface that is given by the application software. Application software is a set of instructions designed to serve a particular purpose.

Read More

Chapter 7: Boolean Algebra | class 12th | mcqs of computer science

1. Boolean Algebra can be used to

  • Simplify any algebraic expressions
  • Minimize the number of switches in a circuits
  • Solve the mathematical problem
  • Perform arithmetic calculation

A. Simplify any algebraic expressions

2. An inverter gates can be developed using

  • Two diodes
  • A resistance and capacitance
  • A transistor
  • An inductance and capacitance

C. A transistor

3. if an input A is given to an inverter,the output will be

  • 1/A
  • 1
  • A
  • ‾A

D. ‾A

4. The output of two input OR gate is high

  • . Only if both inputs are high
  • Only if both inputs are low
  • Only if one input is high and the other is low
  • If at least one of the inputs is low

D. If at least one of the inputs is low

5. the output of a two input AND gate is high

  • only if both the inputs are high
  • only if both the inputs are low
  • only if one inputs is high and other is low
  • if atleast one of the input is low

A. only if both the inputs are high

6. NAND gate means

  • inversion followed by And Gates
  • AND gates followed by an inverter
  • AND gate followed by an or gate
  • None of these

B. AND gates followed by an inverter

7. The out put of two input NAND gate is high

  • .only if both the inputs are high
  • only if both the inputs are low
  • only if one input is high and other input is low
  • if atleast one the inputs is low

D. if atleast one the inputs is low

8. A NOT gate means

  • Inversion followed by an OR gate
  • OR gate followed by an an inverter
  • Not gate followed by an OR gate
  • NAND gate followed by an OR gate

B. OR gate followed by an an inverter

9. The output of two input NOR gate is high

  • Only if both the inputs are high
  • only if both the inputs are low
  • only if one of the input is high and the other is low
  • if atleast one the inputs is high

B. only if both the inputs are low

10. A Digital word has even parity

  • if it has even number of 1s
  • if it has even number of 0 s
  • if the decimal value of word is even
  • None of these

A. if it has even number of 1s

11. An XOR gate gives a high output

  • if there are odd number of 1s in the input
  • if these are even number of 1 s in the input
  • .if there are odd number of 0s in the input
  • if there are even numbers of 1 s in the input

A. if there are odd number of 1s in the input

12. An exclusive NOR gate is logically equal to

  • inverter followed by an XOR gate
  • NOT gate followed by an exclusive XOR gate
  • Exclusive OR gate followed by an inverter
  • Complement of a NOR gate

C. Exclusive OR gate followed by an inverter

13. De Morgan’s theorem states that

  • ¯(A+B) = ¯A.¯B AND ¯(A.B) = ¯A.¯B
  • ¯(A+B) = ¯A+¯B AND ¯(A.B) = ¯( A).¯B
  • ¯( A+B)=¯( A).¯B AND ¯(A.B) = ¯A+¯B
  • ¯( A+B) = ¯A+¯B AND ¯(A.B)= ¯A+¯B

C. ¯( A+B)=¯( A).¯B AND ¯(A.B) = ¯A+¯B

14. The logic expression AB+ (A.B) can be implemented by given inputs  And B to two input

  • NOR gate
  • Exclusive NOR gate
  • Exclusive OR gate
  • NAND gate

C. Exclusive OR gate

15. The logic expression AB+ ¯(A.B) can be implemented by given inputs A And B to two input

  • NOR Gate
  • Exclusive NOR gate
  • Exclusive OR gate
  • NAND Gate

B. Exclusive NOR gate

16. The gate ideally suited for bit comparison is a

  • Two input exclusive NOR gate
  • Two input exclusive OR gate
  • Two input NAND date
  • Two input NOR gate

A. Two input exclusive NOR gate

17. Two input Exclusive NOR gate gives high output

  • when one input is high and the other is low
  • only when the both the inputs are low
  • when the both the inputs are same
  • only when both the inputs are high

C. when the both the inputs are same

Read More

Chapter 6: Database & SQL | class 12th | mcqs of computer science

SQL MCQ Class 12

  1. Which of the following is not an SQL command?
    a. Create Database
    b. Create Table
    c. Create Query
    d. Show Table

Show Answer

c. Create Query

  1. A table can have __ foreign keys
    a. 1
    b. 2
    c. Many
    d. Depends on RDBMS

Show Answer

c. Many

  1. In which of the following case DML is not executed?
    a. When new record is added
    b. When existing record is modified
    c. When existing attribute is modified
    d. When records are deleted

Show Answer

c. When existing attribute is modified

  1. Which is the correct difference between Primary key and Foreign key?
    a. A table can have multiple primary key and single foreign key
    b. A primary key cannot ignore NULL value but Foreign key can
    c. A Primary key can have duplicate data but foreign key does not
    d. None of the above

Show Answer

b. A primary key cannot ignore NULL value but Foreign key can

  1. in SQL ‘FROM’ clause is used to
    a. Define source table name while retrieving records
    b. Define Column name while retrieving records
    c. Define Criteria while retrieving records
    d. Define values while inserting records

Show Answer

a. Define source table name while retrieving records

  1. Which if the following is not an SQL aggregate function?
    a. Avg
    b. Max
    c. Count
    d. All are aggregate function

Show Answer

d. All are aggregate function

  1. SQL stands for
    a. Structured Question Language
    b. Structured Query Language
    c. Super Query Language
    d. System Query Language

Show Answer

b. Structured Query Language

  1. Which of the following is not true about DDL ?
    a. The retrieval of information stored in database
    b. The creation of schema object in database
    c. The deletion of schema object
    d. All are not True

Show Answer

a. The retrieval of information stored in database

  1. DELETE FROM Book where Price <= 2000;
    is a _________type of statement
    a. DDL
    b. DML
    c. DCL
    d. None

Show Answer

b. DML

  1. A table can not have more than one UNIQUE keys.
    a. True
    b. False
    c. Depends upon Primary key
    d. Depends upon RDBMS

Show Answer

b. False

  1. For given table ‘emp’ with following columns
    eno, ename, sal, dept, designation
    Select correct statement to display all records of ‘emp’ in descending order of ename and within ascending order of dept.

    a. SELECT * FROM emp ORDER BY ename, dept DESC;
    b. SELECT * FROM emp ORDER BY ename, ORDER BY dept DESC;
    c. SELECT * FROM emp ORDER BY ename DESC, dept;
    d. SELECT * FROM emp WHERE ORDER BY ename, dept DESC;

Show Answer

c. SELECT * FROM emp ORDER BY ename DESC, dept;

  1. Which of the following is not an SQL Constraint?
    a. IS NULL
    b. Primary Key
    c. Default
    d. Check

Show Answer

a. IS NULL

  1. Select correct SQL statement to increase price of books by 10% in book table.
    a. UPDATE book SET price = price0.1;
    b. UPDATE book SET price = price + price0.1;
    c. UPDATE book WHERE price = price0.1;
    d. UPDATE book WHERE price = price + price0.1;

Show Answer

b. UPDATE book SET price = price + price0.1;

Database Management System MCQ (Multiple Choice Questions)

1. What is the full form of DBMS?
a) Data of Binary Management System
b) Database Management System
c) Database Management Service
d) Data Backup Management System
View Answer

Answer: b
Explanation: DBMS is abbreviated as Database Management System. Database Management System stores the data and allows authorized users to manipulate and modify the data.

2. What is a database?
a) Organized collection of information that cannot be accessed, updated, and managed
b) Collection of data or information without organizing
c) Organized collection of data or information that can be accessed, updated, and managed
d) Organized collection of data that cannot be updated
View Answer

Answer: c
Explanation: It is defined as an organized collection of data or information for easy access, updating, and management in a computer.

3. What is DBMS?
a) DBMS is a collection of queries
b) DBMS is a high-level language
c) DBMS is a programming language
d) DBMS stores, modifies and retrieves data
View Answer

Answer: d
Explanation: DBMS is nothing but a storehouse wherein the authorized user can create a database to store, modify or retrieve the organized data in the table. It can be modified or retrieved by users who have access to DBMS only.

4. Who created the first DBMS?
a) Edgar Frank Codd
b) Charles Bachman
c) Charles Babbage
d) Sharon B. Codd
View Answer

Answer: b
Explanation: Charles Bachman along with his team invented the first DBMS known as Integrated Data Store (IDS).

5. Which type of data can be stored in the database?
a) Image oriented data
b) Text, files containing data
c) Data in the form of audio or video
d) All of the above
View Answer

Answer: d
Explanation: The reason for creating the database management system was to store large data and these data can be of any form image, text, audio, or video files, etc. DBMS allows the users to store and access the data of any format.

advertisement

6. In which of the following formats data is stored in the database management system?
a) Image
b) Text
c) Table
d) Graph
View Answer

Answer: c
Explanation: The data is stored in a table format intended to manage the storage of data and manipulate stored data to generate information.

7. Which of the following is not a type of database?
a) Hierarchical
b) Network
c) Distributed
d) Decentralized
View Answer

Answer: d
Explanation: Different types are:
1) Centralized
2) Distributed
3) Relational
4) NoSQL
5) Cloud
6) Object-oriented
7) Hierarchical
8) Network

8. Which of the following is not an example of DBMS?
a) MySQL
b) Microsoft Acess
c) IBM DB2
d) Google
View Answer

Answer: d
Explanation: MySQL, Microsoft Access, IBM DB2 are database management systems while Google is a search engine. MySQL is a Linux-based database management system, Microsoft Access is a tool that is a part of Microsoft Office used to store data, IBM DB2 is a database management system developed by IBM. Google’s Bigtable is the database that runs Google’s Internet search, Google Maps, YouTube, Gmail, and other products.

9. Which of the following is a feature of DBMS?
a) Minimum Duplication and Redundancy of Data
b) High Level of Security
c) Single-user Access only
d) Support ACID Property
View Answer

Answer: c
Explanation: The important features of a database management system are:
1) Minimum Duplication and Redundancy of Data
2) High Level of Security
3) Mulitple-user Access
4) Support ACID Property

10. Which of the following is a feature of the database?
a) No-backup for the data stored
b) User interface provided
c) Lack of Authentication
d) Store data in multiple locations
View Answer

Answer: b
Explanation: The important features are:
1) Provides backup for the data stored by the user and the user can retrieve the data whenever required.
2) Provides User-interface to access the data.
3) Only authorized users can access the stored data.
4) Data is stored in one central location but multiple authorized users can access the data.

11. Which of the following is not a function of the database?
a) Managing stored data
b) Manipulating data
c) Security for stored data
d) Analysing code
View Answer

Answer: d
Explanation: It allows authorized users to update, store, manipulate, or access data. Since data is stored in table format it is easy to access the data and perform the required functions. It also removes duplicate and redundant data.

12. Which of the following is a function of the DBMS?
a) Storing data
b) Providing multi-users access control
c) Data Integrity
d) All of the above
View Answer

Answer: d
Explanation: The purpose of creating DBMS was to store the data. The data stored in the database management system can be can accessed by multiple users if the access is provided. The data stored will be accurate and complete hence providing data integrity

Read More

Chapter 5: Data Structures | class 12th | mcqs of computer science

Data Structure Multiple-Choice Questions

1. A queue follows _________:

a. LIFO principle

b. FIFO principle

c. Linear tree

d. Ordered array

Answer: (b) FIFO principle

2. The time complexity used for inserting a node in a priority queue on the basis of key is:

a. O(n)

b. O(n2)

c. O(nlogn)

d. O(logn)

Answer: (a) O(n)

3. Which of these is a postfix expression?

a. a+b-c

b. +ab

c. abc*+de-+

d. a*b(c+d)

Answer: (c) abc*+de-+

4. Which data structure do we use for testing a palindrome?

a. Heap

b. Tree

c. Priority queue

d. Stack

Answer: (d) Stack

5. Which of these will form an inversion in this given array?

arr = {2,8,5,3}

a. (2,8)

b. (8,5), (8,3)

c. (2,8), (2,5), (1,3)

d. (8,5), (8,3), (5,3)

Answer: (d) (8,5), (8,3), (5,3)

6. Which one isn’t the property of the XOR lists?

a. X⊕0 = X

b. X⊕X = 0

c. X⊕0 = 1

d. (X⊕Y)⊕Z = X⊕(Y⊕Z)

Answer: (c) X⊕0 = 1

7. The tango tree is a type of:

a. Binary Search Tree

b. K-ary Tree

c. Ternary Tree

d. AVL Tree

Answer: (a) Binary Search Tree

8. In an AA-tree, we can remove a left horizontal link by:

a. inserting a new element

b. deleting both the elements

c. performing left rotation

d. performing right rotation

Answer: (d) performing right rotation

9. We can use a self–balancing binary search tree for implementing the:

a. Hash table

b. Priority queue

c. Heap sort and Priority queue

d. Heap sort

Answer: (b) Priority Queue

10. A splay operation refers to:

a. the removal of leaf node

b. the movement of root to leaf

c. the movement of a node to root

d. the movement of parent node to a child node’s down

Answer: (c) the movement of a node to root

11. Out of these, which one is NOT true about a 2-3 tree?

a. it is perfectly balanced

b. the leaves are always at the same level

c. it refers to a B-tree of the order 3

d. postorder traversal would yield the elements in a sorted order

Answer: (d) postorder traversal would yield the elements in a sorted order

12. How do we define the Ackermann’s function?

a. for i<1, A(1,i) = i+1

b. for i = j, A(i,j) = i+j

c. for i>=j, A(i,j) = i+j

d. for i>=1, A(1,i) = i+1

Answer: (d) for i>=1, A(1,i) = i+1

13. A recursive implementation would presumably fail in skew heaps because:

a. lack of stack space

b. time complexity

c. these heaps are self adjusting

d. efficiency gets reduced

Answer: (a) lack of stack space

14. Which operation can we NOT perform directly in a d-heap?

a. create

b. find

c. delete

d. insert

Answer: (b) find

15. The time does taken for the construction of suffix tree is:

a. Linear to the Length of Tree

b. Exponential to the Length of Tree

c. O (M!)

d. O (log M)

Answer: (a) Linear to the Length of Tree

16. The best technique for handling collision is:

a. Separate chaining

b. Double hashing

c. Linear probing

d. Quadratic probing

Answer: (d) Quadratic probing

17. Which one is the most desirable out of these traits of a hash function?

a. it must cause more collisions

b. it must be easy to implement

c. it must cause less collisions

d. it must occupy less space

Answer: (c) it must cause less collisions

18. What is the time complexity for checking if an undirected graph with E edges and V vertices is Bipartite, given its adjacency matrix?

a. O(E)

b. O(V)

c. O(E*E)

d. O(V*V)

Answer: (d) O(V*V)

Read More

Chapter 4: Pointers | class 12th | mcqs of computer science

Pointers-mcqs


1. What is the base data type of a pointer variable by which the memory would be allocated to it?

a) int
b) float
c) No datatype
d) Depends upon the type of the variable to which it is pointing
e) unsigned int
View Answer

Answer: E
No explaination is given for this question.


2. Prior to using a pointer variable it should be

a) Declared
b) Initialized
c) Both declared and initalized
d) None of these
View Answer

Answer: C
Using a pointer variable, without initializing it, will be disastrous, as it will have a garbage value.


3. In C a pointer variable to an integer can be created by the decalaration

a) int p*;
b) int *p;
c) int +p;
d) int $p;
View Answer

Answer: B
No explaination is given for this question.


4. A pointer variable can be

a) Passed to a function
b) Changed within a function
c) Returned by a function
d) Can be assigned an integer value
View Answer

Answer: C
No explaination is given for this question.


5. What will be the output of the following C code?
void main() {
  int a[] = {1,2,3,4,5}, *p;
  p = a;
  ++*p;
  printf("%d ", *p);
p += 2;
  printf("%d ", *p);
}

a) 24
b) 34
c) 22
d) 23
View Answer

Answer: D
No explaination is given for this question.


6. What is the output of the following C code?
  char *ptr;
  char mystring[] = "abcdefg";
  ptr = myString;
  ptr += 5;

a) fg b) efg c) defg d) cdefg e) bcdefgView Answer

Answer: A
No explaination is given for this question.


7. Will this program compile?
int main() {
  char str[5] = "LetsFind";
  return 0;
}

a) True
b) False
View Answer

Answer: A
C doesn’t do array bounds checking at compile time, hence this compiles.But, the modern compilers like Turbo C++ detects this as ‘Error: Too many initializers’.GCC would give you a warning.


8. Is the NULL pointer same as an uninitialised pointer?

a) True
b) False
View Answer

Answer: B
No explaination is given for this question.


9. Which of the following statements correct about k used in the below statement?
char ****k;

a) k is a pointer to a pointer to a pointer to a char
b) k is a pointer to a pointer to a pointer to a pointer to a char
c) k is a pointer to a char pointer
d) k is a pointer to a pointer to a char
View Answer

Answer: B
k is a pointer to a pointer to a pointer to a pointer to a char.


10. What will be the output of the program.
char *p = 0;
char *t = NULL;

a) Yes
b) No
View Answer

Answer: B
NULL is #defined as 0 in the ‘stdio.h’ file. Thus, both p and t are NULL pointers

Read More

Chapter 3: Data File Handling | class 12th | mcqs of computer science

File Handling MCQ Questions Class 12 Computer Science with Answers

Question: Storage devices of a computer can be broadly classified into_______categories.

  • a) One
  • b) Two
  • c) Three
  • d) Four

Answer: Two

Question: _______storage is temporary.

  • a) Volatile
  • b) Non-volatile
  • c) Movable
  • d) Immovable

Answer: Volatile

Question: In_______storage values stored in variables are lost when a computer is shutdown.

  • a) Volatile
  • b) Non-volatile
  • c) Movable
  • d) Immovable

Answer: Volatile

Question: A Java program that stores a value in a________uses Random Access Memory (RAM).

  • a) Cell
  • b) Program
  • c) Variable
  • d) All of these

Answer: Variable

Question: Apart from variables, objects and their references are generally stored in______

  • a) ROM
  • b) PROM
  • c) RAM
  • d) Hard Disk

Answer: RAM

Question: Once the program terminates or the computer shuts down, the data is________from RAM.

  • a) Stored
  • b) Lost
  • c) Available
  • d) Accessible

Answer: Lost

Question: _______storage is permanent storage.

  • a) Volatile
  • b) Non-volatile
  • c) Movable
  • d) Immovable

Answer: Non-volatile

Question: Data is not_______when a computer loses power in a Non-volatile storage.

  • a) Stored
  • b) Lost
  • c) Available
  • d) Accessible

Answer: Lost

Question: When a Java program is saved on a disk, it is using______storage.

  • a) Temporary
  • b) Provisional
  • c) Conditional
  • d) Permanent

Answer: Permanent

Question: A computer_______is a collection of data stored on a non-volatile device.

  • a) File
  • b) Desktop
  • c) Directory
  • d) Device

Answer: File

Question: _______exist on permanent storage devices, such as hard disks, USB drives, optical disks and compact discs.

  • a) Files
  • b) Manuals
  • c) Directories
  • d) Devices

Answer: Files

Question: Data stored in files is often called_______data.

  • a) Text
  • b) Persistent
  • c) Informative
  • d) Binary

Answer: Persistent

Question: Files can be further classified broadly into_______categories.

  • a) One
  • b) Two
  • c) Three
  • d) Four

Answer: Two

Question: ______files contain data that can be read in a text editor.

  • a) Text
  • b) Manuscript
  • c) Memo
  • d) Binary

Answer: Text

Question: In the_______files the data has been encoded using a scheme such as ASCII or Unicode.

  • a) Text
  • b) Memo
  • c) Informative
  • d) Binary

Answer: Text

Question: ______files can be data files that contain facts, such as payroll file that contains employee numbers, names and salaries.

  • a) Binary
  • b) Memo
  • c) Program
  • d) Text

Answer: Text

Question: Some_______files can be program files or application files mat store software instructions.

  • a) Binary
  • b) Memo
  • c) Program
  • d) Text

Answer: Text

Question: are examples of editors through which text files can be created.

  • a) G edit
  • b) vi
  • c) pico
  • d) All of these

Answer: All of these

Question: The extensions of the files created through the above editor can have an extension like_________

  • a) Text
  • b) Java
  • c) C
  • d) All of these

Answer: All of these

Question: _____files contain data that has not been encoded as text.

  • a) Binary
  • b) Memo
  • c) Informative
  • d) Text

Answer: Binary

Question: The contents of a_______file are in binary format, which means the data is access terms of bytes.

  • a) Binary
  • b) Memo
  • c) Informative
  • d) Text

Answer: Binary

Question: The Binary files extensions examples are_______

  • a) Jpeg
  • b) Mp3
  • c) Class
  • d) All of these

Answer: All of these

Question: Java language supports various operations that can be performed on file or on_______

  • a) Programs
  • b) Attributes
  • c) Directories
  • d) Queries

Answer: Directories

Question: _______operations that can be performed on files using Java programs.

  • a) Determining the path of a file or a directory
  • b) Opening a file
  • c) Writing to a file
  • d) All of these

Answer: All of these

Question: _______operations that can be performed on files using Java programs.

  • a) Reading from a file
  • b) Closing or deleting a file
  • c) Querying the attributes of a file
  • d) All of these

Answer: All of these

Question: Java provides built-in_______that contains methods to help with the tasks related to file.

  • a) Variables
  • b) Packages
  • c) Classes
  • d) Devices

Answer: Classes

Question: The Java classes are present in package.

  • a) Java, bytes
  • b) Java.io
  • c) Java.util
  • d) Java.method

Answer: Java.io

Question: Java uses the concepts of______in file handling.

  • a) File systems
  • b) Streams
  • c) Packages
  • d) Classes

Answer: Streams

Question: Java provides_____different categories of java classes to perform I/O operations on bytes and characters.

  • a) One
  • b) Two
  • c) Three
  • d) Four

Answer: Two

Question: Which of the following is not a Binary file extension ?

  • a) Jpeg
  • b) Mp3
  • c) Class
  • d) txt

Answer: txt

Question: Which of the following is not a Text file extension ?

  • a) Txt
  • b) Java
  • c) Jpeg
  • d) C

Answer: Jpeg

Question: The_______class encapsulates information about the properties of a file or a directory.

  • a) Java.io.file
  • b) Java.oi.file
  • c) Java.util.io
  • d) Java.io.util

Answer: Java.io.file

Question: ________class can be used to access attributes of files and directions.

  • a) File
  • b) I/O
  • c) Java
  • d) util

Answer: File

Question: A programmer can do______a file or a directory.

  • a) Create
  • b) Rename
  • c) Delete
  • d) All of these

Answer: All of these

Question: The creation of a file Object that belongs to_____class does not imply that the file or directory exists.

  • a) File
  • b) I/O
  • c) Java
  • d) Util

Answer: File

Question: The______of a file can also be accessed like its permissions, length of a file or last modification time.

  • a) Features
  • b) Attributes
  • c) Qualities
  • d) Traits

Answer: Attributes

Question: A file________encapsulates a path name or reference to a physical file or a directory on the hard disk.

  • a) Method
  • b) Class
  • c) Object
  • d) Handler

Answer: Object

Question: There are nearly______that can be used to perform various operations on a file or a directory.

  • a) 25 methods
  • b) 30 methods
  • c) 35 methods
  • d) 20 methods

Answer: 30 methods

Question: _______does not provide any method to read from a file or write into a file.

  • a) File class
  • b) File method
  • c) File object
  • d) File operator

Answer: File class

Question: There are several_______classes to perform to read from a file or write into a file.

  • a) File
  • b) Stream
  • c) Package
  • d) Object

Answer: Stream

Question: By using the file class, one can create a______to any file by providing its absolute path in string format or by providing the relative path.

  • a) Location
  • b) Reference
  • c) Stream
  • d) Object

Answer: Reference

Question: The file class provides_______constructors to refer a file or a directory.

  • a) File (String path)
  • b) File (String directory_path, String file_name)
  • c) File (File directory, String file_name)
  • d) All of these

Answer: All of these

Question: In Linux, “password” file is present in_______directory stores the information of the users existing in the system.

  • a) “/etc”
  • b) “/pwd”
  • c) “/file”
  • d) “/dir”

Answer: “/etc”

Question: Suppose one wants to display its attributes, then its Java file object can be created using_______ways.

  • a) One
  • b) Two
  • c) Three
  • d) Four

Answer: Three

Question: _______method of file class returns true if the file or directory exists, otherwise returns false.

  • a) Boolean exists( )
  • b) Boolean is File()
  • c) Boolean is Directory( )
  • d) Boolean is Hidden( )

Answer: Boolean exists( )

Question: ______method of file class returns true if the file exists, otherwise returns false.

  • a) Boolean exists ( )
  • b) Boolean is File( )
  • c) Boolean is Directory( )
  • d) Boolean is Hidden( )

Answer: Boolean is File( )

Question: _____method of file class returns true if the directory exists, otherwise returns false.

  • a) Boolean exists( )
  • b) Boolean is File( )
  • c) Boolean is Directory( )
  • d) Boolean is Hidden( )

Answer: Boolean is Directory( )

Question: _______method of file class returns true if the file or directory is hidden.

  • a) Boolean exists ( )
  • b) Boolean is File( )
  • c) Boolean is Directory( )
  • d) Boolean is Hidden( )

Answer: Boolean is Hidden( )

Question: ______method of file class returns the absolute path of the file exists or directory.

  • a) String[ ] list( )
  • b) String get Path( )
  • c) String get Name( )
  • d) String get Absolute Path()

Answer: String get Absolute Path()

Question: ________method of file class returns the name of the file or directory referred by the object.

  • a) String[ ] list( )
  • b) String get Path( )
  • c) String get Name( )
  • d) String get Absolute Path()

Answer: String get Name( )

Question: _______method of file class returns the path to the file or directory.

  • a) String[ ] Hst( )
  • b) String get Path( )
  • c) String get Name( )
  • d) String get Absolute Path()

Answer: String get Path( )

Question: _______method of file class returns the name of the files and directories in a directory.

  • a) String[ ] list( )
  • b) String get Path( )
  • c) String get Name( )
  • d) String get Absolute Path()

Answer: String[ ] list( )

Question: _______method of file class returns the number of bytes in that file.

  • a) Long length( )
  • b) File[ ] list Files( )
  • c) Both (A) and (B)
  • d) None of these

Answer: Long length( )

Question: ________method of file class returns an array of abstract path names denoting the files in the directory.

  • a) Long length ( )
  • b) File[ ] list Files( )
  • c) Both (A) and (B)
  • d) None of these

Answer: File[ ] list Files( )

Question: ______method to list all the files present in a directory.

  • a) Display()
  • b) List( )
  • c) Dir()
  • d) Files()

Answer: List( )

Question: To modify a file or display the contents of a file, the concept of______has to be understood.

  • a) Files
  • b) Streams
  • c) Packages
  • d) Objects

Answer: Streams

Question: Java uses______classes to carry out read and write operations on files.

  • a) Files
  • b) Streams
  • c) Packages
  • d) Objects

Answer: Streams

Question: ______is an input device.

  • a) Monitor
  • b) Speaker
  • c) Keyboard
  • d) Plotter

Answer: Keyboard

Question: ______is an output device.

  • a) Monitor
  • b) Speaker
  • c) Keyboard
  • d) Plotter

Answer: Monitor

Question: ________can be classified as both input and output device as data can be stored and read from the files.

  • a) Monitor
  • b) Speaker
  • c) Keyboard
  • d) Hard disk

Answer: Hard disk

Question: _________are manufactured by various companies and come with different storage capacities like 500GB or 1 TB.

  • a) Monitor
  • b) Speaker
  • c) Keyboard
  • d) Hard disk

Answer: Hard disk

Question: ______can be connected using different cables like USB or SATA.

  • a) Hard disk
  • b) Scanner
  • c) Printer
  • d) Mouse

Answer: Hard disk

Question: A Java programmer does not need to worry about the technical details like type of______or its capacity while developing a program to perform read / write operations over the files

  • a) Hard disk
  • b) Scanner
  • c) Printer
  • d) Mouse

Answer: Hard disk

Question: The above point is possible because Java language provides functionality of______

  • a) Files
  • b) Streams
  • c) Directories
  • d) Objects

Answer: Streams

Question: A______is an abstract representation of an input or output device that is used as a source or destination for data.

  • a) File
  • b) Directory
  • c) Stream
  • d) Disk

Answer: Stream

Question: Visualize a______as a sequence of bytes that flows into the program or that flows out of the program.

  • a) File
  • b) Directory
  • c) Stream
  • d) Disk

Answer: Stream

Question: One can write data or read data using_______

  • a) Files
  • b) Streams
  • c) Directories
  • d) Objects

Answer: Streams

Question: When data is written to stream, the stream is called an________

  • a) Output stream
  • b) Input stream
  • c) I/O stream
  • d) Both (A) and (B)

Answer: Output stream

Question: The_______can transfer data from the program to a file on a hard disk or a monitor or to some other computer over the network.

  • a) Output stream
  • b) Input stream
  • c) I/O stream
  • d) Both (A) and (B)

Answer: Output stream

Question: An______is used to read data from an external device to the program.

  • a) Output stream
  • b) Input stream
  • c) I/O stream
  • d) Both (A) and (B)

Answer: Input stream

Question: _______can transfer data from keyboard or from the file on a hard disk to the program.

  • a) Output stream
  • b) Input stream
  • c) I/O stream
  • d) Both (A) and (B)

Answer: Input stream

Question: The main reason for using streams for input or output operations is to make our program independent of the_______involved.

  • a) Hard Disks
  • b) Keyboards
  • c) Printers
  • d) Devices

Answer: Devices

Question: _______is advantage of using streams.

  • a) Programmer does not need to worry about the technical details of the device.
  • b) The program can work for a variety of input/ output devices without any changes to the source code.
  • c) Both (A) and (B)
  • d) None of these

Answer: Both (A) and (B)

Question: To understand byte streams and character streams, one needs to differentiate between character and byte______

  • a) Representation
  • b) Collection
  • c) Numbers
  • d) Particulars

Answer: Representation

Question: If ‘5’ is represented as a Character, its ASCII value will be______

  • a) 51
  • b) 52
  • c) 53
  • d) 54

Answer: 53

Question: If 5 is represented as a character, its binary representation will be_______

  • a) 53
  • b) 5
  • c) 101
  • d) 00110101

Answer: 00110101

Question: If ‘5’ is represented as a binary number, then its value will be______

  • a) 53
  • b) 5
  • c) Five
  • d) 101

Answer: 5

Question: If ‘5* is represented as a binary number, then its binary representation will be_______

  • a) 00000101
  • b) 11001100
  • c) 10101100
  • d) 11111000

Answer: 00000101

Question: A character is generally stored using ASCII or Unicode format but when it is used for calculation purpose and then it’s________value is meaningful.

  • a) Binary
  • b) Actual
  • c) Objective
  • d) Text

Answer: Binary

Question: In the statement int i = 32, the_____is true.

  • a) Declares ‘i’ as an integer type variable
  • b) That T stores number 32.
  • c) Both (A) and (B)
  • d) None of these

Answer: Both (A) and (B)

Question: The number 32 can be represented as two separate_______’3′ and ‘2’.

  • a) Numbers
  • b) Values
  • c) Characters
  • d) All of these

Answer: Characters

Read More

Chapter 2: Basic Concepts of OOP Classes & Objects | class 12th | mcqs of computer science

Object Oriented Concepts MCQ Questions Class 12 Computer Science with Answers

Question: In Object-oriented methodology, the focus is on which of the following entities ?

  • a) Data
  • b) Functions
  • c) Objects
  • d) All of the above

Answer: Objects

Question: Which of the following best suits to Java ?

  • a) A procedural programming language
  • b) An object oriented programming language
  • c) A Query language
  • d) All of the above

Answer: An object oriented programming language

Question: Which of the following is used to distinguish objects from each other?

  • a) Attributes
  • b) State
  • c) Behavior
  • d) All of the above

Answer: State

Question: Which of the following is used to define common features of similar objects?

  • a) Class
  • b) Object
  • c) Methods
  • d) All of the above

Answer: Class

Question: Which of the following is not a visibility symbol ?

  • a) ~
  • b) *
  • c) #
  • d) –

Answer: *

Question: Which of the following is provided using encapsulation ?

  • a) Data protection
  • b) Data sharing
  • c) Separation of data and methods
  • d) All of these

Answer: Data protection

Question: Which of the following is enabled by data abstraction ?

  • a) Data protection
  • b) Data hiding
  • c) To hide implementation details of method manipulating the data
  • d) All of these

Answer: To hide implementation details of method manipulating the data

Question: With which of the following options polymorphism cannot be achieved ?

  • a) Method overloading
  • b) Operator overloading
  • c) Data hiding
  • d) All of these

Answer: Data hiding

Question: An aggregation model refers to which of the following relationships ?

  • a) ‘is-a’ relationship
  • b) ‘is-like’ relationship
  • c) ‘a-part-of relationship
  • d) All of these

Answer: ‘is-a’ relationship

Question: An inheritance model refers to which of the following relationships ?

  • a) ‘is-a’ relationship
  • b) ‘has-a’ relationship
  • c) ‘a-part-of relationship
  • d) All of these

Answer: ‘is-a’ relationship

Question: In class diagram, composition is represented using which of the following symbols ?

  • a) Empty diamond symbol
  • b) Filled diamond symbol
  • c) Empty triangle symbol
  • d) All of these

Answer: Filled diamond symbol

Question: Object-oriented programming concepts started originating in the_______

  • a) 1950s
  • b) 1960s
  • c) 1970s
  • d) 1980s

Answer: 1960s

Question: Since mid______object-oriented programming had become the main programming paradigm used in the creation of new software.

  • a) 1950s
  • b) 1960s
  • c) 1970s
  • d) 1980s

Answer: 1980s

Question: Some of the popular programming languages that support______programming are C++, Java, C#, VB.net, ASP.net and PHP.

  • a) Object-oriented
  • b) Structural
  • c) Modular
  • d) Procedural

Answer: Object-oriented

Question: The way of programming can be divided into______categories.

  • a) Four
  • b) Three
  • c) Two
  • d) One

Answer: Two

Question: Java is a_____programming language.

  • a) Object-oriented
  • b) Structural
  • c) Modular
  • d) Procedural

Answer: Object-oriented

Question: The categories are______and object-oriented.

  • a) Objective
  • b) Structure/procedural
  • c) Modular
  • d) Functional

Answer: Structure/procedural

Question: In_______programming, the focus is on writing functions or procedures which operate on data.

  • a) Procedural
  • b) Modular
  • c) Functional
  • d) None of these

Answer: Procedural

Question: In object-oriented_____the focus is on objects which contain data and functionality together.

  • a) Pattern
  • b) Prototype
  • c) Paradigm
  • d) Example

Answer: Paradigm

Question: The power of object-oriented programming language enables the programmer to create modular, reusable and_____code.

  • a) Complete
  • b) Accomplished
  • c) Perfect
  • d) Executable

Answer: Executable

Question: Flexibility is gained by being able to change or replace______without disturbing other parts of code.

  • a) Modules
  • b) Parts
  • c) Functions
  • d) Methods

Answer: Modules

Question: Object-oriented programming uses_____as its fundamental building block.

  • a) Method
  • b) Class
  • c) Object
  • d) Procedure

Answer: Object

Question: A computer language is object-oriented if they support four specific object properties called

  • a) Abstraction
  • b) Encapsulation
  • c) Polymorphism and Inheritance
  • d) All of these

Answer: All of these

Question: C# is a______programming language.

  • a) Object-oriented
  • b) Structural
  • c) Modular
  • d) Procedural

Answer: Object-oriented

Question: In the real world______are the entities of which the world is comprised.

  • a) Methods
  • b) Classes
  • c) Objects
  • d) Procedures

Answer: Objects

Question: Some objects can be______things like person, car or a cup of coffee.

  • a) Abstract
  • b) Concrete
  • c) Real
  • d) Solid

Answer: Concrete

Question: Some objects may be______that do not represent things which can be touched or seen.

  • a) Abstract
  • b) Concrete
  • c) Real
  • d) Solid

Answer: Abstract

Question: All objects have unique______and are distinguishable from each other.

  • a) Personality
  • b) Objects
  • c) Procedures
  • d) Identity

Answer: Identity

Question: In object-oriented terminology characteristics are known as properties or_______

  • a) Features
  • b) Attributes
  • c) Values
  • d) States

Answer: Attributes

Question: To uniquely distinguish one person from other,the______of its characteristics is used.

  • a) Worth
  • b) Cost
  • c) Value
  • d) Property

Answer: Value

Question: When two people have same name, they can be distinguished using other attributes like______

  • a) Color
  • b) Name
  • c) Birth-date
  • d) Behavior

Answer: Birth-date

Question: To identifythe value of the attributes is used.

  • a) Personality
  • b) Objects
  • c) Procedures
  • d) Identity

Answer: Objects

Question: There is always a behavior associated with

  • a) Personality
  • b) Objects
  • c) Procedures
  • d) Identity

Answer: Objects

Question: The behavior of objects is also known as

  • a) Method
  • b) Technique
  • c) Process
  • d) Procedure

Answer: Method

Question: The_______of the object can change due to its behavior.

  • a) State
  • b) Method
  • c) Status
  • d) Class

Answer: State

Question: Object can be described in terms of

  • a) What it is called (identity)
  • b) What it is (its state)
  • c) What it does (behavior)
  • d) All of these

Answer: All of these

Question: In object-oriented programming, attributes that describe the object are also referred to as_____fields.

  • a) Information
  • b) Method
  • c) Data
  • d) Name

Answer: Data

Question: The data attributes and behavioral methods associated with an object are collectively referred to as its____or features.

  • a) Component
  • b) Associate
  • c) Part
  • d) Member

Answer: Member

Question: _______system uses the concept of class that enables to express the set of objects that are abstractly equivalent, differing only in the values of their attributes.

  • a) Object-oriented
  • b) Value-oriented
  • c) Data-oriented
  • d) All of these

Answer: Object-oriented

Question: ______can be considered as a blueprint for various objects.

  • a) Method
  • b) Class
  • c) Object
  • d) Member

Answer: Class

Question: A class is a_______for multiple objects with similar features.

  • a) Image
  • b) Representation
  • c) Template
  • d) Guide

Answer: Template

Question: A class describes a group of objects with similar______and common behaviour.

  • a) Features
  • b) Attributes
  • c) Values
  • d) States

Answer: Attributes

Question: _______in the same class share a common semantic purpose.

  • a) Methods
  • b) Classes
  • c) Objects
  • d) Members

Answer: Objects

Question: _______is a general concept used to embody all the common features of a particular set of objects.

  • a) Method
  • b) Class
  • c) Object
  • d) Member

Answer: Class

Question: The class______presents a collection of classes, constraints and relationship among classes.

  • a) Diagram
  • b) Map
  • c) Drawing
  • d) Figure

Answer: Diagram

Question: _______can be used to create models of object-oriented software to help with design of an application.

  • a) ULM
  • b) UML
  • c) LUM
  • d) MUL

Answer: UML

Question: _______is a visual modeling language defined and maintained by the Object Management Group.

  • a) ULM
  • b) UML
  • c) LUM
  • d) MUL

Answer: UML

Question: _______specifies several diagrams for representing different aspects of a software application.

  • a) ULM
  • b) UML
  • c) LUM
  • d) MUL

Answer: UML

Question: The purpose of the class________is to model the static view of an application.

  • a) Diagram
  • b) Map
  • c) Drawing
  • d) Figure

Answer: Diagram

Question: The class’s diagrams are only diagrams which can be directly mapped with object-oriented.

  • a) Methods
  • b) Procedures
  • c) Languages
  • d) Attributes

Answer: Languages

Question: In class diagram, a class is represented with an icon using a rectangle split into______sections to present name, attributes and behaviour.

  • a) One
  • b) Two
  • c) Three
  • d) Four

Answer: Three

Question: In the class diagram, the name is in the______section.

  • a) Top
  • b) Middle
  • c) Centre
  • d) Bottom

Answer: Top

Question: In the class diagram, the attributes or methods are in the_____section.

  • a) Top
  • b) Middle
  • c) Centre
  • d) Bottom

Answer: Middle

Question: In the class diagram, the behaviour or operations are in the_____section.

  • a) Top
  • b) Middle
  • c) Centre
  • d) Bottom

Answer: Bottom

Question: Full form of UML is______

  • a) Unified Modelling Language
  • b) United Modelling Language
  • c) United Model of Languages
  • d) None of these

Answer: Unified Modelling Language

Question: Full form of OMG is______

  • a) Oriented Management Group
  • b) Oriented Managing Group
  • c) Object Management Group
  • d) Object Management Grouping

Answer: Object Management Group

Question: In UML notation, an attribute is declared using the following syntax :

  • a) [][:[=]]
  • b) [][:]]
  • c) [][:] ]
  • d)[:[=]]

Answer: [] [:]]

Question: In an attribute declaration, the______brackets are optional.

  • a) Round
  • b) Chain
  • c) Angle
  • d) Square

Answer: Square

Question: In an attribute declaration, the values should be specified in the_____brackets.

  • a) Round
  • b) Chain
  • c) Angle
  • d) Square

Answer: Angle

Question: In an attribute declaration, the______can be private, protected, public or package.

  • a) Visibility
  • b) Invisible
  • c) Evident
  • d) Obvious

Answer: Visibility

Question: In an attribute declaration, the private visibility is represented by_____symbol.

  • a) –
  • b) #
  • c) +
  • d) ~

Answer: –

Question: In an attribute declaration, the protected visibility is represented by______symbol.

  • a) –
  • b) #
  • c) +
  • d) ~

Answer: #

Question: In an attribute declaration, the public visibility is represented by_____symbol.

  • a) –
  • b) #
  • c) +
  • d) ~

Answer: +

Question: In an attribute declaration, the package visibility is represented by_____symbol.

  • a) –
  • b) #
  • c) +
  • d) ~

Answer: ~

Question: Attribute generally refers to a______

  • a) Variable
  • b) Property
  • c) Value
  • d) Class

Answer: Variable

Question: _______type and initial value identify the type of data stored and its value at the start of the program.

  • a) Data
  • b) Date
  • c) Value
  • d) Class

Answer: Data

Question: ______is an example of declaring attribute.

  • a) Name:- string;
  • b) Name : string
  • c) Name ++string
  • d) Name = string

Answer: Name : string

Question: In UML notation, an operation is declared using_____syntax:

  • a) [](parameter list separated by comma):
  • b) [](parameter list separated by comma):
  • c) [](parameter list separated by comma):
  • d) None of these.

Answer: [](parameter list separated by comma):

Question: ________diagrams are independent of the programming language used for coding an application.

  • a) ULM
  • b) UML
  • c) LUM
  • d) MUL

Answer: UML

Question: _______are presented using their state during execution of an application.

  • a) Methods
  • b) Procedures
  • c) Classes
  • d) Objects

Answer: Objects

Question: Objects are_______

  • a) Dynamic
  • b) Vibrant
  • c) Colorful
  • d) All of these

Answer: Dynamic

 

Question: An object is also called an______

  • a) Image
  • b) Illustration
  • c) Instance
  • d) Occurrence

Answer: Instance

Question: For any computer program, two or more elements are data and________

  • a) Method
  • b) Function
  • c) Information
  • d) Procedure

Answer: Function

Question: Structured/Procedural programming views the two core elements as______separate entities.

  • a) One
  • b) Two
  • c) Three
  • d) None of these

Answer: Two

Question: ________programming views the two coreentities as single entity.

  • a) Object-oriented
  • b) Structured
  • c) Procedural
  • d) Instance

Answer: Object-oriented

Question: In______programming, data can be altered by any component of the program.

  • a) Object-oriented
  • b) Structured
  • c) Procedural
  • d) Instance

Answer: Procedural

Question: In object-oriented programming, the problem of modification can be solved using______

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Encapsulation

Question: Data and the methods that______data are guarded against modification or misuse by other components of the program.

  • a) Change
  • b) Modify
  • c) Manipulate
  • d) Imitate

Answer: Manipulate

Question: The mechanism of providing protection to data and methods of a program is called______

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Encapsulation

Question: ______is possible by wrapping data and methods into a single unit known as class and declaring them as private.

  • a) Encapsulation
  • b) Abstraction
  • c) Messaging
  • d) Polymorphism

Answer: Encapsulation

Question: ________members of the class are not available directly to outside world.

  • a) Private
  • b) Public
  • c) Void
  • d) Static

Answer: Private

Question: Data can be made available via public______to the outside world.

  • a) Messages
  • b) Methods
  • c) Function
  • d) Declarations

Answer: Methods

Question: Encapsulation provides______hiding capability.

  • a) Information
  • b) Data
  • c) Code
  • d) Class

Answer: Data

Question: _______keeps the data safe from unintended actions and inadvertent access by outside objects.

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Encapsulation

Question: ________programming discourages direct access to common data by other programs.

  • a) Object-oriented
  • b) Structured
  • c) Procedural
  • d) Instance

Answer: Object-oriented

Question: Only the object that______the data can change its content.

  • a) Holds
  • b) Possesses
  • c) Owns
  • d) Creates

Answer: Owns

Question: Other objects can view or change this data by sending message to the “owner”.

  • a) Vendor
  • b) Businessman
  • c) Owner
  • d) Viewer

Answer: Owner

Question: Data______is a process of representing the essential features of the objects without including implementation detail.

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Abstraction

Question: _______is a concept that hides the complexity; it says what it does, but not how it is done.

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Abstraction

Question: Data______thus is a technique that relies on the separation of interface and implementation.

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Abstraction

Question: A user defined______with necessary input data parameters also provides data abstraction.

  • a) Messages
  • b) Methods
  • c) Function
  • d) Declarations

Answer: Function

Question: The signature of the function means the name of the function, number and type of parameters and the return type of______

  • a) Parameters
  • b) Methods
  • c) Parts
  • d) Variables

Answer: Parameters

Question: Data_____provides the skeleton or templates for the programmers use. The system hides certain details of how data is stored, created and maintained.

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Abstraction

Question: All that is______to the rest of the world is the abstract behaviour of the data type.

  • a) Invisible
  • b) Hidden
  • c) Seen
  • d) Visible

Answer: Visible

Question: ______or structures (struct) in C/C++, classes / Java are examples for data abstraction.

  • a) ADVT
  • b) TDA
  • c) DAT
  • d) ADT

Answer: ADT

Question: Full form of ADT is________

  • a) Abstraction Date Type
  • b) Abstract Date Type
  • c) Abstract Data Type
  • d) Abstract Data Template

Answer: Abstract Data Type

Question: In___it is simply defined a data type and a set of operations on it. The implementation of operations is not seen.

  • a) ADVT
  • b) TDA
  • c) DAT
  • d) ADT

Answer: ADT

Question: Encapsulation_____data by making them inaccessible from outside.

  • a) Hides
  • b) Protects
  • c) Displays
  • d) Harms

Answer: Protects

Question: _______enables to represent data in which the implementation details are hidden.

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Abstraction

Question: In object-oriented terminology, a call to a method is referred to as a______

  • a) Message
  • b) Function
  • c) Call
  • d) Letter

Answer: Message

Question: ________represents ‘has-a’ or ‘a-part-of relationship between classes.

  • a) Aggregation
  • b) Polymorphism
  • c) Work
  • d) Messaging

Answer: Aggregation

Question: ______represents non-exclusive relationship between two classes.

  • a) Polymorphism
  • b) Aggregation
  • c) Inheritance
  • d) Abstraction

Answer: Aggregation

Question: In_____the class that forms part of the owner class can exist independently.

  • a) Polymorphism
  • b) Aggregation
  • c) Inheritance
  • d) Abstraction

Answer: Aggregation

Question: The life of an______of the part class is not determined by the owner class.

  • a) Variable
  • b) Parameter
  • c) Operator
  • d) Object

Answer: Object

Question: Although the motherboard is part of the computer, it can exist as a separate item independent of the_______

  • a) Workstation
  • b) System
  • c) Computer
  • d) Processor

Answer: Computer

Question: Basic aggregation is represented using an empty_______symbol next to the whole class.

  • a) Square
  • b) Diamond
  • c) Triangle
  • d) Circle

Answer: Diamond

Question: ________represents exclusive relationship between two classes.

  • a) Composition
  • b) Aggregation
  • c) Inheritance
  • d) Abstraction

Answer: Composition

Question: ______is a strong type of aggregation where the lifetime of the part class depends on the existence of the owner class.

  • a) Composition
  • b) Aggregation
  • c) Inheritance
  • d) Abstraction

Answer: Composition

Question: If an object of aggregating class is deleted, its part_______object also gets deleted.

  • a) Function
  • b) Message
  • c) Class
  • d) Variable

Answer: Class

Question: When an object of class Person is deleted, the object of class Name is also______

  • a) Removed
  • b) Deleted
  • c) Detached
  • d) Attached

Answer: Deleted

 

Question: _______property suits best with Java.

  • a) A Structured Language
  • b) An Object-oriented Language
  • c) A Procedural Language
  • d) An Interpreting Language

Answer: An Object-oriented Language

Question: is provided while using encapsulation.

  • a) Data Protection
  • b) Data Hiding
  • c) Data Sharing
  • d) Data and Methods Separation

Answer: Data Protection

Question: The focus is on_____entity in an object-oriented methodology.

  • a) Functions
  • b) Data
  • c) Classes
  • d) Objects

Answer: Objects

Question: In class diagram, basic aggregation is represented using which of the following symbols ?

  • a) Empty triangle symbol
  • b) Filled triangle symbol
  • c) Filled diamond symbol
  • d) Empty diamond symbol

Answer: Empty diamond symbol

Question: The data type for NAME variable should be______

  • a) String
  • b) Char
  • c) Date
  • d) Int

Answer: String

Question: The data type for BIRTHDATE variable should be____

  • a) String
  • b) Char
  • c) Date
  • d) Int

Answer: Date

Question: The data type for GENDER variable should be

  • a) String
  • b) Char
  • c) Double
  • d) Int

Answer: Char

Question: The data type for NO_OF_STUDENTS variable should be_______

  • a) String
  • b) Char
  • c) Double
  • d) Int

Answer: Int

Question: _______is used to define common features of similar objects.

  • a) Class
  • b) Procedure
  • c) Object
  • d) Method

Answer: Method

Question: The output of the function sqrt(25) is_______

  • a) 5
  • b) 10
  • c) 15
  • d) 20

Answer: 5

Question: A user defined______with necessary input data parameters also provides data abstraction.

  • a) Messages
  • b) Methods
  • c) Function
  • d) Declarations

Answer: Function

Question: The signature of the function means the name of the function, number and type of parameters and the return type of______

  • a) Parameters
  • b) Methods
  • c) Parts
  • d) Variables

Answer: Parameters

Question: Data_____provides the skeleton or templates for the programmers use. The system hides certain details of how data is stored, created and maintained.

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Abstraction

Question: All that is______to the rest of the world is the abstract behaviour of the data type.

  • a) Invisible
  • b) Hidden
  • c) Seen
  • d) Visible

Answer: Visible

Question: ______or structures (struct) in C/C++, classes / Java are examples for data abstraction.

  • a) ADVT
  • b) TDA
  • c) DAT
  • d) ADT

Answer: ADT

Question: Full form of ADT is________

  • a) Abstraction Date Type
  • b) Abstract Date Type
  • c) Abstract Data Type
  • d) Abstract Data Template

Answer: Abstract Data Type

Question: In___it is simply defined a data type and a set of operations on it. The implementation of operations is not seen.

  • a) ADVT
  • b) TDA
  • c) DAT
  • d) ADT

Answer: ADT

Question: Encapsulation_____data by making them inaccessible from outside.

  • a) Hides
  • b) Protects
  • c) Displays
  • d) Harms

Answer: Protects

Question: _______enables to represent data in which the implementation details are hidden.

  • a) Polymorphism
  • b) Abstraction
  • c) Messaging
  • d) Encapsulation

Answer: Abstraction

Question: In object-oriented terminology, a call to a method is referred to as a______

  • a) Message
  • b) Function
  • c) Call
  • d) Letter

Answer: Message

Question: ________represents ‘has-a’ or ‘a-part-of relationship between classes.

  • a) Aggregation
  • b) Polymorphism
  • c) Work
  • d) Messaging

Answer: Aggregation

Question: ______represents non-exclusive relationship between two classes.

  • a) Polymorphism
  • b) Aggregation
  • c) Inheritance
  • d) Abstraction

Answer: Aggregation

Question: In_____the class that forms part of the owner class can exist independently.

  • a) Polymorphism
  • b) Aggregation
  • c) Inheritance
  • d) Abstraction

Answer: Aggregation

Question: The life of an______of the part class is not determined by the owner class.

  • a) Variable
  • b) Parameter
  • c) Operator
  • d) Object

Answer: Object

Question: Although the motherboard is part of the computer, it can exist as a separate item independent of the_______

  • a) Workstation
  • b) System
  • c) Computer
  • d) Processor

Answer: Computer

Question: Basic aggregation is represented using an empty_______symbol next to the whole class.

  • a) Square
  • b) Diamond
  • c) Triangle
  • d) Circle

Answer: Diamond

Question: ________represents exclusive relationship between two classes.

  • a) Composition
  • b) Aggregation
  • c) Inheritance
  • d) Abstraction

Answer: Composition

Question: ______is a strong type of aggregation where the lifetime of the part class depends on the existence of the owner class.

  • a) Composition
  • b) Aggregation
  • c) Inheritance
  • d) Abstraction

Answer: Composition

Question: If an object of aggregating class is deleted, its part_______object also gets deleted.

  • a) Function
  • b) Message
  • c) Class
  • d) Variable

Answer: Class

Question: When an object of class Person is deleted, the object of class Name is also______

  • a) Removed
  • b) Deleted
  • c) Detached
  • d) Attached

Answer: Deleted

 

Question: _______property suits best with Java.

  • a) A Structured Language
  • b) An Object-oriented Language
  • c) A Procedural Language
  • d) An Interpreting Language

Answer: An Object-oriented Language

Question: is provided while using encapsulation.

  • a) Data Protection
  • b) Data Hiding
  • c) Data Sharing
  • d) Data and Methods Separation

Answer: Data Protection

Question: The focus is on_____entity in an object-oriented methodology.

  • a) Functions
  • b) Data
  • c) Classes
  • d) Objects

Answer: Objects

Question: In class diagram, basic aggregation is represented using which of the following symbols ?

  • a) Empty triangle symbol
  • b) Filled triangle symbol
  • c) Filled diamond symbol
  • d) Empty diamond symbol

Answer: Empty diamond symbol

Question: The data type for NAME variable should be______

  • a) String
  • b) Char
  • c) Date
  • d) Int

Answer: String

Question: The data type for BIRTHDATE variable should be____

  • a) String
  • b) Char
  • c) Date
  • d) Int

Answer: Date

Question: The data type for GENDER variable should be

  • a) String
  • b) Char
  • c) Double
  • d) Int

Answer: Char

Question: The data type for NO_OF_STUDENTS variable should be_______

  • a) String
  • b) Char
  • c) Double
  • d) Int

Answer: Int

Question: _______is used to define common features of similar objects.

  • a) Class
  • b) Procedure
  • c) Object
  • d) Method

Answer: Method

Question: The output of the function sqrt(25) is_______

  • a) 5
  • b) 10
  • c) 15
  • d) 20

Answer: 5

Question: _______is generally referred to as ‘is-a-kind-of relationship between two classes.

  • a) Composition
  • b) Aggregation
  • c) Inheritance
  • d) Abstraction

Answer: Inheritance

Question: ________refers to the capability of defining a new class of objects that inherits the characteristics of another existing class.

  • a) Inheritance
  • b) Composition
  • c) Aggregation
  • d) Messaging

Answer: Inheritance

Question: In object-oriented terminology_______class is called sub class or child class or derived class.

  • a) Latest
  • b) New
  • c) Old
  • d) Super

Answer: New

Question: The existing class is called______class or parent class or base class.

  • a) Sub
  • b) New
  • c) Super
  • d) Child

Answer: Super

Question: The data_______and methods of the super class are available to objects in the sub class without rewriting their declarations.

  • a) Attributes
  • b) Properties
  • c) Operators
  • d) Features

Answer: Attributes

Question: The above feature (mention in above question provides) reusability where existing method can be reused without______

  • a) Introduction
  • b) Availability
  • c) Definition
  • d) Redefining

Answer: Redefining

Question: Additionally new data and method members can be added to the______class as an extension.

  • a) Sub
  • b) New
  • c) Super
  • d) Child

Answer: Sub

Question: In a class diagram, inheritance is represented using an arrow pointing to______class.

  • a) Sub
  • b) New
  • c) Super
  • d) Child

Answer: Super

Question: _________is another name for inheritance or ‘is a’relationship.

  • a) Aggregation
  • b) Composition
  • c) Inheritance
  • d) Generalization

Answer: Generalization

Question: ________refers to a relationship between two classes where one class is a specialized version of another.

  • a) Aggregation
  • b) Composition
  • c) Inheritance
  • d) Generalization

Answer: Generalization

Question: Common attributes and methods are defined in______class.

  • a) Sub
  • b) New
  • c) Super
  • d) Child

Answer: Super

Question: _________class is a specialized version with additional attributes and methods.

  • a) Sub
  • b) New
  • c) Super
  • d) Child

Answer: Sub

Question: A_______can be derived using more than parent classes.

  • a) Method
  • b) Program
  • c) Class
  • d) Variable

Answer: Class

Question: When a class is derived from two or more classes, it is known as multiple________

  • a) Aggregation
  • b) Composition
  • c) Inheritance
  • d) Generalization

Answer: Inheritance

Question: In_____class inherits from other classes in order to share, reuse or extend functionality.

  • a) Aggregation
  • b) Composition
  • c) Inheritance
  • d) Generalization

Answer: Inheritance

Question: In_______classes do not inherit from other classes, but are ‘composed of other classes.

  • a) Aggregation
  • b) Composition
  • c) Inheritance
  • d) Generalization

Answer: Composition

Question: _________as methodology is playing a significant role in analysis, design and implementation of software system.

  • a) Object-oriented
  • b) Structure-oriented
  • c) Procedure-oriented
  • d) Aggregation-oriented

Answer: Object-oriented

Question: When a class contains objects of other class, the container class is called______class or whole class or aggregating class.

  • a) Sub
  • b) Owner
  • c) Super
  • d) Whole

Answer: Owner

Question: The class that is contained in owner class is known as_______class or part class or aggregated class.

  • a) Sub
  • b) Owner
  • c) Subject
  • d) Super

Answer: Subject

Question: ________represents non-exclusive relationship between two classes.

  • a) Aggregation
  • b) Composition
  • c) Inheritance
  • d) Generalization

Answer: Aggregation

Question: represents exclusive relationship between two classes.

  • a) Aggregation
  • b) Composition
  • c) Inheritance
  • d) Generalization

Answer: Composition

Question: When there is ‘is-a’ or ‘a-kind-of relationship between two classes, there is_____relationship.

  • a) Aggregation
  • b) Composition
  • c) Inheritance
  • d) Generalization

Answer: Inheritance

Question: General features or common features of two classes are implemented in the______class.

  • a) Sub
  • b) Owner
  • c) Subject
  • d) Super

Answer: Super

Question: Special features of two classes are implemented in sub class.

  • a) Sub
  • b) Owner
  • c) Subject
  • d) Super

Answer: Sub

Question: In class diagram, composition is represented using which of the following symbols ?

  • a) Empty triangle symbol
  • b) Filled triangle symbol
  • c) Filled diamond symbol
  • d) Empty diamond symbol

Answer: Filled diamond symbol

Question: An inheritance model refers to which of the following relationships ?

  • a) Has-a-relationship’
  • b) A-part-of relationship
  • c) Is-a-part-of relationship
  • d) Is-a’ relationship

Answer: Is-a’ relationship

Question: Which of the following is enabled by data abstraction ?

  • a) Data protection
  • b) Data hiding
  • c) Hide implementation details
  • d) Hide relationship details

Answer: Hide implementation details

Question: Polymorphism cannot be achieved by which of the following ?

  • a) Operator overloading
  • b) Data hiding
  • c) Method overloading
  • d) None of these

Answer: Data hiding

Question: Which of the following model refers to an aggregation ?

  • a) A-part-of relationship
  • b) Is-like’ relationship
  • c) Is-a’ relationship
  • d) Has-a’ relationship

Answer: A-part-of relationship

Question: _______is used to distinguish objects from each other.

  • a) Attributes
  • b) Behaviour
  • c) State
  • d) All of these

Answer: State

Read More

Chapter 1: Overview of CPP | class 12th | mcqs of computer science

Computer Science (C++) MCQ

1 . In C++ every statement end with

  • colon(:)
  • Comma (,)
  • dot (.)
  • Semicolon (;)

Answer

Semicolon (;)

2. Base class is

  • normal class
  • derived class
  • child class
  • all of these

Answer

normal class

3. Which of the following is not a feature of C++.

  • Operator overloading
  • Inheritance
  • Namespace
  • Reflection

Answer

Reflection

4. Which of the following is not a member of the class?

  • Static function
  • Friend function
  • Virtual function
  • Const function

Answer

5. Which of the following is the correct class of the object cout?

  • iostream
  • istream
  • ostream
  • ifstream

Answer

ostream

6. Which of the following is not a type of inheritance?

  • Multiple
  • Multilevel
  • Distributive
  • Hierarchical

Answer

Distributive

7. In protected inheritance, a public data member of the base class will be treated in a derived class as.

  • public
  • private none of the above
  • protected
  • none of the above

Answer

public

8. main is a/an

  • keyword
  • object
  • function
  • none of the above

Answer

function

9. A set of arithmetic operators are.

  • + , – , * , / , %
  • < , > , >= , <=
  • &&, ||, !
  • none of the above

Answer

+ , – , * , / , %

10. A set of logical operators are.

  • + , – , * , / , %
  • < , > , >= , <=
  • &&, ||, !
  • none of the above

Answer

&&, ||, !

11. Which of the following concepts means determining at runtime what method to invoke.

  • Data hiding
  • Dynamic loading
  • Dynamic typing
  • Dynamic binding

Answer

Dynamic binding

12. is a way of combining data with functions into an object.

  • Object
  • Encapsulation
  • Inheritance
  • Constructor

Answer

13. eof is an acronym of

  • the ending of line
  • ending of files
  • end of file
  • None of the above

Answer

end of file

14. C++ language has been developed by

  • Dennis Ritchie
  • Ken Thompson
  • Martin Richard
  • Bjarne Stroustrup

Answer

Bjarne Stroustrup

15. Which operator has the lowest precedence?

  • Size
  • Urinary
  • Assignment
  • Comma

Answer

Assignment

16. The ternary operator operates on how many operands?

  • 1
  • 2
  • 3
  • 4

Answer

3

17. An instance of a class is called…….

  • private
  • object
  • public
  • None of the above

Answer

object

18. Which of the following library function below by default aborts the Program.

  • end ( )
  • terminate ( )
  • abort ( )
  • exit ( )

Answer

exit ( )

19. The individual elements in an array are called

  • encrypted
  • Decrypted
  • Subscripted
  • Identifier

Answer

Subscripted

20. The default access level assigned to members of the class is.

  • Private
  • Public
  • Protected
  • None of these

Answer

Private

Read More

Chapter 17 शिरीष के फूल | class 12th | mcqs for Hindi Aroh

शिरीष के फूल Class 12 Hindi Aroh MCQ


Q1. लेखक ने शिरीष की तुलना किसके साथ की है?
A.भिखारी के साथ✗
B.अवधूत के साथ✓
C.साधु के साथ✗
D.गृहस्थ के साथ✗
Ans: अवधूत के साथ


Q2. ‘शिरीष के फूल’ के रचयिता का क्या नाम है?
A.डॉ० नगेन्द्र✗
B.रामवृक्ष बेनीपुरी✗
C.उदय शंकरभट्ट✗
D.आचार्य हजारी प्रसाद द्विवेदी✓
Ans: आचार्य हजारी प्रसाद द्विवेदी


Q3. आरग्वध किस पेड़ का नाम है?
A.आम का✗
B.नीम का✗
C.अमलतास का✓
D.शिरीष का✗
Ans: अमलतास का


Q4. अमलतास कितने दिनों के लिए फूलता है?
A.15-20 दिन✓
B.1-2 महीने✗
C.2 सप्ताह✗
D.4 सप्ताह✗
Ans: 15-20 दिन


Q5. किस ऋतु के आने पर शिरीष लहक उठता है?
A.शीत ऋतु✗
B.शिरीष ऋतु✗
C.वसंत ऋतु✓
D.वर्षा ऋतु✗
Ans: वसंत ऋतु


Q6. किस महीने तक शिरीष के फूल मस्त बने रहते हैं?
A.चैत्र✗
B.वैसाख✗
C.ज्येष्ठ✗
D.आषाढ़✓
Ans: आषाढ़


Q7. शिरीष की डालें कैसी होती हैं?
A.कमजोर✓
B.मजबूत✗
C.मोटी✗
D.पतली✗
Ans: कमजोर


Q8. द्विवेदी जी ने ‘शिरीष के फूल’ नामक पाठक में संस्कृत के किस महान कवि का उल्लेख किया है ?
A.बाणभट्ट✗
B.भवभूति✗
C.कालिदास✓
D.भास✗
Ans: कालिदास


Q9. “धरा को प्रमान यही तुलसी जो फरा सो झरा, जो बरा सो बुताना” कथन किस कवि का है?
A.कबीरदास✗
B.सूरदास✗
C.तुलसीदास✓
D.बिहारी✗
Ans: तुलसीदास


Q10. कौन सपासप कोड़े चला रहा है?
A.रावण✗
B.अत्याचारी राजा✗
C.ब्रह्मा✗
D.महाकाल देवता✓
Ans: महाकाल देवता


Q11. शिरीष का वृक्ष कहाँ से अपना रस खींचता है ?

A.पानी से✗
B.मिट्टी से✗
C.वायुमंडल से✓
D.खाद से✗
Ans: वायुमंडल से


Q12. ‘मेघदूत’ किस कवि की रचना है?
A.कालिदास✓
B.व्यास✗
C.वाल्मीकि✗
D.भवभूति✗
Ans: कालिदास

Read More

Chapter 15 चार्ली चैप्लिन यानी हम सब | class 12th | mcqs for Hindi Aroh

चार्ली चैप्लिन यानी हम सब Class 12 Hindi Aroh MCQ


Q1. देवानंद ने चार्ली का अनुकरण करते हुए किन फ़िल्मों में अभिनय किया?
A.गाइड और हरे रामा हरे कृष्णा✗
B.नौ दो ग्यारह और तीन देवियाँ✓
C.ज्यूल थीफ और जुआरी✗
D.गैम्बलर और जॉनी मेरा नाम✗
Ans: नौ दो ग्यारह और तीन देवियाँ


Q2. चार्ली की फ़िल्मों की प्रमुख विशेषता क्या है?
A.विदेशी न लगना✓
B.विदेशी लगना✗
C.पागल दिखना✗
D.बुद्धिमान दिखना✗
Ans: विदेशी न लगना


Q3. भारत में स्वयं पर हँसने की परंपरा किस पर्व में देखी जा सकती है?
A.होली✓
B.दीवाली✗
C.दशहरा✗
D.शिवरात्रि✗
Ans: होली


Q4. चार्ली किस भारतीय साहित्यकार के अधिक नज़दीक हैं?
A.यशपाल✗
B.जयशंकर प्रसाद✗
C.प्रेमचन्द✓
D.अमृतलाल नागर✗
Ans: प्रेमचन्द


Q5. किन दो महान भारतीयों ने चार्ली का सान्निध्य चाहा था?
A.लाल बहादुर शास्त्री और इंदिरा गांधी✗
B.सरदार पटेल और सुभाष चंद बोस✗
C.लोकमान्य तिलक और भगत सिंह✗
D.जवाहर लाल नेहरू और महात्मा गांधी✓
Ans: जवाहर लाल नेहरू और महात्मा गांधी


Q6. चार्ली चैप्लिन यानी हम सब’ के लेखक का क्या नाम है?
A.विष्णु खरे✓
B.हज़ारी प्रसाद द्विवेदी✗
C.विष्णु प्रभाकर✗
D.महादेवी वर्मा✗
Ans: विष्णु खरे


Q7. ‘मेकिंग ए लिविंग’ फिल्म को बने हुए कितने साल हो चुके हैं?
A.50 साल✗
B.60 साल✗
C.75 साल✓
D.80 साल✗
Ans: 75 साल


Q8. चार्ली ने अपनी फिल्मों में किन दो रसों का मिश्रण किया है?
A.वीर रस और रौद्र✗
B.श्रृंगार रस और वीर रस✗
C.हास्य रस और वीभत्स रस✗
D.करुण रस और हास्य रस✓
Ans: करुण रस और हास्य रस


Q9. लेखक के विचारानुसार आने वाले कितने वर्षों तक चार्ली के नाम का मूल्यांकन होता रहेगा?
A.पचास वर्षों तक✓
B.पच्चीस वर्षों तक✗
C.साठ वर्षों तक✗
D.चालीस वर्षों तक✗
Ans: पचास वर्षों तक


Q10. चार्ली की फ़िल्में किस पर आधारित हैं?
A.कल्पना पर✗
B.यथार्थ पर✗
C.भावनाओं पर✓
D.विचारों पर✗
Ans: भावनाओं पर


Q11. चार्ली की जो फ़िल्में हमें अलग प्रकार की भावनाओं का एहसास कराती हैं, उनमें से दो के नाम लिखिए।
A.रेल ऑफ़ सिटी और छिविटेड✗
B.मेट्रोपोलिस और द रोवंथ सील✓
C.वीक एण्ड तथा सन्डे✗
D.पोटिक्स और कोमेक्स✗
Ans: मेट्रोपोलिस और द रोवंथ सील


Q12. चार्ली की माँ किस प्रकार की नारी थी?
A.परित्यक्ता✓
B.विदूषी✗
C.लोकप्रिय अभिनेत्री✗
D.नौकरी पेशा✗
Ans: परित्यक्ता


Q13. चार्ली की माँ किस प्रकार की अभिनेत्री थी?
A.लोकप्रिय✗
B.सामान्य✓
C.सर्वश्रेष्ठ✗
D.घटिया✗
Ans: सामान्य


Q14. परिस्थितियों ने चार्ली को किस प्रकार का चरित्र बना दिया?
A.घुमंतू✓
B.अमीर✗
C.गरीब✗
D.शिक्षित✗
Ans: घुमंतू


Q15. चार्ली को किससे संघर्ष करना पड़ा?
A.राजाओं से✗
B.नेताओं से✗
C.फ़िल्म निर्माताओं से✗
D.जटिल परिस्थितियों से✓
Ans: जटिल परिस्थितियों से

Read More