Computer Science & IT MCQ & Objective Questions
Computer Science & IT is a crucial subject for students preparing for school and competitive exams in India. Mastering this field not only enhances your understanding of technology but also significantly boosts your exam scores. Practicing MCQs and objective questions is an effective way to reinforce your knowledge and identify important questions that frequently appear in exams.
What You Will Practise Here
Fundamentals of Computer Science
Data Structures and Algorithms
Operating Systems Concepts
Networking Basics and Protocols
Database Management Systems
Software Engineering Principles
Programming Languages Overview
Exam Relevance
Computer Science & IT is an integral part of the curriculum for CBSE, State Boards, and competitive exams like NEET and JEE. Questions often focus on theoretical concepts, practical applications, and problem-solving skills. Common patterns include multiple-choice questions that test your understanding of key concepts, definitions, and the ability to apply knowledge in various scenarios.
Common Mistakes Students Make
Confusing similar concepts in data structures, such as arrays and linked lists.
Overlooking the importance of algorithms and their time complexities.
Misunderstanding the functions and roles of different operating system components.
Neglecting to practice coding problems, leading to difficulty in programming questions.
Failing to grasp the fundamentals of networking, which can lead to errors in related MCQs.
FAQs
Question: What are the best ways to prepare for Computer Science & IT exams?Answer: Regular practice of MCQs, understanding key concepts, and reviewing past exam papers are effective strategies.
Question: How can I improve my problem-solving skills in Computer Science?Answer: Engage in coding exercises, participate in study groups, and tackle a variety of practice questions.
Start your journey towards mastering Computer Science & IT today! Solve our practice MCQs to test your understanding and enhance your exam preparation. Remember, consistent practice is the key to success!
Q. How many bits are borrowed from the host portion in a /24 subnet to create 4 subnets?
Show solution
Solution
To create 4 subnets, 2 bits must be borrowed from the host portion (2^2 = 4).
Correct Answer:
B
— 2
Learn More →
Q. How many bits are used for the host portion in a /22 subnet?
Show solution
Solution
In a /22 subnet, 10 bits are used for the host portion (32 total bits - 22 bits for the network = 10 bits for hosts).
Correct Answer:
A
— 10
Learn More →
Q. How many bits are used for the network portion in a Class B IP address?
Show solution
Solution
In a Class B IP address, the first 16 bits are used for the network portion, allowing for a large number of hosts.
Correct Answer:
B
— 16
Learn More →
Q. How many colors are used in a Red-Black tree?
A.
One
B.
Two
C.
Three
D.
Four
Show solution
Solution
A Red-Black tree uses two colors: red and black, to maintain balance and ensure properties.
Correct Answer:
B
— Two
Learn More →
Q. How many comparisons does binary search make in the worst case for an array of size 16?
Show solution
Solution
The worst-case number of comparisons is log2(16) = 4, but since we start counting from 0, it takes 5 comparisons.
Correct Answer:
D
— 7
Learn More →
Q. How many comparisons does binary search make in the worst case for an array of size n?
A.
n
B.
log n
C.
n log n
D.
1
Show solution
Solution
In the worst case, binary search makes log n comparisons to find the target or determine its absence.
Correct Answer:
B
— log n
Learn More →
Q. How many leaf nodes can a binary tree with n internal nodes have?
A.
n + 1
B.
n
C.
2n
D.
n - 1
Show solution
Solution
A binary tree with n internal nodes can have n + 1 leaf nodes.
Correct Answer:
A
— n + 1
Learn More →
Q. How many leaf nodes can a full binary tree with n internal nodes have?
A.
n + 1
B.
n
C.
2n
D.
n/2
Show solution
Solution
A full binary tree with n internal nodes has n + 1 leaf nodes.
Correct Answer:
A
— n + 1
Learn More →
Q. How many leaf nodes does a full binary tree with 'n' internal nodes have?
A.
n
B.
n + 1
C.
2n
D.
n/2
Show solution
Solution
A full binary tree with 'n' internal nodes has 'n + 1' leaf nodes.
Correct Answer:
B
— n + 1
Learn More →
Q. How many nodes are there in a full binary tree of height h?
A.
h
B.
2^h
C.
2^(h+1) - 1
D.
2^h - 1
Show solution
Solution
A full binary tree of height h has 2^(h+1) - 1 nodes.
Correct Answer:
C
— 2^(h+1) - 1
Learn More →
Q. How many rotations are needed in the worst case for a single insertion in an AVL tree?
Show solution
Solution
In the worst case, a single insertion in an AVL tree may require up to 2 rotations to maintain balance.
Correct Answer:
B
— 2
Learn More →
Q. How many rotations are needed in the worst case for balancing an AVL tree after an insertion?
Show solution
Solution
In the worst case, 2 rotations may be needed to balance an AVL tree after an insertion.
Correct Answer:
B
— 2
Learn More →
Q. How many rotations are needed in the worst case to balance an AVL tree after an insertion?
Show solution
Solution
In the worst case, 2 rotations may be needed to balance an AVL tree after an insertion.
Correct Answer:
B
— 2
Learn More →
Q. How many rotations are needed in the worst case when inserting a node in an AVL tree?
Show solution
Solution
In the worst case, at most 2 rotations are needed to maintain the balance of an AVL tree after insertion.
Correct Answer:
B
— 2
Learn More →
Q. How many rotations are needed in the worst case when inserting a node into an AVL tree?
Show solution
Solution
In the worst case, inserting a node into an AVL tree may require up to 2 rotations to restore balance.
Correct Answer:
C
— 3
Learn More →
Q. How many rotations are needed to balance an AVL tree after a single insertion?
Show solution
Solution
Typically, only one rotation is needed to balance an AVL tree after a single insertion, unless it is a double rotation case.
Correct Answer:
B
— 1
Learn More →
Q. How many rotations are needed to balance an AVL tree after an insertion?
A.
At most one.
B.
At most two.
C.
At most three.
D.
No rotations are needed.
Show solution
Solution
At most two rotations are needed to balance an AVL tree after an insertion, depending on the case of imbalance.
Correct Answer:
B
— At most two.
Learn More →
Q. How many rotations are required in the worst case for balancing an AVL tree after an insertion?
Show solution
Solution
In the worst case, 2 rotations may be required to balance an AVL tree after an insertion.
Correct Answer:
B
— 2
Learn More →
Q. How many rotations are required in the worst case to balance an AVL tree after an insertion?
Show solution
Solution
In the worst case, 2 rotations are required to balance an AVL tree after an insertion.
Correct Answer:
B
— 2
Learn More →
Q. How many rotations are required in the worst case when inserting a node in a Red-Black Tree?
Show solution
Solution
In the worst case, up to 2 rotations may be required to maintain the properties of a Red-Black Tree after insertion.
Correct Answer:
C
— 2
Learn More →
Q. How many rotations are required in the worst case when inserting a node in an AVL tree?
Show solution
Solution
In the worst case, only 1 or 2 rotations are required to maintain the balance of an AVL tree after insertion.
Correct Answer:
B
— 2
Learn More →
Q. How many rotations are required in the worst case when inserting a node into an AVL tree?
Show solution
Solution
In the worst case, inserting a node into an AVL tree may require up to 2 rotations to maintain balance.
Correct Answer:
B
— 2
Learn More →
Q. How many subnets can be created from a /24 network if 3 bits are borrowed for subnetting?
Show solution
Solution
Borrowing 3 bits from a /24 network allows for 2^3 = 8 subnets.
Correct Answer:
B
— 8
Learn More →
Q. How many subnets can be created from a Class B network with a subnet mask of 255.255.255.0?
A.
256
B.
128
C.
64
D.
32
Show solution
Solution
Using a subnet mask of 255.255.255.0 on a Class B network allows for 256 subnets, as it borrows 8 bits from the host portion.
Correct Answer:
A
— 256
Learn More →
Q. How many subnets can be created from a Class C network with a default subnet mask of 255.255.255.0 if 3 bits are borrowed?
Show solution
Solution
Borrowing 3 bits from the host portion allows for 2^3 = 8 subnets, but with 2 reserved for network and broadcast, 6 usable subnets remain.
Correct Answer:
A
— 4
Learn More →
Q. How many total IP addresses are available in a subnet with a /22 CIDR notation?
A.
1024
B.
512
C.
256
D.
64
Show solution
Solution
A /22 subnet provides 2^(32-22) = 2^10 = 1024 total IP addresses.
Correct Answer:
A
— 1024
Learn More →
Q. How many usable hosts are available in a subnet with a /24 subnet mask?
A.
254
B.
256
C.
512
D.
128
Show solution
Solution
A /24 subnet mask allows for 256 total addresses, but 2 are reserved (network and broadcast), leaving 254 usable host addresses.
Correct Answer:
A
— 254
Learn More →
Q. How many usable hosts are available in a subnet with a /28 prefix?
Show solution
Solution
A /28 subnet has 16 total addresses, but 2 are reserved (network and broadcast), leaving 14 usable host addresses.
Correct Answer:
A
— 14
Learn More →
Q. How many usable hosts are available in a subnet with a subnet mask of 255.255.255.240?
Show solution
Solution
A subnet mask of 255.255.255.240 allows for 16 total addresses, but 2 are reserved (network and broadcast), leaving 14 usable hosts.
Correct Answer:
A
— 14
Learn More →
Q. How many usable IP addresses are available in a /28 subnet?
Show solution
Solution
A /28 subnet has 2^(32-28) = 2^4 = 16 total addresses. Subtracting 2 for the network and broadcast addresses leaves 14 usable addresses.
Correct Answer:
A
— 14
Learn More →
Showing 61 to 90 of 3237 (108 Pages)