JAC Board Class 12th Computer Science MCQS 500+ Chapter Wise
Here (MCQs) for Class 12 Computer Science (JAC Board) based on Chapter 1: C++ Revision Tour:-
---
1. Which of the following is a valid C++ identifier?
a) 1variable
b) _variable
c) variable#name
d) variable-name
Answer: b) _variable
---
2. Which of the following is a keyword in C++?
a) function
b) main
c) int
d) include
Answer: c) int
---
3. Which operator is used for dynamic memory allocation in C++?
a) malloc
b) new
c) allocate
d) create
Answer: b) new
---
4. What is the size of an int in C++ (typically on a 32-bit system)?
a) 2 bytes
b) 4 bytes
c) 8 bytes
d) 16 bytes
Answer: b) 4 bytes
---
5. What is the default return type of the main() function in C++?
a) void
b) int
c) float
d) char
Answer: b) int
---
6. Which of the following is not a data type in C++?
a) float
b) int
c) double
d) real
Answer: d) real
---
7. What does the ‘cout’ object do in C++?
a) Takes input
b) Displays output
c) Stores values
d) None of the above
Answer: b) Displays output
---
8. Which header file is required for ‘cin’ and ‘cout’?
a) stdlib.h
b) iostream
c) conio.h
d) cstdio
Answer: b) iostream
---
9. Which of the following is a correct syntax for comments in C++?
a) /* comment */
b) // comment
c) # comment
d) Both a and b
Answer: d) Both a and b
---
10. What is the purpose of a ‘namespace’ in C++?
a) To group related functions
b) To prevent name conflicts
c) To define a new data type
d) To handle exceptions
Answer: b) To prevent name conflicts
---
11. Which keyword is used to declare a constant variable?
a) const
b) static
c) define
d) final
Answer: a) const
---
12. Which of the following is an example of a loop in C++?
a) for
b) while
c) do-while
d) All of the above
Answer: d) All of the above
---
13. How is a class declared in C++?
a) class { };
b) struct { };
c) class ClassName { };
d) define ClassName { };
Answer: c) class ClassName { };
---
14. Which of the following access specifiers allows members to be accessed only within the same class?
a) public
b) private
c) protected
d) static
Answer: b) private
---
15. Which operator is used to access members of a class using an object?
a) . (dot)
b) -> (arrow)
c) * (asterisk)
d) & (ampersand)
Answer: a) . (dot)
---
16. What is the purpose of a destructor in C++?
a) Allocate memory
b) Initialize an object
c) Free memory
d) Overload operators
Answer: c) Free memory
---
17. Which keyword is used for function overloading?
a) overload
b) func
c) new
d) None of the above
Answer: d) None of the above
---
18. What is the output of 5 / 2 in C++ (integer division)?
a) 2.5
b) 2
c) 3
d) 5
Answer: b) 2
---
19. Which of the following is used to define a pointer in C++?
a) * (asterisk)
b) & (ampersand)
c) -> (arrow)
d) $ (dollar sign)
Answer: a) * (asterisk)
---
20. What is the keyword used to declare an inline function?
a) inline
b) function
c) define
d) static
Answer: a) inline
---
21. What is the purpose of the ‘this’ pointer in C++?
a) To refer to the current object
b) To pass arguments to a function
c) To call another function
d) None of the above
Answer: a) To refer to the current object
---
22. How many types of inheritance are there in C++?
a) 2
b) 3
c) 4
d) 5
Answer: d) 5
---
23. What does the ‘friend’ keyword do?
a) Grants access to private members
b) Creates a new class
c) Overloads an operator
d) None of the above
Answer: a) Grants access to private members
---
24. What is function overriding?
a) A function with different names but the same parameters
b) A function with the same name and parameters in a derived class
c) A function with multiple definitions
d) None of the above
Answer: b) A function with the same name and parameters in a derived class
---
25. What is the purpose of the ‘virtual’ keyword in C++?
a) Enables dynamic polymorphism
b) Declares an abstract class
c) Overloads a function
d) None of the above
Answer: a) Enables dynamic polymorphism
---
Here are multiple-choice questions (MCQs) for Class 12 Computer Science (JAC Board) based on Chapter 2: Object-Oriented Programming (OOP) in C++.
---
1. Which of the following is not a feature of Object-Oriented Programming?
a) Encapsulation
b) Polymorphism
c) Structured programming
d) Inheritance
Answer: c) Structured programming
---
2. What is the main purpose of Object-Oriented Programming?
a) To improve code efficiency
b) To structure the code logically
c) To model real-world entities
d) All of the above
Answer: d) All of the above
---
3. Which of the following best defines Encapsulation?
a) Hiding data from unauthorized access
b) Creating new classes
c) Reusing existing code
d) Writing efficient loops
Answer: a) Hiding data from unauthorized access
---
4. Which OOP feature allows multiple functions to have the same name but different parameters?
a) Abstraction
b) Polymorphism
c) Encapsulation
d) Inheritance
Answer: b) Polymorphism
---
5. What is Inheritance in C++?
a) A class borrowing properties of another class
b) A class having multiple objects
c) A class hiding its data
d) A function calling itself
Answer: a) A class borrowing properties of another class
---
6. Which access specifier allows members to be accessed outside the class?
a) private
b) protected
c) public
d) internal
Answer: c) public
---
7. Which keyword is used to create a class in C++?
a) object
b) class
c) struct
d) define
Answer: b) class
---
8. What is an object in C++?
a) A function inside a class
b) A variable that holds data
c) An instance of a class
d) A type of constructor
Answer: c) An instance of a class
---
9. Which function is called automatically when an object is created?
a) Destructor
b) Constructor
c) Inline function
d) Friend function
Answer: b) Constructor
---
10. What is the purpose of a destructor in C++?
a) To allocate memory
b) To initialize an object
c) To free memory
d) To overload operators
Answer: c) To free memory
---
11. Which of the following is a valid class definition in C++?
a) class Car { };
b) class Car() { };
c) define Car { };
d) new class Car { };
Answer: a) class Car { };
---
12. How many types of inheritance are there in C++?
a) 2
b) 3
c) 4
d) 5
Answer: d) 5
---
13. What is the purpose of a friend function in C++?
a) To access private members of a class
b) To create multiple objects
c) To inherit a class
d) To allocate memory dynamically
Answer: a) To access private members of a class
---
14. Which of the following is an example of compile-time polymorphism?
a) Function overloading
b) Operator overloading
c) Method overriding
d) Both a and b
Answer: d) Both a and b
---
15. What is abstraction in C++?
a) Hiding the implementation details
b) Making the code complex
c) Storing multiple values in an array
d) Overloading operators
Answer: a) Hiding the implementation details
---
16. What is dynamic binding in C++?
a) Function call resolved at runtime
b) Function call resolved at compile time
c) Allocating memory dynamically
d) None of the above
Answer: a) Function call resolved at runtime
---
17. Which operator is used to define a pointer in C++?
a) &
b) *
c) ->
d) $
Answer: b) *
---
18. Which function is executed when an object goes out of scope?
a) Constructor
b) Destructor
c) Virtual function
d) Friend function
Answer: b) Destructor
---
19. Which type of function cannot be overridden?
a) Virtual function
b) Friend function
c) Static function
d) Inline function
Answer: c) Static function
---
20. What does the ‘this’ pointer refer to in C++?
a) The current function
b) The current class
c) The current object
d) The base class
Answer: c) The current object
---
21. What is hybrid inheritance?
a) A combination of multiple and hierarchical inheritance
b) A combination of single and multiple inheritance
c) A combination of private and public inheritance
d) A combination of class and struct
Answer: a) A combination of multiple and hierarchical inheritance
---
22. What does an abstract class contain?
a) Only private members
b) Only virtual functions
c) At least one pure virtual function
d) Only constructors
Answer: c) At least one pure virtual function
---
23. What is function overloading in C++?
a) Creating multiple functions with the same name but different parameters
b) Creating multiple functions with the same name and parameters
c) Overloading the main() function
d) None of the above
Answer: a) Creating multiple functions with the same name but different parameters
---
24. What is function overriding?
a) Defining a function with the same name and parameters in a derived class
b) Defining multiple functions with the same name but different parameters
c) Defining a function outside the class
d) None of the above
Answer: a) Defining a function with the same name and parameters in a derived class
---
25. What does a pure virtual function mean in C++?
a) A function with no body
b) A function that is private
c) A function that is static
d) A function that is overloaded
Answer: a) A function with no body
---
Here are multiple-choice questions (MCQs) for Class 12 Computer Science (JAC Board) based on Chapter 3: Function Overloading:
---
1. What is function overloading in C++?
a) Defining multiple functions with the same name but different parameters
b) Defining a function with the same name and parameters
c) Defining a function outside the class
d) None of the above
Answer: a) Defining multiple functions with the same name but different parameters
---
2. Which of the following is true about function overloading?
a) It is possible to have multiple functions with the same name and same parameters
b) Function overloading can be done by changing the return type of the function only
c) Function overloading is based on the number or type of parameters
d) Function overloading cannot be done in C++
Answer: c) Function overloading is based on the number or type of parameters
---
3. In function overloading, which of the following is used to differentiate the functions?
a) Return type
b) Function name
c) Number or type of arguments
d) Function body
Answer: c) Number or type of arguments
---
4. Can you overload a function by changing the return type in C++?
a) Yes, return type can be changed
b) No, only parameters can be changed
c) Yes, but only if the function name is changed
d) None of the above
Answer: b) No, only parameters can be changed
---
5. What will happen if two overloaded functions in C++ have the same number and types of parameters but differ in return type?
a) The compiler will choose which one to call
b) Compilation error
c) The function with the highest return type will be called
d) The function with the lowest return type will be called
Answer: b) Compilation error
---
6. Which of the following is a correct example of function overloading?
a) int add(int a, int b); and double add(int a, int b);
b) int add(int a, int b); and void add(int a, int b);
c) int add(int a, int b); and int add(int a, int b, int c);
d) Both a and c
Answer: d) Both a and c
---
7. Which of the following is an example of function overloading in C++?
a) int add(int a, int b); and int add(int a, int b, int c);
b) void print(int x); and void print(char x);
c) float multiply(float a, float b); and int multiply(int a, int b);
d) All of the above
Answer: d) All of the above
---
8. Which of the following can be used to differentiate overloaded functions?
a) Return type
b) Function name
c) Number and type of arguments
d) Function name and return type
Answer: c) Number and type of arguments
---
9. What is the main advantage of function overloading in C++?
a) It allows multiple functions to be written with the same name
b) It avoids the need to write different names for similar operations
c) It simplifies code maintenance and improves code readability
d) All of the above
Answer: d) All of the above
---
10. In function overloading, what does the compiler use to determine which function to call?
a) Function name
b) Function body
c) Parameters (type, number, or order)
d) Return type
Answer: c) Parameters (type, number, or order)
---
11. Which of the following is an incorrect example of function overloading?
a) int add(int a, int b) and double add(double a, double b)
b) int add(int a, int b) and int add(int a, int b)
c) void display(int a) and void display(int b)
d) int multiply(int a, int b) and int multiply(int a, int b, int c)
Answer: b) int add(int a, int b) and int add(int a, int b)
---
12. Which statement is true about function overloading in C++?
a) It is possible to have two functions with the same name but different return types.
b) Function overloading is possible only if functions have different names.
c) Function overloading is based on the number and/or type of parameters.
d) Function overloading is not supported in C++.
Answer: c) Function overloading is based on the number and/or type of parameters.
---
13. Can constructors be overloaded in C++?
a) Yes, constructors can be overloaded.
b) No, constructors cannot be overloaded.
c) Constructors can only be overloaded if they are static.
d) Constructors can only be overloaded if they are private.
Answer: a) Yes, constructors can be overloaded.
---
14. What is the return type of overloaded functions in C++?
a) The return type can be different for each overloaded function.
b) The return type must be the same for all overloaded functions.
c) The return type must be void for all overloaded functions.
d) The return type is never used in overloaded functions.
Answer: a) The return type can be different for each overloaded function.
---
15. Which of the following is not a valid way to overload a function in C++?
a) By changing the number of parameters
b) By changing the type of parameters
c) By changing the order of parameters
d) By changing the return type of the function
Answer: d) By changing the return type of the function
---
16. What is the output of the following code?
#include <iostream>
using namespace std;
void display(int x) {
cout << "Integer: " << x << endl;
}
void display(double x) {
cout << "Double: " << x << endl;
}
int main() {
display(5);
display(5.5);
return 0;
}
a) Integer: 5, Double: 5.5
b) Integer: 5
c) Double: 5.5
d) Compilation error
Answer: a) Integer: 5, Double: 5.5
---
17. Which type of function overloading is implemented in the following code?
void add(int a, int b) { cout << a + b; }
void add(double a, double b) { cout << a + b; }
a) By number of arguments
b) By type of arguments
c) By both number and type of arguments
d) Both a and b
Answer: d) Both a and b
---
18. What is the output of the following code?
#include <iostream>
using namespace std;
void sum(int a, int b) {
cout << "Sum of integers: " << a + b << endl;
}
void sum(float a, float b) {
cout << "Sum of floats: " << a + b << endl;
}
int main() {
sum(10, 20);
sum(10.5, 20.5);
return 0;
}
a) Sum of integers: 30, Sum of floats: 31
b) Sum of integers: 30
c) Sum of floats: 31
d) Compilation error
Answer: a) Sum of integers: 30, Sum of floats: 31
---
19. Which of the following statements is true regarding function overloading?
a) Overloading is resolved at runtime.
b) Overloading is resolved at compile time.
c) Function overloading is not possible in C++.
d) Function overloading only works with member functions.
Answer: b) Overloading is resolved at compile time.
---
20. Which of the following will overload a function correctly in C++?
a) Changing the function name
b) Changing the function body
c) Changing the function's parameters (number or type)
d) Changing the function's return type
Answer: c) Changing the function's parameters (number or type)
---
Here are 50 multiple-choice questions (MCQs) for Class 12 Computer Science (JAC Board) based on Chapter 4: Class and Object:
---
1. What is a class in C++?
a) A function
b) A template for creating objects
c) A keyword in C++
d) A type of array
Answer: b) A template for creating objects
---
2. What is an object in C++?
a) A function
b) A data member of a class
c) An instance of a class
d) A pointer
Answer: c) An instance of a class
---
3. Which of the following is used to define a class in C++?
a) object
b) class
c) struct
d) function
Answer: b) class
---
4. Which of the following is true about data members of a class?
a) They are always public by default
b) They are always private by default
c) They are always static by default
d) They are always protected by default
Answer: b) They are always private by default
---
5. Which keyword is used to create an object of a class?
a) new
b) object
c) create
d) class
Answer: a) new
---
6. What is the purpose of a constructor in C++?
a) To initialize objects
b) To destroy objects
c) To create member functions
d) To create a new class
Answer: a) To initialize objects
---
7. Which of the following is correct for a constructor?
a) It does not have any return type
b) It has a return type of void
c) It must return an integer value
d) It is called only once during object creation
Answer: a) It does not have any return type
---
8. What is the purpose of a destructor in C++?
a) To initialize the object
b) To delete or clean up memory used by the object
c) To access the private members of the class
d) To create member functions
Answer: b) To delete or clean up memory used by the object
---
9. What will be the output of the following code?
class Test {
int a;
public:
Test() { a = 10; }
void display() { cout << a; }
};
int main() {
Test obj;
obj.display();
return 0;
}
a) 10
b) 0
c) Error
d) Undefined output
Answer: a) 10
---
10. What is the default visibility of members of a class in C++?
a) public
b) private
c) protected
d) None of the above
Answer: b) private
---
11. Which operator is used to access the members of a class using an object?
a) . (dot)
b) -> (arrow)
c) & (ampersand)
d) * (asterisk)
Answer: a) . (dot)
---
12. Which of the following is the correct way to declare a class in C++?
a) class ClassName { };
b) class { ClassName };
c) class { };
d) ClassName class { };
Answer: a) class ClassName { };
---
13. Which of the following is used to define a constructor?
a) void ClassName() { }
b) ClassName() { }
c) void ClassName(int a) { }
d) ClassName(int a) { }
Answer: b) ClassName() { }
---
14. Can a constructor be overloaded in C++?
a) Yes
b) No
c) Only if it is a parameterized constructor
d) Only if it is a default constructor
Answer: a) Yes
---
15. Which of the following statements is correct about destructors in C++?
a) A destructor has the same name as the class but with a tilde (~) prefix
b) A destructor is used to initialize the object
c) A destructor cannot take arguments
d) Both a and c
Answer: d) Both a and c
---
16. Which of the following is correct for destructors in C++?
a) A class can have multiple destructors
b) A destructor is called when an object goes out of scope
c) Destructors must return a value
d) Destructors can be overloaded
Answer: b) A destructor is called when an object goes out of scope
---
17. How can we access private members of a class in C++?
a) Using a constructor
b) Using a public member function
c) Directly accessing them from main
d) Using a friend function
Answer: b) Using a public member function
---
18. What will happen if a constructor is not defined in a C++ class?
a) A default constructor will be provided by the compiler
b) The program will throw an error
c) The program will not compile
d) A destructor will be created instead
Answer: a) A default constructor will be provided by the compiler
---
19. Which type of constructor is called when no arguments are passed to it?
a) Default constructor
b) Parameterized constructor
c) Copy constructor
d) Virtual constructor
Answer: a) Default constructor
---
20. What does the term 'this' pointer refer to in C++?
a) The current object
b) The base class
c) The current function
d) The current class
Answer: a) The current object
---
21. Can a constructor call another constructor in the same class?
a) Yes, using constructor overloading
b) Yes, using constructor delegation
c) No, it is not possible
d) Yes, but only with the same parameters
Answer: b) Yes, using constructor delegation
---
22. Which of the following will cause an error in C++?
a) Declaring a constructor as private
b) Declaring a destructor as public
c) Declaring a class without a constructor
d) Declaring a constructor with a return type
Answer: d) Declaring a constructor with a return type
---
23. What is the use of the new operator in C++?
a) To initialize an object
b) To delete an object
c) To allocate memory dynamically
d) To access a private member of a class
Answer: c) To allocate memory dynamically
---
24. How is memory released for an object created using new in C++?
a) By using the delete operator
b) By using the free() function
c) By using the dispose function
d) By using the null function
Answer: a) By using the delete operator
---
25. What will be the output of the following code?
class Person {
public:
Person() { cout << "Constructor called"; }
};
int main() {
Person p1;
return 0;
}
a) Constructor called
b) Error
c) Undefined behavior
d) No output
Answer: a) Constructor called
---
26. Which of the following is not a valid class member in C++?
a) Data members
b) Member functions
c) Static members
d) Function declarations outside the class
Answer: d) Function declarations outside the class
---
27. How can a class member be made private in C++?
a) By using the private keyword
b) By using the protected keyword
c) By using the public keyword
d) By using the static keyword
Answer: a) By using the private keyword
---
28. What happens if an object of a class is created without using a constructor in C++?
a) The program will give an error
b) A default constructor will be used if one is available
c) The object will not be created
d) It will create a random object
Answer: b) A default constructor will be used if one is available
---
29. What is the purpose of a member function in a class?
a) To define the properties of the class
b) To initialize the object of the class
c) To perform operations on the data members of the class
d) To define the structure of the class
Answer: c) To perform operations on the data members of the class
---
30. Which of the following is true about a class constructor in C++?
a) It must have a return type
b) It is automatically called when an object is created
c) It can have any name
d) It is not called when the object is created
Answer: b) It is automatically called when an object is created
---
Here are 50 multiple-choice questions (MCQs) for Class 12 Computer Science (JAC Board) based on Chapter 5: Constructor and Destructor:
---
1. What is the purpose of a constructor in C++?
a) To initialize the object
b) To destroy the object
c) To access private members
d) To create new data members
Answer: a) To initialize the object
---
2. What is the return type of a constructor?
a) void
b) int
c) No return type
d) Any valid type
Answer: c) No return type
---
3. Which of the following is true about the constructor?
a) A constructor can have a return type
b) A constructor is called automatically when an object is created
c) A constructor is not necessary in every class
d) A constructor can be private only
Answer: b) A constructor is called automatically when an object is created
---
4. A constructor with no parameters is called a(n):
a) Parameterized constructor
b) Default constructor
c) Copy constructor
d) Friend constructor
Answer: b) Default constructor
---
5. Which of the following is true about a parameterized constructor?
a) It has no parameters
b) It must be explicitly called
c) It is automatically called when an object is created
d) It cannot have any return type
Answer: b) It must be explicitly called
---
6. Can a constructor be overloaded in C++?
a) Yes, constructors can be overloaded
b) No, constructors cannot be overloaded
c) Only default constructors can be overloaded
d) Only parameterized constructors can be overloaded
Answer: a) Yes, constructors can be overloaded
---
7. Which of the following is true about the destructor in C++?
a) A destructor has a return type
b) A destructor can have parameters
c) A destructor is used to initialize an object
d) A destructor is automatically called when an object goes out of scope
Answer: d) A destructor is automatically called when an object goes out of scope
---
8. The name of the destructor is the same as the class name, but it is prefixed with which symbol?
a) @
b) *
c) ~
d) #
Answer: c) ~
---
9. Can a destructor be overloaded in C++?
a) Yes, destructors can be overloaded
b) No, destructors cannot be overloaded
c) Only parameterized destructors can be overloaded
d) Destructors can be overloaded but only in derived classes
Answer: b) No, destructors cannot be overloaded
---
10. Which of the following is a correct statement about a constructor?
a) A constructor can be called explicitly
b) A constructor is called when an object goes out of scope
c) A constructor can be inherited
d) A constructor must return a value
Answer: a) A constructor can be called explicitly
---
11. What is the default constructor of a class in C++?
a) A constructor with no parameters
b) A constructor with parameters
c) A constructor with default values
d) A constructor with a return type
Answer: a) A constructor with no parameters
---
12. When does the destructor of an object get called in C++?
a) When the object is explicitly deleted
b) When the object is created
c) When the object goes out of scope
d) When the program ends
Answer: c) When the object goes out of scope
---
13. What happens if a class does not have a destructor defined?
a) The object will not be created
b) A default destructor will be generated by the compiler
c) The class will not compile
d) An error will be generated
Answer: b) A default destructor will be generated by the compiler
---
14. Which of the following is correct about the copy constructor?
a) It initializes a new object as a copy of another object
b) It is called when an object is initialized with values
c) It can be called explicitly by the user
d) It is used to destroy an object
Answer: a) It initializes a new object as a copy of another object
---
15. What is the output of the following code?
class Person {
public:
Person() { cout << "Constructor called"; }
~Person() { cout << "Destructor called"; }
};
int main() {
Person p;
return 0;
}
a) Constructor called Destructor called
b) Destructor called Constructor called
c) Constructor called
d) Destructor called
Answer: a) Constructor called Destructor called
---
16. What is the role of the delete operator in C++?
a) To deallocate memory allocated by new
b) To destroy the object created by a constructor
c) To delete the class definition
d) To call the destructor explicitly
Answer: a) To deallocate memory allocated by new
---
17. Which of the following statements is true for a destructor?
a) A destructor can have parameters
b) A destructor is called manually
c) A destructor can be overloaded
d) A destructor does not return any value
Answer: d) A destructor does not return any value
---
18. Which of the following statements about constructors is false?
a) Constructors can be overloaded
b) Constructors must be called explicitly
c) A class can have multiple constructors
d) Constructors are called automatically when an object is created
Answer: b) Constructors must be called explicitly
---
19. In C++, a constructor is called automatically when:
a) A class is declared
b) An object is created
c) A destructor is invoked
d) A function is invoked
Answer: b) An object is created
---
20. What will be the output of the following code?
class Sample {
public:
Sample() { cout << "Constructor"; }
~Sample() { cout << "Destructor"; }
};
int main() {
Sample s1, s2;
return 0;
}
a) Constructor Destructor Constructor Destructor
b) Constructor Constructor Destructor Destructor
c) Constructor Destructor
d) Destructor Destructor
Answer: b) Constructor Constructor Destructor Destructor
---
21. Which of the following is the correct syntax for a default constructor in C++?
a) void ClassName() { }
b) ClassName() { }
c) ClassName() { return 0; }
d) void ClassName() : return 0;
Answer: b) ClassName() { }
---
22. What is the purpose of the new operator in the context of constructors?
a) It creates a new class
b) It allocates memory dynamically for an object
c) It initializes an object
d) It calls the destructor
Answer: b) It allocates memory dynamically for an object
---
23. What will happen if you do not define a constructor in a C++ class?
a) The object will not be created
b) The class will not compile
c) A default constructor will be automatically provided
d) An error will occur at runtime
Answer: c) A default constructor will be automatically provided
---
24. Can a constructor be declared as private in C++?
a) Yes, to restrict object creation
b) No, constructors must always be public
c) Yes, but only if there is a destructor
d) No, constructors cannot be private
Answer: a) Yes, to restrict object creation
---
25. Can a constructor return a value?
a) Yes, constructors can return values
b) No, constructors cannot return values
c) Yes, but only of type void
d) Yes, only for default constructors
Answer: b) No, constructors cannot return values
---
26. Which of the following is the correct syntax for a destructor?
a) ~ClassName() { }
b) ClassName~() { }
c) ~ClassName(void) { }
d) ClassName(void)~ { }
Answer: a) ~ClassName() { }
---
27. Which of the following is not true about a constructor in C++?
a) It initializes the data members of the class
b) It cannot return any value
c) It is called automatically when an object is created
d) It must always be parameterized
Answer: d) It must always be parameterized
---
28. Which of the following is used to create an object dynamically in C++?
a) new
b) malloc()
c) new[]
d) Both a and c
Answer: d) Both a and c
---
29. When an object is created, the constructor is called:
a) Before the class definition
b) Before the destructor
c) After the destructor
d) When the object is created
Answer: d) When the object is created
---
30. What is the correct way to define a constructor for a class in C++?
a) void ClassName(int x)
b) int ClassName()
c) ClassName(int x)
d) ClassName(int x) {}
Answer: c) ClassName(int x)
---
Here are 50 multiple-choice questions (MCQs) for Class 12 Computer Science (JAC Board) based on Chapter 6: Inheritance:
---
1. What is inheritance in C++?
a) Creating a class
b) Reusing the properties and behaviors of another class
c) Deleting a class
d) Accessing private members of a class
Answer: b) Reusing the properties and behaviors of another class
---
2. What is the base class in inheritance?
a) The class that inherits the properties
b) The class from which properties are inherited
c) The class with private members
d) The class with static members
Answer: b) The class from which properties are inherited
---
3. What is the derived class in inheritance?
a) The class that inherits the properties
b) The class from which properties are inherited
c) The class with static members
d) The class with constructors
Answer: a) The class that inherits the properties
---
4. Which keyword is used to inherit a class in C++?
a) extends
b) implements
c) inherits
d) : (colon)
Answer: d) : (colon)
---
5. Which of the following is an example of single inheritance?
a) A class inheriting multiple classes
b) A class inheriting from one base class
c) A class inheriting from no base class
d) A class using virtual inheritance
Answer: b) A class inheriting from one base class
---
6. Which of the following is an example of multiple inheritance?
a) A class inheriting from one base class
b) A class inheriting from two or more base classes
c) A class using constructor overloading
d) A class with static members
Answer: b) A class inheriting from two or more base classes
---
7. What is the purpose of the public access specifier in inheritance?
a) It restricts access to class members
b) It allows access to base class members from the derived class
c) It makes members of the base class private
d) It creates a private inheritance
Answer: b) It allows access to base class members from the derived class
---
8. In which type of inheritance are base class members inherited by derived class members as private members?
a) Public inheritance
b) Private inheritance
c) Protected inheritance
d) Multiple inheritance
Answer: b) Private inheritance
---
9. What is the default inheritance mode in C++ if no access specifier is mentioned?
a) Public
b) Private
c) Protected
d) Public or Protected
Answer: b) Private
---
10. What is the difference between public and private inheritance?
a) In private inheritance, base class members are public in the derived class
b) In public inheritance, base class members are inherited as private
c) In private inheritance, base class members are inherited as private
d) There is no difference between public and private inheritance
Answer: c) In private inheritance, base class members are inherited as private
---
11. Which keyword is used to prevent a class from being inherited in C++?
a) virtual
b) friend
c) private
d) final
Answer: d) final
---
12. What is the purpose of a constructor in a derived class?
a) To initialize the base class members
b) To initialize derived class members
c) To initialize both base and derived class members
d) To destroy the object
Answer: c) To initialize both base and derived class members
---
13. How can a derived class call the constructor of the base class?
a) By using the base() function
b) By using the super() function
c) Using the initialization list
d) It is not possible
Answer: c) Using the initialization list
---
14. What happens if a base class constructor is not explicitly called in the derived class constructor?
a) It will result in a compilation error
b) The base class constructor will not be called automatically
c) The base class constructor will be called automatically
d) The derived class will not be able to create an object
Answer: c) The base class constructor will be called automatically
---
15. In C++, if a derived class has a constructor and a destructor, which one is called first when an object is created?
a) Destructor
b) Base class constructor
c) Derived class constructor
d) Base class destructor
Answer: c) Derived class constructor
---
16. Which of the following is a correct example of multi-level inheritance?
a) A class inherits from two or more base classes
b) A class inherits from another class, and that class inherits from another
c) A class has multiple classes with the same base
d) A class is inherited from a single base class
Answer: b) A class inherits from another class, and that class inherits from another
---
17. What will be the output of the following code?
class A {
public:
void display() { cout << "Class A"; }
};
class B : public A {
public:
void show() { cout << "Class B"; }
};
int main() {
B obj;
obj.display();
obj.show();
return 0;
}
a) Class A Class B
b) Class B Class A
c) Class A
d) Class B
Answer: a) Class A Class B
---
18. What is an example of hierarchical inheritance?
a) A class inherits from two classes
b) Multiple classes inherit from a single base class
c) A class inherits from another class, which in turn inherits from another class
d) A class does not inherit from any class
Answer: b) Multiple classes inherit from a single base class
---
19. What is the correct way to declare inheritance in C++?
a) class Derived : Base
b) class Derived inherits Base
c) class Derived extends Base
d) class Derived implements Base
Answer: a) class Derived : Base
---
20. Which of the following is a key feature of inheritance?
a) Reusability of code
b) Overloading
c) Data encapsulation
d) Destruction of objects
Answer: a) Reusability of code
---
21. What will happen if a class does not have any constructor in C++?
a) It will cause a runtime error
b) A default constructor will be provided by the compiler
c) The program will fail to compile
d) A copy constructor will be provided
Answer: b) A default constructor will be provided by the compiler
---
22. Can a derived class access private members of the base class directly?
a) Yes, always
b) No, the derived class cannot access private members directly
c) Yes, only if the base class is inherited as public
d) Yes, only if the base class has a constructor
Answer: b) No, the derived class cannot access private members directly
---
23. Which type of inheritance is C++ capable of?
a) Single
b) Multiple
c) Multi-level
d) All of the above
Answer: d) All of the above
---
24. What is the purpose of the virtual keyword in inheritance?
a) To make a base class constructor private
b) To allow method overriding in derived classes
c) To prevent inheritance
d) To prevent method overloading
Answer: b) To allow method overriding in derived classes
---
25. What is method overriding in inheritance?
a) Defining a new method in the derived class with the same name as in the base class
b) Calling the base class method inside the derived class
c) Calling the constructor of the derived class
d) Modifying the base class constructor
Answer: a) Defining a new method in the derived class with the same name as in the base class
---
26. How is method overriding achieved in C++?
a) By declaring the method as static in the base class
b) By using the virtual keyword in the base class method and overriding it in the derived class
c) By using the final keyword in the derived class method
d) By using the private keyword in the derived class method
Answer: b) By using the virtual keyword in the base class method and overriding it in the derived class
---
27. Which of the following inheritance types results in the derived class inheriting from two or more base classes?
a) Single inheritance
b) Multiple inheritance
c) Hierarchical inheritance
d) Multi-level inheritance
Answer: b) Multiple inheritance
---
28. What will be the output of the following code?
class Base {
public:
virtual void show() { cout << "Base class"; }
};
class Derived : public Base {
public:
void show() { cout << "Derived class"; }
};
int main() {
Base* b;
Derived d;
b = &d;
b->show();
return 0;
}
a) Base class
b) Derived class
c) Error
d) Undefined behavior
Answer: b) Derived class
---
29. Which of the following is true about constructor chaining in C++?
a) Constructor chaining is not allowed in C++
b) A constructor can call another constructor within the same class
c) A constructor can only call the base class constructor
d) Only the default constructor can be called using constructor chaining
Answer: b) A constructor can call another constructor within the same class
---
30. What is the output of the following code?
class A {
public:
void display() { cout << "Class A"; }
};
class B : public A {
public:
void display() { cout << "Class B"; }
};
int main() {
A* a;
B b;
a = &b;
a->display();
return 0;
}
a) Class A
b) Class B
c) Error
d) Undefined behavior
Answer: b) Class B
---
Here are 50 multiple-choice questions (MCQs) for Class 12 Computer Science (JAC Board) based on Chapter 7: Database and SQL:
---
1. What is a database?
a) A collection of related data
b) A type of computer memory
c) A programming language
d) A database management system
Answer: a) A collection of related data
---
2. What is DBMS?
a) Database Management System
b) Data Base Management Software
c) Data Block Management System
d) Database Basic Management Software
Answer: a) Database Management System
---
3. Which of the following is a popular DBMS?
a) C++
b) MySQL
c) Python
d) Java
Answer: b) MySQL
---
4. What is SQL?
a) Structured Query Language
b) Simple Query Language
c) Simple Syntax Language
d) Standard Query List
Answer: a) Structured Query Language
---
5. Which of the following operations can be performed using SQL?
a) Data retrieval
b) Data insertion
c) Data deletion
d) All of the above
Answer: d) All of the above
---
6. What is a primary key in a database?
a) A key used to access the data
b) A unique key used to identify a record in a table
c) A key used to encrypt data
d) A key used to relate two tables
Answer: b) A unique key used to identify a record in a table
---
7. What is a foreign key?
a) A key that uniquely identifies a record in a table
b) A key used to encrypt data
c) A key used to establish a relationship between two tables
d) A key used to retrieve data
Answer: c) A key used to establish a relationship between two tables
---
8. Which of the following commands is used to add data into a table?
a) INSERT
b) UPDATE
c) SELECT
d) DELETE
Answer: a) INSERT
---
9. Which SQL statement is used to retrieve data from a database?
a) GET
b) SELECT
c) EXTRACT
d) OPEN
Answer: b) SELECT
---
10. What does the SQL command DELETE do?
a) Deletes the entire database
b) Deletes a table
c) Deletes a row from a table
d) Deletes a column from a table
Answer: c) Deletes a row from a table
---
11. Which of the following is used to update data in a table in SQL?
a) INSERT
b) SELECT
c) UPDATE
d) DELETE
Answer: c) UPDATE
---
12. Which of the following SQL statements is used to create a new table?
a) NEW TABLE
b) CREATE TABLE
c) INSERT INTO
d) ALTER TABLE
Answer: b) CREATE TABLE
---
13. What is the purpose of the WHERE clause in SQL?
a) It is used to filter records based on a condition
b) It is used to sort records
c) It is used to select all records
d) It is used to group records
Answer: a) It is used to filter records based on a condition
---
14. Which of the following SQL clauses is used to sort the result set?
a) ORDER BY
b) SORT BY
c) GROUP BY
d) FILTER BY
Answer: a) ORDER BY
---
15. What is a relational database?
a) A database with a large amount of data
b) A database where data is organized into tables related to each other
c) A database with no relationships
d) A database used for storing images
Answer: b) A database where data is organized into tables related to each other
---
16. Which SQL command is used to modify an existing table?
a) CREATE TABLE
b) ALTER TABLE
c) UPDATE TABLE
d) MODIFY TABLE
Answer: b) ALTER TABLE
---
17. What is a "tuple" in the context of a database?
a) A column in a table
b) A record in a table
c) A field in a table
d) A type of database
Answer: b) A record in a table
---
18. Which of the following is not a valid SQL data type?
a) INT
b) VARCHAR
c) BLOB
d) IMAGE
Answer: d) IMAGE
---
19. Which of the following SQL operators is used to combine the result of two SELECT queries?
a) UNION
b) JOIN
c) MERGE
d) COMBINE
Answer: a) UNION
---
20. What is the purpose of the GROUP BY clause in SQL?
a) To group rows that have the same values
b) To filter rows
c) To join two tables
d) To sort rows
Answer: a) To group rows that have the same values
---
21. Which of the following SQL functions is used to calculate the total number of rows in a table?
a) COUNT()
b) SUM()
c) MAX()
d) AVG()
Answer: a) COUNT()
---
22. Which of the following SQL clauses is used to filter records based on a condition?
a) SELECT
b) ORDER BY
c) WHERE
d) GROUP BY
Answer: c) WHERE
---
23. What is normalization in database design?
a) A process of organizing data to reduce redundancy
b) A process of creating backup copies
c) A process of removing data from the database
d) A process of defining database constraints
Answer: a) A process of organizing data to reduce redundancy
---
24. What is the first normal form (1NF) in database normalization?
a) Data is organized in tables
b) Each column contains only atomic values
c) Each record has a primary key
d) All values are numeric
Answer: b) Each column contains only atomic values
---
25. What is the second normal form (2NF)?
a) All columns are in 1NF
b) Every non-prime attribute is fully dependent on the primary key
c) Every non-prime attribute is partially dependent on the primary key
d) Data is arranged in an organized form
Answer: b) Every non-prime attribute is fully dependent on the primary key
---
26. What does the DISTINCT keyword do in SQL?
a) Filters out duplicate rows in the result set
b) Sorts the result set
c) Groups rows with similar values
d) Deletes duplicate rows from the database
Answer: a) Filters out duplicate rows in the result set
---
27. What is a "view" in a database?
a) A table that can be used to view data
b) A temporary table created for specific queries
c) A pre-defined SQL query that is treated like a table
d) A new type of database
Answer: c) A pre-defined SQL query that is treated like a table
---
28. What is the SQL command used to remove a table from a database?
a) DROP TABLE
b) DELETE TABLE
c) REMOVE TABLE
d) REMOVE COLUMN
Answer: a) DROP TABLE
---
29. Which of the following is an aggregate function in SQL?
a) COUNT()
b) SELECT()
c) INSERT()
d) UPDATE()
Answer: a) COUNT()
---
30. What is a "primary key" used for in a table?
a) To ensure that every value in a column is unique
b) To encrypt data
c) To provide a shortcut to columns
d) To store large amounts of text data
Answer: a) To ensure that every value in a column is unique
---
31. What does the HAVING clause do in SQL?
a) Filters the result set based on a condition after grouping
b) Sorts the result set
c) Groups rows with similar values
d) Filters rows before grouping
Answer: a) Filters the result set based on a condition after grouping
---
32. Which of the following is used to define a relationship between tables?
a) Primary key
b) Foreign key
c) Index
d) View
Answer: b) Foreign key
---
33. Which SQL statement is used to remove all rows from a table without deleting the table itself?
a) REMOVE
b) DELETE
c) DROP
d) TRUNCATE
Answer: d) TRUNCATE
---
34. Which SQL clause is used to combine rows from two or more tables based on a related column?
a) JOIN
b) UNION
c) GROUP BY
d) SELECT
Answer: a) JOIN
---
35. What does the IN operator do in SQL?
a) Selects values that are not in a specified range
b) Compares the values in two columns
c) Selects rows that match any of the specified values
d) Selects rows that contain a specified number of characters
Answer: c) Selects rows that match any of the specified values
---
36. What is a "schema" in a database?
a) A backup copy of the database
b) A logical structure that defines the organization of data
c) A physical storage space for data
d) A file format for storing data
Answer: b) A logical structure that defines the organization of data
---
37. Which of the following SQL statements is used to update existing data in a table?
a) ALTER
b) INSERT
c) UPDATE
d) MODIFY
Answer: c) UPDATE
---
38. What is the SQL command used to rename a table?
a) ALTER TABLE
b) RENAME TABLE
c) MODIFY TABLE
d) UPDATE TABLE
Answer: b) RENAME TABLE
---
39. What is a "normalized" database?
a) A database that has no redundant data
b) A database with denormalized data
c) A database with non-atomic data
d) A database with unnecessary columns
Answer: a) A database that has no redundant data
_____
Here are 50 multiple-choice questions (MCQs) for Class 12 Computer Science (JAC Board) based on Chapter 8: Boolean Algebra:
---
1. What is Boolean Algebra?
a) A system of algebraic operations involving variables
b) A method for solving equations
c) A form of binary arithmetic
d) A type of computer programming
Answer: a) A system of algebraic operations involving variables
---
2. Which of the following is the fundamental operation in Boolean algebra?
a) Addition
b) Subtraction
c) Multiplication
d) AND, OR, NOT
Answer: d) AND, OR, NOT
---
3. In Boolean algebra, what does the symbol ‘+’ represent?
a) OR operation
b) AND operation
c) NOT operation
d) NOR operation
Answer: a) OR operation
---
4. What does the symbol ‘•’ represent in Boolean algebra?
a) OR operation
b) AND operation
c) NOT operation
d) XOR operation
Answer: b) AND operation
---
5. Which of the following is the identity law of Boolean algebra?
a) A + 0 = A
b) A • 0 = A
c) A + A = 0
d) A • A = 0
Answer: a) A + 0 = A
---
6. What is the complement of 0 in Boolean algebra?
a) 0
b) 1
c) A
d) A'
Answer: b) 1
---
7. Which of the following is an example of the idempotent law?
a) A + A = A
b) A + 0 = A
c) A • 1 = A
d) A • 0 = 0
Answer: a) A + A = A
---
8. What is the result of the expression A + A' in Boolean algebra?
a) 1
b) 0
c) A
d) A'
Answer: a) 1
---
9. What is the result of the expression A • A' in Boolean algebra?
a) 1
b) 0
c) A
d) A'
Answer: b) 0
---
10. Which of the following laws states that A + 1 = 1?
a) Identity law
b) Complement law
c) Dominance law
d) Idempotent law
Answer: c) Dominance law
---
11. What does the NOT operation do to a Boolean variable?
a) It inverts the value of the variable
b) It doubles the value of the variable
c) It adds 1 to the variable
d) It makes the variable true
Answer: a) It inverts the value of the variable
---
12. Which of the following is the correct expression for De Morgan’s Law?
a) (A + B)' = A' • B'
b) (A • B)' = A' + B'
c) (A + B)' = A' + B'
d) Both a and b
Answer: d) Both a and b
---
13. What is the Boolean expression for the AND operation?
a) A + B
b) A • B
c) A' + B
d) A' • B
Answer: b) A • B
---
14. Which of the following is an example of the commutative law of Boolean algebra?
a) A + B = B + A
b) A • B = A + B
c) A + 0 = A
d) A' + A = 1
Answer: a) A + B = B + A
---
15. What is the Boolean expression for the OR operation?
a) A + B
b) A • B
c) A' + B
d) A' • B
Answer: a) A + B
---
16. What is the result of the expression A • 1 in Boolean algebra?
a) A
b) 0
c) 1
d) A'
Answer: a) A
---
17. Which of the following is the distributive law of Boolean algebra?
a) A + (B • C) = (A + B) • (A + C)
b) A • (B + C) = (A • B) + (A • C)
c) A + B = A
d) A' + A = 1
Answer: b) A • (B + C) = (A • B) + (A • C)
---
18. What is the result of the Boolean expression A + A' • B?
a) A
b) A'
c) 1
d) B
Answer: c) 1
---
19. Which of the following represents the Boolean expression for a NAND gate?
a) (A • B)'
b) A • B
c) A + B
d) (A + B)'
Answer: a) (A • B)'
---
20. What is the Boolean expression for a NOR gate?
a) (A + B)'
b) (A • B)'
c) A + B
d) A • B
Answer: a) (A + B)'
---
21. Which of the following is the result of the expression A' + B' in Boolean algebra?
a) A + B
b) A • B
c) A' • B'
d) (A + B)'
Answer: d) (A + B)'
---
22. Which of the following is the correct simplified form of the expression A + A • B?
a) A
b) B
c) A + B
d) A'
Answer: a) A
---
23. What is the truth value of A • (A' + B)?
a) A
b) A'
c) B
d) 0
Answer: a) A
---
24. What is the result of the expression (A + B) • (A' + C)?
a) A' + B
b) A + C
c) A • C
d) A + B • C
Answer: d) A + B • C
---
25. What is the main purpose of Boolean algebra in computer science?
a) To store data
b) To manipulate binary data
c) To improve the speed of algorithms
d) To display data in graphs
Answer: b) To manipulate binary data
---
26. What is the simplified form of the Boolean expression A' • B + A • B?
a) A
b) B
c) A + B
d) A' + B
Answer: b) B
---
27. Which of the following is a universal gate?
a) AND gate
b) OR gate
c) XOR gate
d) NAND gate
Answer: d) NAND gate
---
28. What is the truth table for the AND operation?
a) 0 if any operand is 0
b) 1 if any operand is 1
c) 0 if both operands are 1
d) 1 only if both operands are 1
Answer: d) 1 only if both operands are 1
---
29. Which of the following is the result of the expression A + 1 in Boolean algebra?
a) 0
b) A
c) 1
d) A'
Answer: c) 1
---
30. What is the Boolean expression for an XOR gate?
a) A + B
b) A • B
c) A' + B
d) A ⊕ B (A XOR B)
Answer: d) A ⊕ B (A XOR B)
---
31. What is the main use of Boolean algebra in circuit design?
a) To convert decimal numbers into binary
b) To simplify and optimize logic circuits
c) To create efficient programming algorithms
d) To manage databases
Answer: b) To simplify and optimize logic circuits
---
32. Which of the following is the result of the expression A' • (A + B)?
a) B
b) A
c) A'
d) 0
Answer: a) B
---
33. What is the Boolean simplification of A + A • B?
a) A
b) A + B
c) B
d) A'
Answer: a) A
---
34. What is the inverse of the expression A + B in Boolean algebra?
a) (A' + B')
b) (A • B)'
c) (A' • B')'
d) (A + B)'
Answer: d) (A + B)'
---
35. Which of the following is the dual of the Boolean expression A • (B + C)?
a) A + (B • C)
b) A + B + C
c) (A • B) + C
d) A • B + C
Answer: a) A + (B • C)
---
Here are 50 multiple-choice questions (MCQs) for Class 12 Computer Science (JAC Board) based on Chapter 9: Communication and Network:
---
1. What is a network?
a) A collection of devices connected together for communication
b) A type of computer
c) A system for storing data
d) A programming language
Answer: a) A collection of devices connected together for communication
---
2. Which of the following is the most common type of network?
a) Local Area Network (LAN)
b) Wide Area Network (WAN)
c) Personal Area Network (PAN)
d) Metropolitan Area Network (MAN)
Answer: a) Local Area Network (LAN)
---
3. What is the primary function of a router in a network?
a) To store data
b) To connect different networks
c) To filter spam
d) To secure the network
Answer: b) To connect different networks
---
4. What is the main purpose of a switch in a network?
a) To connect multiple networks
b) To store data
c) To forward data packets within a local network
d) To secure network communications
Answer: c) To forward data packets within a local network
---
5. Which of the following devices is used to connect multiple devices in a LAN?
a) Router
b) Hub
c) Modem
d) Gateway
Answer: b) Hub
---
6. What is the primary function of a modem?
a) To connect computers within a local area network
b) To encrypt data
c) To convert digital signals to analog signals and vice versa
d) To provide wireless internet
Answer: c) To convert digital signals to analog signals and vice versa
---
7. Which of the following is an example of a network topology?
a) Network operating system
b) Star topology
c) Computer hardware
d) Internet protocol
Answer: b) Star topology
---
8. What is the difference between LAN and WAN?
a) LAN covers a smaller geographic area than WAN
b) LAN is faster than WAN
c) WAN is less expensive to set up than LAN
d) LAN is used only in businesses, while WAN is used in homes
Answer: a) LAN covers a smaller geographic area than WAN
---
9. What does the acronym 'IP' stand for in networking?
a) Internal Protocol
b) Internet Process
c) Internet Protocol
d) Integrated Protocol
Answer: c) Internet Protocol
---
10. What is an IP address used for in a network?
a) To encrypt data
b) To identify devices on a network
c) To provide a firewall
d) To connect different networks
Answer: b) To identify devices on a network
---
11. Which of the following protocols is used to transfer files between computers over a network?
a) HTTP
b) FTP
c) SMTP
d) DNS
Answer: b) FTP
---
12. Which of the following protocols is used for sending and receiving emails?
a) SMTP
b) FTP
c) HTTP
d) POP3
Answer: a) SMTP
---
13. What is a DNS server used for in a network?
a) To store data
b) To assign IP addresses
c) To resolve domain names to IP addresses
d) To manage network traffic
Answer: c) To resolve domain names to IP addresses
---
14. What is the primary function of a firewall in a network?
a) To block all network traffic
b) To secure a network by monitoring and controlling incoming and outgoing traffic
c) To route data packets to different networks
d) To manage IP addresses
Answer: b) To secure a network by monitoring and controlling incoming and outgoing traffic
---
15. What is a VPN (Virtual Private Network)?
a) A network used to connect two local area networks
b) A private network that provides secure communication over the internet
c) A protocol for encrypting data packets
d) A device used to connect multiple networks
Answer: b) A private network that provides secure communication over the internet
---
16. What is the main purpose of a gateway in a network?
a) To connect different types of networks and manage communication between them
b) To provide wireless connectivity
c) To store data securely
d) To send email notifications
Answer: a) To connect different types of networks and manage communication between them
---
17. Which of the following is a common transmission medium for networking?
a) Fiber optic cables
b) Bluetooth
c) USB ports
d) All of the above
Answer: a) Fiber optic cables
---
18. What is bandwidth in the context of network communication?
a) The amount of data transmitted per unit of time
b) The total number of devices connected to a network
c) The physical distance between two network devices
d) The security level of the network
Answer: a) The amount of data transmitted per unit of time
---
19. What is the purpose of the TCP (Transmission Control Protocol) in networking?
a) To establish a connection and ensure reliable data transmission
b) To route data between different networks
c) To resolve domain names to IP addresses
d) To encrypt communication between devices
Answer: a) To establish a connection and ensure reliable data transmission
---
20. Which of the following network devices operates at the data link layer of the OSI model?
a) Router
b) Switch
c) Hub
d) Gateway
Answer: b) Switch
---
21. What is the purpose of an Ethernet cable in a network?
a) To connect computers to the internet wirelessly
b) To provide a wired connection between devices in a LAN
c) To store data in a server
d) To secure data during transmission
Answer: b) To provide a wired connection between devices in a LAN
---
22. What is the maximum range of a typical Wi-Fi network?
a) 10-20 meters
b) 30-50 meters
c) 100-200 meters
d) 500-1000 meters
Answer: b) 30-50 meters
---
23. Which of the following is a common security threat in computer networks?
a) Phishing
b) DDoS attacks
c) Malware
d) All of the above
Answer: d) All of the above
---
24. What is the main advantage of using wireless networks?
a) High-speed internet connection
b) Flexibility and mobility for devices to connect without physical cables
c) Reduced security risks
d) Easy to scale
Answer: b) Flexibility and mobility for devices to connect without physical cables
---
25. What is the purpose of the OSI model?
a) To define protocols for secure data transmission
b) To standardize network communication functions into seven layers
c) To encrypt data during transmission
d) To assign IP addresses to network devices
Answer: b) To standardize network communication functions into seven layers
---
26. What is a "data packet" in a network?
a) A unit of data that is transmitted over a network
b) A type of network device
c) A protocol for sending emails
d) A security measure for networks
Answer: a) A unit of data that is transmitted over a network
---
27. Which of the following protocols is used for secure communication over the internet?
a) HTTP
b) FTP
c) HTTPS
d) SMTP
Answer: c) HTTPS
---
28. Which of the following is an example of a wireless communication technology?
a) Bluetooth
b) Fiber optic cables
c) Ethernet
d) Coaxial cables
Answer: a) Bluetooth
---
29. What is the primary function of a network protocol?
a) To connect two networks
b) To define rules for data exchange and communication between devices
c) To secure network communication
d) To store data in the cloud
Answer: b) To define rules for data exchange and communication between devices
---
30. What is a MAC address?
a) A unique identifier assigned to a device for communication over a network
b) A type of network protocol
c) A device used to route data between networks
d) A security key for encrypting data
Answer: a) A unique identifier assigned to a device for communication over a network
---
31. What is a subnet in networking?
a) A protocol for secure data transmission
b) A smaller network within a larger network
c) A method for encrypting data
d) A type of communication device
Answer: b) A smaller network within a larger network
---
32. What does the term "peer-to-peer" network mean?
a) A network where all devices share resources without a central server
b) A network that connects two or more routers
c) A network that connects devices through the internet
d) A network with a dedicated server for managing resources
Answer: a) A network where all devices share resources without a central server
---
33. What is the primary function of a DNS server?
a) To resolve domain names to IP addresses
b) To route data packets between networks
c) To store network configurations
d) To secure network traffic
Answer: a) To resolve domain names to IP addresses
---
34. What is the basic function of the transport layer in the OSI model?
a) To provide reliable data transfer
b) To route packets to the correct destination
c) To ensure secure communication
d) To define network protocols
Answer: a) To provide reliable data transfer
---
35. Which of the following is a common wireless technology used for personal area networks?
a) Wi-Fi
b) Bluetooth
c) Ethernet
d) DSL
Answer: b) Bluetooth
_____
Here are some General Awareness MCQs based on the topics from the chapters you've mentioned:
---
1. Which of the following is the standard unit of data storage in computers?
a) Megabyte
b) Gigabyte
c) Terabyte
d) Byte
Answer: d) Byte
---
2. The process of converting human-readable data into machine-readable data is known as?
a) Data encryption
b) Data input
c) Data conversion
d) Data compression
Answer: c) Data conversion
---
3. Which of the following is used for printing documents in computers?
a) Scanner
b) Printer
c) Keyboard
d) Mouse
Answer: b) Printer
---
4. The Internet is a system of interconnected networks that use the __________ protocol.
a) FTP
b) HTTP
c) IP
d) TCP/IP
Answer: d) TCP/IP
---
5. Which of the following is the brain of a computer system?
a) Hard Disk
b) Monitor
c) Central Processing Unit (CPU)
d) Keyboard
Answer: c) Central Processing Unit (CPU)
---
6. In which year was the World Wide Web (WWW) introduced?
a) 1985
b) 1990
c) 1995
d) 2000
Answer: b) 1990
---
7. Which of the following is the largest network in the world?
a) LAN
b) WAN
c) MAN
d) Internet
Answer: d) Internet
---
8. What is the full form of HTTP?
a) HyperText Transfer Protocol
b) HyperText Transmission Protocol
c) Hyper Transfer Text Protocol
d) None of the above
Answer: a) HyperText Transfer Protocol
---
9. Which of the following is an example of secondary storage?
a) RAM
b) ROM
c) Hard Disk
d) Cache
Answer: c) Hard Disk
---
10. Which of the following is the full form of the term "URL"?
a) Uniform Resource Locator
b) Universal Resource Locator
c) Universal Reference Locator
d) None of the above
Answer: a) Uniform Resource Locator
---
11. In networking, which device connects multiple devices within a network and forwards data?
a) Switch
b) Modem
c) Router
d) Hub
Answer: a) Switch
---
12. Which of the following is the most widely used operating system for computers?
a) Linux
b) Windows
c) Android
d) iOS
Answer: b) Windows
---
13. The term "cloud computing" refers to?
a) The use of Internet-based resources to store and process data
b) The use of personal computers for computing tasks
c) The use of specialized servers for data processing
d) None of the above
Answer: a) The use of Internet-based resources to store and process data
---
14. In computer networks, what is the role of a modem?
a) To route traffic between networks
b) To convert digital data to analog signals and vice versa
c) To store data
d) To control network security
Answer: b) To convert digital data to analog signals and vice versa
---
15. Which of the following is an example of a network protocol?
a) TCP
b) DNS
c) HTTP
d) All of the above
Answer: d) All of the above
---
16. What is the primary function of an operating system?
a) To provide a user interface
b) To manage hardware resources
c) To execute programs
d) All of the above
Answer: d) All of the above
---
17. In networking, what is the abbreviation for the term "IP"?
a) Internet Path
b) Internal Protocol
c) Internet Protocol
d) Internet Packets
Answer: c) Internet Protocol
---
18. The process of securing a network from unauthorized access is known as?
a) Routing
b) Encryption
c) Authentication
d) Network Security
Answer: d) Network Security
---
19. Which of the following is NOT a type of network?
a) LAN
b) MAN
c) WOM
d) WAN
Answer: c) WOM
---
20. What does the term "bandwidth" refer to in networking?
a) The security level of a network
b) The speed of data transmission
c) The number of devices in a network
d) The physical distance between devices
Answer: b) The speed of data transmission
---
21. In a network, what does the term "latency" refer to?
a) The time taken for data to travel from source to destination
b) The amount of data transmitted over a network
c) The frequency of data transmission
d) The cost of network communication
Answer: a) The time taken for data to travel from source to destination
---
22. Which of the following is an example of a wireless communication technology?
a) Ethernet
b) Bluetooth
c) Fiber optics
d) Coaxial cable
Answer: b) Bluetooth
---
23. In the context of computer networks, what does the acronym "VPN" stand for?
a) Virtual Public Network
b) Virtual Private Network
c) Virtual Personal Network
d) Verified Private Network
Answer: b) Virtual Private Network
---
24. What is the full form of the term "URL" in networking?
a) Universal Resource Locator
b) Uniform Resource Locator
c) Uniform Reference Locator
d) Universal Reference Locator
Answer: b) Uniform Resource Locator
---
25. Which of the following is a common wireless technology used for local area networking?
a) Bluetooth
b) Wi-Fi
c) Ethernet
d) Zigbee
Answer: b) Wi-Fi
---
26. The "OSI" model stands for?
a) Open System Interconnection
b) Open Source Interconnection
c) Online System Interconnection
d) None of the above
Answer: a) Open System Interconnection
---
27. Which protocol is primarily used for secure communication over the internet?
a) HTTP
b) FTP
c) HTTPS
d) SMTP
Answer: c) HTTPS
---
28. Which of the following is NOT a part of the OSI model?
a) Application Layer
b) Physical Layer
c) Network Layer
d) Security Layer
Answer: d) Security Layer
---
29. Which of the following is an example of a wired communication medium?
a) Bluetooth
b) Wi-Fi
c) Coaxial cable
d) Cellular network
Answer: c) Coaxial cable
---
30. In computer networks, which device is responsible for connecting a computer to the internet via telephone lines?
a) Router
b) Switch
c) Modem
d) Hub
Answer: c) Modem
---
31. The process of converting data into a secure form to prevent unauthorized access is called?
a) Decryption
b) Encoding
c) Compression
d) Encryption
Answer: d) Encryption
---
32. Which of the following technologies is used in LANs for high-speed data transmission?
a) Fiber optic cables
b) Bluetooth
c) 3G
d) WiMAX
Answer: a) Fiber optic cables
---
33. The first web browser was called?
a) Firefox
b) Chrome
c) Netscape
d) Mosaic
Answer: d) Mosaic
---
34. Which of the following is an example of a protocol used to exchange emails over a network?
a) FTP
b) SMTP
c) DNS
d) HTTP
Answer: b) SMTP
---
35. What does the acronym "HTTP" stand for?
a) HyperTransfer Text Protocol
b) HyperText Transmission Protocol
c) HyperText Transfer Protocol
d) HighTech Transfer Protocol
Answer: c) HyperText Transfer Protocol
---
36. Which of the following is NOT a part of the basic function of a network operating system?
a) Managing hardware resources
b) Ensuring data security
c) Managing network traffic
d) Browsing the internet
Answer: d) Browsing the internet
---
These MCQs cover a variety of general awareness topics related to networking, computer science, and the internet. You can use these to enhance your knowledge or for exam practice!
Comments
Post a Comment