Job Alerts

Recent Job Notifications.

MCQs on Programming Basics [Set – 2]

MCQs on Programming Basics 1. What is the correct syntax to declare an array in Java? A) int arr = new int;B) array int arr = 5;C) declare int arr;D) int arr = ; Show Answer Correct Answer: A) int arr = new int;Explanation: In Java, arrays are declared using square brackets , followed by the new keyword to allocate memory for the specified size. 2. How can you access the last element of an array in most languages? A) Use array for accessB) Reference array directlyC) Access array directlyD) Use array for the last element Show Answer Correct Answer: A) Use array for accessExplanation: Arrays are zero-indexed in most languages, so the last element is accessed using the index length-1. 3. What is the default value of a boolean variable in Java? A) True as default valueB) False as default valueC) Null as default valueD) Undefined in Java...

MCQs on Programming Basics [Set – 1]

MCQs on Programming Basics 1. What is the result of the following code snippet: x = 5; y = x + 2; print(y)? A) 2 is displayed on the screenB) 5 is displayed as the resultC) 7 is displayed on the screenD) Error due to missing semicolon Show Answer Correct Answer: C) 7 is displayed on the screenExplanation: The code assigns 5 to x, adds 2 to it, and assigns the result to y. When y is printed, the output is 7. 2. Which of the following is used to terminate a while loop in most programming languages? A) break statementB) continue statementC) pass statementD) next statement Show Answer Correct Answer: A) break statementExplanation: The break statement is used to exit a loop immediately, regardless of the loop’s condition. 3. Which keyword is used to declare a constant in programming? A) static keywordB) let keywordC) const keywordD) fixed keyword...

MCQs on Networking & Internet [Set – 2]

MCQs on Networking & Internet 1. What is the maximum length of a CAT6 Ethernet cable to maintain performance? A) 50 meters for stable speedB) 150 meters for all devicesC) 100 meters for full performanceD) 200 meters in ideal conditions Show Answer Correct Answer: C) 100 meters for full performanceExplanation: CAT6 cables are designed to maintain optimal performance, including gigabit speeds, for distances up to 100 meters (approximately 328 feet). Beyond this, signal degradation can occur. 2. What is the purpose of ICMP (Internet Control Message Protocol)? A) Assign IP addresses dynamicallyB) Monitor and report network errorsC) Encrypt data for secure transferD) Resolve hostnames to IP addresses Show Answer Correct Answer: B) Monitor and report network errorsExplanation: ICMP is used for diagnostic and error-reporting purposes in networks, such as identifying unreachable hosts or measuring response times with tools like ping. 3. How does a wireless access point function in...

MCQs on Networking & Internet [Set – 1]

MCQs on Networking & Internet 1. What is the primary function of a router in a network? A) Assign IP addresses to devicesB) Direct traffic between networksC) Encrypt sensitive network dataD) Monitor bandwidth usage Show Answer Correct Answer: B) Direct traffic between networksExplanation: A router connects different networks and determines the best path for data packets to travel, ensuring efficient communication. 2. What does the term “subnet mask” signify in networking? A) Define broadcast domainsB) Identify network and host parts of an IP addressC) Specify the type of encryption usedD) Measure the latency in data transfer Show Answer Correct Answer: B) Identify network and host parts of an IP addressExplanation: A subnet mask divides an IP address into the network and host portions, helping to determine which subnet a device belongs to. 3. How is data transmitted in a circuit-switched network compared to a packet-switched network? A) Continuous and...

MCQs on Operating Systems [Set – 1]

MCQs on Operating Systems 1. What is the main function of an operating system? A) Provide a file structureB) Manage hardware resourcesC) Compile and run programsD) Encrypt stored information Show Answer Correct Answer: B) Manage hardware resourcesExplanation: The operating system acts as an intermediary between hardware and applications, managing resources like memory, CPU, and storage. 2. Which scheduling algorithm may cause starvation? A) Priority-based schedulingB) First-come, first-servedC) Round-robin schedulingD) Shortest job next Show Answer Correct Answer: A) Priority-based schedulingExplanation: In priority scheduling, low-priority processes may never execute if high-priority processes continuously enter the system, leading to starvation. 3. What is the main advantage of multiprogramming systems? A) Improve security featuresB) Reduce power consumptionC) Increase CPU utilizationD) Manage user access rights Show Answer Correct Answer: C) Increase CPU utilizationExplanation: Multiprogramming allows multiple processes to share CPU time, ensuring that the CPU is not idle and increasing efficiency. 4. Which component...

No Posts Found!

Subscribe to our Newsletter

Subscribe to our Newsletter

& stay ahead of your competitors!

You have been successfully Subscribed! Ops! Something went wrong, please try again.
Subscribe Form

* Subscribe to our email newsletter to get the latest posts delivered right to your email.

© MCQs 4 Exams. All rights reserved.