Technical MCQ S
Technical MCQ S
a) HTTP 30. Which protocol is used for securely accessing and managing
b) FTP remote servers over a network?
c) SMTP a) HTTP
d) DHCP b) FTP
c) SSH
21. What is the purpose of the "subnetting" in IP networking? d) SMTP
a) To split a large network into smaller, manageable sub-
networks 31. What is the purpose of a DNS (Domain Name System)?
b) To encrypt data during transmission a) To assign IP addresses to devices
c) To establish a direct connection between two devices b) To translate domain names into IP addresses
d) To increase the speed of data transmission c) To encrypt data transmission
d) To route network traffic
22. Which layer of the OSI model is responsible for error
detection and correction? 32. Which network topology connects devices in a circular
a) Physical Layer manner, with each device connected to exactly two others?
b) Data Link Layer a) Star
c) Transport Layer b) Bus
d) Application Layer c) Ring
d) Mesh
23. Which network topology connects all devices to a central
hub or switch? 33. Which layer of the OSI model is responsible for end-to-end
a) Star communication and data flow control?
b) Bus a) Physical Layer
c) Ring b) Data Link Layer
d) Mesh c) Transport Layer
d) Network Layer
24. What is the primary function of a router in a network?
a) To connect devices within the same LAN 34. What is the primary function of a gateway in networking?
b) To connect multiple LANs and route data between them a) To connect devices within the same LAN
c) To secure data transmission b) To connect multiple LANs and route data between them
d) To connect devices to the internet c) To protect the network from external threats
d) To connect devices to the internet
25. Which protocol is used for sending and receiving files
securely over a network? 35. Which protocol is used for secure communication over the
a) HTTP internet, often indicated by "https://" in the URL?
b) SSH a) HTTP
c) SMTP b) FTP
d) FTP c) SMTP
d) HTTPS
26. Which IP address range is reserved for private networks,
such as within a home or business? 36. In networking, what does "WAN" stand for?
a) 127.0.0.0 - 127.255.255.255 a) Wireless Area Network
b) 192.168.0.0 - 192.168.255.255 b) Wide Area Network
c) 172.16.0.0 - 172.31.255.255 c) Wired Area Network
d) 10.0.0.0 - 10.255.255.255 d) Web Access Node
27. Which networking device operates at the Network Layer of 37. Which protocol is used to retrieve email messages from a
the OSI model? mail server to a client device?
a) Switch a) HTTP
b) Hub b) FTP
c) Router c) SMTP
d) Bridge d) POP3
28. What does "URL" stand for in the context of the internet? 38. What is the purpose of a proxy server in networking?
a) Uniform Resource Locator a) To hide the identity of the client device
b) Universal Resource Link b) To block access to specific websites
c) Unified Routing Link c) To manage DNS resolution
d) User Retrieval Link d) To route data packets
29. What does the acronym "VPN" stand for in networking? 39. What is a "packet" in networking?
a) Very Private Network a) A unit of data that is transmitted over a network
b) Virtual Private Network b) A security protocol
c) Visual Processing Node c) A hardware device for network connectivity
d) Validating Public Network d) A type of network cable
11. What is the purpose of the OSI model, and how many layers 20. What is the primary purpose of a load balancer in a
does it define? network?
a) It standardizes network hardware. a) To route traffic to a single server for load distribution
b) It is a protocol for securing network communications. b) To increase network latency
c) It provides a conceptual framework for understanding c) To evenly distribute network traffic across multiple servers
network protocols and is divided into seven layers. to improve performance and reliability
d) It defines the structure of IP addresses. d) To encrypt data transmission
12. In network security, what does the term "DMZ" stand for? Answers:
a) De-Militarized Zone
b) Data Management Zone 1. a) TCP is connection-oriented, while UDP is connectionless.
c) Dynamic Monitoring Zone 2. b) The range of available IP addresses within a network
d) Distributed Message Zone 3. d) 169.254.0.0 - 169.254.255.255
4. a) To separate physical network segments
13. Which routing protocol is often used within an autonomous 5. c) Transport Layer
system (AS) and is based on the Shortest Path First (SPF) 6. a) Injecting false DNS records into a resolver's cache
algorithm? 7. d) It is used for routing between autonomous systems on the
a) BGP (Border Gateway Protocol) internet.
b) OSPF (Open Shortest Path First) 8. c) It refers to the ability to prioritize and manage network
c) RIP (Routing Information Protocol) traffic to ensure certain levels of service.
d) EIGRP (Enhanced Interior Gateway Routing Protocol) 9. d) 192.0.2.1
10. c) To map private IP addresses to a single public IP address
14. What is the primary purpose of the DNSSEC (Domain Name for outbound internet access
System Security Extensions)? 11. c) It provides a conceptual framework for understanding
a) To compress DNS records for faster lookup network protocols and is divided into seven layers.
b) To enhance DNS privacy 12. a) De-Militarized Zone
c) To provide authentication and data integrity for DNS 13. b) OSPF (Open Shortest Path First)
information 14. c) To provide authentication and data integrity for DNS
d) To map domain names to IP addresses information
15. a) To translate IPv4 addresses to IPv6 addresses
15. What is the purpose of NAT64 (Network Address Translation 16. b) SSH
64)? 17. a) To hide the identity of the client device
a) To translate IPv4 addresses to IPv6 addresses 18. b) To provide SSL/TLS certificates to websites for secure data
b) To map private IP addresses to public IP addresses transfer
c) To secure email communication 19. c) A routing technique where the same IP address is used by
d) To enable Quality of Service (QoS) for network traffic multiple devices, and the closest one responds to requests
20. c) To evenly distribute network traffic across multiple
16. Which network protocol is typically used for remotely servers to improve performance and reliability
managing network devices, such as routers and switches? These questions cover advanced networking topics related to
a) Telnet network models, security, protocols, and technologies.
b) SSH
c) RDP (Remote Desktop Protocol)
d) ICMP
9. What is the primary purpose of an intrusion detection system 18. What is the primary purpose of a security certificate (e.g.,
(IDS) in network security? SSL/TLS certificate) in network security?
a) To prevent all unauthorized access a) To block network traffic
b) To detect and alert on suspicious activities or security b) To manage DNS resolution
breaches c) To provide authentication and data integrity for secure
c) To encrypt network traffic communication
d) To filter spam emails d) To assign IP addresses to devices
10. What is a "honeypot" in the context of network security? 19. Which of the following is an example of a "social
a) A sweet and sticky substance used to trap intruders engineering" attack?
b) A fake network or system set up to attract and detect a) A DDoS attack
attackers b) A brute force attack
c) A secure storage facility for passwords c) A phishing attack
d) A type of network firewall d) A firewall attack
11. What is the primary function of a VPN (Virtual Private 20. What is the purpose of a security patch or update in
Network) in network security? network security?
a) To block network traffic a) To introduce new vulnerabilities
b) To ensure network usability b) To improve network performance
c) To provide secure and private communication over the c) To fix known security vulnerabilities and issues
internet d) To assign IP addresses to devices
d) To manage DNS resolution
21. What is the primary purpose of a sandbox in network that is kept secret for encryption
security?
a) To isolate and execute untrusted or potentially malicious 30. What is the purpose of a WAF (Web Application Firewall) in
code in a controlled environment network security?
b) To encrypt all network traffic a) To encrypt data during transmission
c) To manage DNS resolution b) To secure email communication
d) To store network logs c) To protect web applications from various online threats,
such as SQL injection and cross-site scripting (XSS)
22. Which type of encryption uses the same key for both d) To assign IP addresses to devices
encryption and decryption?
a) Asymmetric encryption 31. What is the primary purpose of a SIEM (Security
b) Symmetric encryption Information and Event Management) system in network
c) Public-key encryption security?
d) Hashing a) To increase network speed
b) To filter spam emails
23. What does "BYOD" stand for in the context of network c) To provide real-time monitoring, analysis, and reporting of
security? security events and incidents
a) Bring Your Own Device d) To manage DNS resolution
b) Backup Your Operating System Data
c) Block Your Online Downloads 32. What is a "salt" in the context of password hashing and
d) Buy Your Own Domain storage?
a) A type of encryption algorithm
24. What is a "packet sniffer" or "packet analyzer" used for in b) A random value added to a password before hashing to
network security? increase security
a) To increase network speed c) A security token used for authentication
b) To capture and analyze network traffic for troubleshooting d) A type of digital signature
or monitoring
c) To assign IP addresses to devices 33. Which of the following is an example of a network security
d) To secure email communication "best practice"?
a) Using the default administrator username and password
25. What does the term "phishing" refer to in network security? for network devices
a) A type of encryption protocol b) Sharing sensitive data through unencrypted email
b) A cryptographic technique c) Regularly updating and patching software and systems
c) A social engineering attack that attempts to trick d) Disabling firewalls to speed up network traffic
individuals into revealing sensitive information
d) A type of firewall 34. What does "RTO" stand for in the context of business
continuity and disaster recovery?
26. What does "IoT" stand for in the context of network a) Real-Time Operation
security? b) Return to Office
a) Internet of Technology c) Recovery Time Objective
b) Internet of Things d) Remote Task Observation
c) Internet of Traffic
d) Internet of Transactions 35. What is the primary purpose of a DMARC (Domain-based
Message Authentication, Reporting, and Conformance) record
27. What is the primary purpose of encryption in network in email security?
security? a) To increase network speed
a) To increase network speed b) To filter spam emails
b) To make data unreadable to unauthorized parties c) To define email authentication policies and provide
c) To manage DNS resolution reporting on email security practices
d) To provide authentication for users d) To manage DNS resolution
28. Which of the following is an example of a security token in 36. What is the primary purpose of a penetration test (pen test)
network security? in network security?
a) A secure email server a) To determine the maximum network speed
b) A physical device or smartphone app used for two-factor b) To monitor DNS traffic
authentication c) To simulate attacks on a network to identify vulnerabilities
c) A type of encryption protocol and weaknesses
d) A wireless access point d) To encrypt network traffic
29. What is a "public key" in the context of asymmetric 37. What is a "proxy server" used for in network security?
encryption? a) To filter and control network traffic and hide the identity of
a) The key used to encrypt data the client device
b) The key used to decrypt data b) To increase network speed
c) A key that is shared publicly for encryption c) To assign IP addresses to devices
d) A key d) To secure email communication
38. What is the primary purpose of a security incident response 32. b) A random value added to a password before hashing to
plan in network security? increase security
a) To create and manage DNS records 33. c) Regularly updating and patching software and systems
b) To enforce network access policies 34. c) Recovery Time Objective
c) To provide guidelines and procedures for responding to 35. c) To define email authentication policies and provide
and mitigating security incidents reporting on email security practices
d) To increase network speed 36. c) To simulate attacks on a network to identify
vulnerabilities and weaknesses
39. Which of the following is NOT a common authentication 37. a) To filter and control network traffic and hide the identity
factor in multi-factor authentication (MFA)? of the client device
a) Something you know (e.g., a password) 38. c) To provide guidelines and procedures for responding to
b) Something you have (e.g., a smart card or security token) and mitigating security incidents
c) Something you are (e.g., fingerprint or facial recognition) 39. d) Something you can do (e.g., sing a song)
d) Something you can do (e.g., sing a song) 40. c) A security model that trusts no one and verifies
everything, even within the network perimeter
40. What is a "zero trust" security model in network security?
a) A security model that trusts all users and devices by default These questions cover various aspects of network security,
b) A security model that only trusts external devices including encryption, authentication, intrusion detection, and
c) A security model that trusts no one and verifies everything, security best practices.
even within the network perimeter
d) A security model that trusts only authenticated users
46. What is a "botnet" in network security? c) A security model that trusts no one and requires
a) A network of robots used for surveillance continuous verification, even for users inside the network
b) A network of devices infected with malware and controlled d) A security model that trusts all external users
by a single entity
c) A type of secure communication protocol 55. What is a "CAPTCHA" used for in network security?
d) A group of ethical hackers a) A type of encryption protocol
b) A security token
47. Which of the following is NOT a common security protocol c) A challenge-response test designed to determine whether
used in email communication? the user is human or a bot
a) SMTP d) A type of firewall
b) POP3
c) IMAP 56. What is the primary purpose of a VPN concentrator in
d) SNMP network security?
a) To increase network speed
48. What does the term "honeynet" refer to in network b) To encrypt network traffic
security? c) To centralize and manage multiple VPN connections
a) A network of interconnected honey-producing companies d) To manage DNS resolution
b) A network of fake servers or systems used to lure and
study attackers 57. What does the term "keylogger" refer to in network
c) A network of devices used for eavesdropping on network security?
traffic a) A device used to record network traffic
d) A network of secure web servers b) A cryptographic key exchange protocol
c) A type of malware that records keystrokes on a
49. What is the primary purpose of a security information and compromised system
event management (SIEM) system in network security? d) A type of encryption protocol
a) To provide real-time monitoring, analysis, and reporting of
security events and incidents 58. What is a "certificate revocation list (CRL)" in network
b) To manage DNS resolution security?
c) To encrypt network traffic a) A list of trusted security certificates
d) To increase network speed b) A list of revoked security certificates
c) A type of encryption protocol
50. What is a "deauthentication attack" in network security? d) A list of open ports on a firewall
a) A method of forcefully disconnecting a client device from a
Wi-Fi network 59. What does "BYOD" stand for in network security?
b) A type of distributed denial of service attack a) Bring Your Own Domain
c) An attack that targets only encrypted network traffic b) Bring Your Own Device
d) A type of VPN attack c) Backup Your Operating Data
d) Block Your Online Downloads
51. What does "IoT" stand for in the context of network
security? 60. What is the primary purpose of a content filtering system in
a) Internet of Technology network security?
b) Internet of Transactions a) To increase network speed
c) Internet of Threats b) To manage DNS resolution
d) Internet of Things c) To filter and control web content and protect against
malicious or inappropriate content
52. What is the primary purpose of a WIPS (Wireless Intrusion d) To encrypt network traffic
Prevention System) in network security?
a) To increase network speed Answers:
b) To encrypt network traffic
c) To monitor and prevent unauthorized access and attacks on 41. c) To detect and alert on suspicious activities or security
wireless networks breaches
d) To manage DNS resolution 42. c) To identify and authenticate users or devices
43. c) An attack that targets a vulnerability before a patch or fix
53. What is the primary purpose of an access control list (ACL) is available
in network security? 44. b) The practice of isolating and executing untrusted code in
a) To increase network speed a controlled environment
b) To assign IP addresses to devices 45. c) To provide a coordinated and effective response to
c) To define rules that control network traffic and access to security incidents
network resources 46. b) A network of devices infected with malware and
d) To encrypt network traffic controlled by a single entity
47. d) SNMP
54. What does the term "zero trust" refer to in network 48. b) A network of fake servers or systems used to lure and
security? study attackers
a) A security model that trusts all users by default 49. a) To provide real-time monitoring, analysis, and reporting
b) A security model that trusts only internal users of security events and incidents
50. a) A method of forcefully disconnecting a client device from b) A software-based emulation of a physical computer
a Wi-Fi network c) A network device
51. d) Internet of Things d) A storage unit in the cloud
52. c) To monitor and prevent unauthorized access and attacks
on wireless networks 7. What is auto-scaling in cloud computing?
53. c) To define rules that control network traffic and access to a) The process of shutting down cloud servers to save energy
network resources b) Automatically adjusting the capacity of cloud resources to
54. c) A security model that trusts no one and requires handle varying workloads
continuous verification, even for users inside the network c) An authentication method
55. c) A challenge-response test designed to determine whether d) A security measure for cloud data
the user is human or a bot
56. c) To centralize and manage multiple VPN connections 8. What is the purpose of a load balancer in a cloud
57. c) A type of malware that records keystrokes on a infrastructure?
compromised system a) To maximize power efficiency
58. b) A list of revoked security certificates b) To increase latency
59. b) Bring Your Own Device c) To distribute network traffic across multiple servers to
60. c) To filter and control web content and protect against improve performance and reliability
malicious or inappropriate content d) To encrypt data transmission
These questions cover more advanced topics in network
security, including intrusion detection, encryption, 9. Which cloud computing service model provides a platform
authentication, and security best practices. and environment for developers to build, deploy, and manage
applications?
a) IaaS
Basic 40 Question Set On Cloud b) SaaS
c) PaaS
Computing: d) CaaS (Container as a Service)
Certainly, here are 40 multiple-choice questions (MCQs) on the
topic of cloud computing for a technical aptitude test: 10. What is the term for a physical location where cloud service
providers host their infrastructure?
1. What is cloud computing? a) Cloud hub
a) Storing data on local servers b) Data center
b) Accessing the internet c) Server farm
c) Renting and using computing resources over the internet d) Cloud city
d) A method of cooling data centers
11. What is the primary concern when it comes to data security
2. What is the most common service model in cloud computing in the cloud?
that provides virtualized computing resources? a) DDoS attacks
a) IaaS (Infrastructure as a Service) b) Data redundancy
b) SaaS (Software as a Service) c) Data sovereignty and privacy
c) PaaS (Platform as a Service) d) Network latency
d) DaaS (Desktop as a Service)
12. Which cloud computing model combines both public and
3. Which cloud deployment model provides a dedicated private cloud services to meet specific business requirements?
infrastructure for a single organization? a) Public Cloud
a) Public Cloud b) Hybrid Cloud
b) Hybrid Cloud c) Private Cloud
c) Private Cloud d) Community Cloud
d) Community Cloud
13. What is the role of a hypervisor in virtualization?
4. What is the primary advantage of using a public cloud a) Managing software licenses
service? b) Emulating hardware and managing virtual machines
a) Full control over the infrastructure c) Securing data in the cloud
b) Cost savings and scalability d) Routing network traffic
c) Isolation from other users
d) Enhanced security 14. What does "SLA" stand for in the context of cloud services?
a) Secure Local Access
5. Which cloud computing service model offers ready-to-use b) Service Level Agreement
software applications delivered over the internet? c) Secure Login Authentication
a) IaaS d) Standard License Agreement
b) SaaS
c) PaaS 15. What is serverless computing in cloud technology?
d) FaaS (Function as a Service) a) A type of cloud deployment model
b) A method of outsourcing IT tasks to external providers
6. What is a virtual machine (VM) in the context of cloud c) A model where users write and deploy code without
computing? managing servers
a) A physical server d) A type of cloud storage service
d) Data Retrieval as a Service 15. c) A model where users write and deploy code without
managing servers
35. What is a "multi-cloud" strategy in cloud computing? 16. a) Bring Your Own Keys
a) Using multiple cloud providers for redundancy and 17. c) The process of migrating workloads to a public cloud
resilience during high demand
b) A strategy that only relies on a single cloud provider 18. c) To accelerate content delivery and improve user
c) A strategy that combines both public and private clouds experience
d) Using multiple data centers in different geographic 19. b) To provide a dedicated network space within a public
locations cloud
20. b) The management and automation of multiple cloud
36. What is a "cloud-native" application? resources and services
a) An application that can only run on traditional on-premises 21. c) A model where security responsibilities are shared
servers between the cloud provider and the customer
b) An application specifically designed to run in cloud 22. b) Infrastructure as Code
environments 23. a) Cloud migration
c) An application written in a legacy programming language 24. a) A method for ensuring regulatory compliance using
d) An application that is always offline software and automation
25. b) A facility that hosts servers and data storage devices
37. What is the term for the practice of using the public cloud 26. c) Cost-effectiveness and scalability
for burstable workloads and a private cloud for stable 27. a) Platform as a Service
workloads? 28. b) A method to move an application to the cloud without
a) Cloud isolation significant changes
b) Cloud bursting 29. c) To protect data and enforce security policies for cloud
c) Cloud convergence applications
d) Cloud consolidation 30. c) A data center that can rapidly expand and handle massive
workloads
38. What does "EBS" stand for in the context of cloud storage? 31. d) Data replication
a) Encrypted Backup Storage 32. c) Function as a Service
b) Elastic Block Store 33. c) To centralize and automate the management of cloud
c) Exabyte Storage System resources
d) External Backup Service 34. a) Disaster Recovery as a Service
35. a) Using multiple cloud providers for redundancy and
39. What is the primary goal of a cloud security posture resilience
management (CSPM) tool? 36. b) An application specifically designed to run in cloud
a) To enhance cloud provider performance environments
b) To enforce strict network access policies 37. b) Cloud bursting
c) To ensure the security of cloud environments and 38. b) Elastic Block Store
compliance with security policies 39. c) To ensure the security of cloud environments and
d) To provide cloud billing reports compliance with security policies
40. c) The legal and regulatory requirements related to where
40. What is "cloud data sovereignty"? data is stored and processed
a) The concept of storing data exclusively in private clouds
b) The idea that data is the property of the cloud provider These questions cover a range of topics related to cloud
c) The legal and regulatory requirements related to where computing, including service models, deployment models,
data is stored and processed security, and terminology.
d) The process of migrating data from one cloud to another
44. In cloud computing, what is "serverless architecture" often 53. What is a "serverless framework" in cloud computing, and
referred to as? which programming languages are commonly used with it?
a) Scalable computing a) A framework for managing physical servers; Python and
b) Function as a Service (FaaS) Java
c) Virtual machine management b) A framework for building serverless applications;
d) Private cloud deployment JavaScript, Python, and more
c) A framework for emulating virtual machines; Ruby and C++
45. What is "cold storage" in the context of cloud storage d) A framework for managing container deployments; Go and
services? Rust
a) Storage with very high temperature
b) Storage for rarely accessed data, typically with lower costs 54. What is a "CICD pipeline" in cloud development?
c) Storage in a refrigerated data center a) A cloud-based database service
d) Storage for frequently accessed data b) A continuous integration and continuous deployment
process for automating application delivery
46. What is a "stateless application" in cloud computing? c) A cloud-based communication protocol
a) An application that maintains user session data d) A method for securing cloud resources
b) An application that doesn't store data between user
requests 55. What is "serverless computing's" main advantage, and what
c) An application with high security requirements technology allows it to function?
d) An application hosted on a private cloud a) Low cost and scalability; AWS Lambda and Azure Functions
b) Advanced security features; Google Cloud Functions
47. What is a "cloud-native" container orchestration platform c) Full control over physical servers; On-premises data centers
developed by Google? d) Direct access to the cloud provider's hardware; Bare-metal
a) Docker servers
b) Kubernetes
c) OpenStack 56. In cloud networking, what is a "load balancer pool," and
d) Vagrant how is it used?
a) A group of malfunctioning servers; it ensures high
48. What does "HIPAA" stand for, and how does it relate to availability
cloud computing? b) A set of load balancers; it optimizes network performance
a) Health Insurance Portability and Accountability Act; it sets c) A group of target instances for distributing traffic; it
standards for handling health data in the cloud enhances application reliability
b) High-Intensity Performance and Processing Act; it defines d) A list of all cloud resources; it simplifies network
cloud infrastructure requirements management
c) Hosted Information Protection and Privacy Agreement; it
governs cloud provider contracts 57. What is "cloud bursting," and how does it differ from
d) None of the above traditional scaling?
a) The process of expanding a private cloud; it requires
49. What is "data egress" in the context of cloud pricing? significant manual intervention
a) The process of transferring data into the cloud b) Automatically increasing cloud capacity during traffic
b) The cost associated with transferring data out of the cloud spikes; it offers on-demand scalability
c) The process of securing data in the cloud c) A process of replacing traditional servers with cloud
d) A data analytics service servers; it involves downtime
d) The transfer of data from one cloud provider to another; it
50. What is the term for a distributed and fault-tolerant file is cost-efficient
storage service offered by AWS?
a) S3 (Simple Storage Service) 58. What is "immutable infrastructure," and how does it relate
b) EC2 (Elastic Compute Cloud) to cloud deployments?
c) RDS (Relational Database Service) a) An infrastructure that cannot be changed; it leads to
d) VPC (Virtual Private Cloud) security vulnerabilities
b) An infrastructure in which changes are made directly to
51. What is a "container" in cloud computing, and which production systems; it improves flexibility
technology is commonly used for containerization? c) An infrastructure that is automatically replaced rather than
a) A virtual machine; VMware updated; it enhances reliability
b) A method for secure data storage; RAID d) An infrastructure that is fully customizable; it minimizes
c) An isolated environment for running applications; Docker costs
41. a) Running applications without servers; AWS (Amazon Web 4. In C, what is the escape sequence for a newline character?
Services) a) \n
42. b) To offer cloud services and applications for deployment b) \t
43. a) Cloud Service Provider c) \r
44. b) Function as a Service (FaaS) d) \a
45. b) Storage for rarely accessed data, typically with lower
costs 5. What does the `++` operator do in C?
46. b) An application that doesn't store data between user a) Adds 1 to the variable
requests b) Subtracts 1 from the variable
47. b) Kubernetes c) Multiplies the variable by 2
48. a) Health Insurance Portability and Accountability Act; it sets d) Divides the variable by 2
standards for handling health data in the cloud
49. b) The cost associated with transferring data out of the 6. What is the purpose of the `return` statement in a C
cloud function?
50. a) S3 (Simple Storage Service) a) To print a message to the console
51. c) An isolated environment for running applications; Docker b) To terminate the program
52. c) To provide an abstracted and scalable network c) To exit the function and return a value
d) To declare a new variable
infrastructure for cloud services
53. b) A framework for building serverless applications; 7. In C, which operator is used for logical AND?
JavaScript, Python, and more a) &&
54. b) A continuous integration and continuous deployment b) ||
process for automating application delivery c) !
55. a) Low cost and scalability; AWS Lambda and Azure d) &
Functions
56. c) A group of target instances for distributing traffic; it 8. What is the range of values that can be stored in a `char` data
enhances application reliability type in C?
57. b) Automatically increasing cloud capacity during traffic a) -128 to 127
spikes; it offers on-demand scalability b) 0 to 255
58. c) An infrastructure that is automatically replaced rather c) -32768 to 32767
than updated; it enhances reliability d) -2,147,483,648 to 2,147,483,647
59. c) Bridging the gap between development and operations
teams to streamline application deployment 9. Which operator is used for the multiplication of two numbers
60. b) Atomicity, Consistency, Isolation, Durability; it defines the in C?
properties of a transaction in a database a) *
These advanced questions cover more specific and in-depth b) +
aspects of cloud computing, including serverless computing, c) /
containerization, security, and best practices in cloud d) %
development.
10. What is the purpose of the `sizeof` operator in C?
a) To calculate the size of an array
b) To calculate the size of a structure
16. In C, what is the purpose of the `struct` keyword? 26. What does the `%d` format specifier represent in the `printf`
a) To define a structure or user-defined data type function for integers?
b) To declare a function a) Double
c) To declare a constant b) Decimal
d) To declare a variable c) String
d) Character
17. What is the result of the following C expression: `5 + 3 * 2`?
a) 16 27. In C, what is the purpose of the `++` operator?
b) 11 a) Adds 1 to the variable
c) 10 b) Subtracts 1 from the variable
d) 7 c) Multiplies the variable by 2
d) Divides the variable by 2
18. What is the output of the following C code?
```c 28. What is the escape sequence for a newline character in C?
int x = 5; a) \n
printf("%d\n", x++); b) \t
``` c) \r
a) 6 d) \a
b) 5
c) 7 29. What is the output of the following C code?
d) 4 ```c
int x = 5;
19. In C, what is the purpose of the `sizeof` operator? printf("%d\n", x++);
a) To calculate the size of a structure ```
b) To calculate the size of an array a) 6
c) To calculate the size of a file b) 5
d) To calculate the size of a variable or data type
30. What is a comment in C, and how is it denoted? 40. What does the `++` operator do in C?
a) A comment is used for debugging and is denoted by %% a) Adds 1 to the variable
b) A comment is used for documentation and is denoted by // b) Subtracts 1 from the variable
c) A comment is used to create loops and is denoted by :: c) Multiplies the variable by 2
d) Comments are not allowed in C d) Divides the variable by 2
30. What is the purpose of the `nullptr` keyword in C++? 40. In C++, what is a lambda expression?
a) To create a null object. a) A way to declare new data types.
b) To represent a null pointer. b) A way to create pointers to objects.
c) To terminate the program. c) A way to define small, anonymous functions.
d) To initialize variables with a default value. d) A way to perform file I/O operations.
Advance 20 Question Set On C++ 10. What does the `typeid` operator do in C++?
a) It calculates the size of a data type.
Language: b) It returns the type of an object.
Certainly, here are 20 advanced C++ multiple-choice questions c) It performs mathematical operations.
(MCQs) along with their answers at the end: d) It is not a valid operator in C++.
1. What is the primary purpose of the `this` pointer in C++? 11. What is a lambda expression in C++?
a) It refers to the previous object of the same class. a) A way to declare new data types.
b) It is used to access static members of a class. b) A way to create pointers to objects.
c) It refers to the current instance of a class. c) A way to define small, anonymous functions.
d) It is used to access the private members of a class. d) A way to perform file I/O operations.
12. What is the Java keyword used to handle exceptions in a 21. What is method overloading in Java?
program? a) A technique to create new methods.
a) try b) A method to add new functionalities to existing methods.
b) catch c) A way to create pointers to objects.
c) throw d) A way to declare variables.
d) throws
22. In Java, what is the `final` keyword used for when applied to
13. In Java, what is the default value for a variable of type `int`? a variable?
a) 0 a) To make the variable constant and unchangeable.
b) 0.0 b) To make the variable a global variable.
c) "0" c) To make the variable a class variable.
d) null d) To create a new object.
14. Which Java data type is used to store a sequence of 23. What is the purpose of the `instanceof` operator in Java?
characters? a) It is used to check if a variable is of a certain data type.
a) char b) It is used to create new objects.
b) int c) It is used to access class members.
c) String d) It is used to calculate mathematical operations.
d) float
24. In Java, what is the purpose of the `abstract` keyword when
15. What is the result of the following Java code? applied to a class?
a) To create an object of the class.
```java b) To indicate that the class cannot be extended.
String name = "John"; c) To indicate that the class is meant to be subclassed and
System.out.println(name.charAt(1)); cannot be instantiated.
``` d) To declare a constant.
c) A sequence of elements that can be processed in a 11. What is the difference between a `HashSet` and a `TreeSet`
functional-style manner. in Java?
d) A mechanism for creating GUI components. a) `HashSet` allows duplicate elements, while `TreeSet` does
not.
3. In Java, what is the purpose of the `super()` constructor call b) `TreeSet` is unsorted, while `HashSet` is sorted.
within a subclass constructor? c) `TreeSet` uses a hash table for storage, while `HashSet`
a) To create a new object. uses a red-black tree.
b) To invoke the constructor of the superclass. d) `HashSet` maintains elements in natural order, while
c) To call a method in the superclass. `TreeSet` does not.
d) To exit the program.
12. In Java, what is the purpose of the `volatile` keyword when
4. What is the difference between an abstract class and an applied to a variable?
interface in Java? a) To declare a constant variable.
a) Abstract classes cannot have abstract methods, while b) To indicate that the variable should not be modified.
interfaces can. c) To specify that the variable can be accessed by multiple
b) Interfaces can have constructors, while abstract classes threads and changes are immediately visible to other threads.
cannot. d) To indicate that the variable is immutable.
c) Abstract classes can have multiple inheritance, while
interfaces cannot. 13. What is the Java `ClassLoader` used for?
d) Abstract classes cannot have fields, while interfaces can. a) To load and link class files at runtime.
b) To create objects.
5. In Java, what is the purpose of the `synchronized` keyword c) To define a new class.
when applied to a method or block of code? d) To handle exceptions.
a) To indicate that the method cannot be overridden.
b) To make the method a class method. 14. What is the purpose of the `StringBuffer` and `StringBuilder`
c) To make the method thread-safe, allowing only one thread classes in Java?
to execute it at a time. a) To define abstract methods.
d) To make the method a static method. b) To create objects.
c) To perform string manipulation efficiently by allowing
6. What is the Java `try-with-resources` statement used for? mutable strings.
a) To create a new object. d) To handle exceptions.
b) To handle exceptions.
c) To declare variables. 15. What is the Java `Reflection API` used for?
d) To create a new thread. a) To create new objects.
b) To inspect and manipulate classes, methods, fields, and
7. In Java, what is the purpose of the `enum` in a switch other program entities at runtime.
statement? c) To perform bitwise operations.
a) To define a new data type. d) To handle exceptions.
b) To indicate a constant variable.
c) To create a new object. 16. What is the role of the `System.arraycopy` method in Java?
d) To represent a set of named constants. a) To create a new object.
b) To exit the program.
8. What is the purpose of the `Object` class in Java? c) To perform array copying efficiently.
a) To create new objects. d) To handle exceptions.
b) To define an abstract base class.
c) To perform file I/O operations. 17. In Java, what is a generic type (e.g., `ArrayList<E>`) used for?
d) To serve as a root class for all Java classes. a) To create new data types.
b) To perform file I/O operations.
9. In Java, what is the difference between composition and c) To define a class.
inheritance? d) To allow the use of a single class or method with different
a) Composition allows a class to inherit from multiple classes, data types.
while inheritance does not.
b) Inheritance is a mechanism to achieve code reusability, 18. What is a Java annotation used for?
while composition is a way to create new classes. a) To create new objects.
c) Composition is used to create new objects, while b) To indicate metadata about a class, method, field, or other
inheritance is used to create relationships between classes. program elements.
d) Composition is a mechanism to reuse existing classes, while c) To define abstract methods.
inheritance is used to create new classes. d) To handle exceptions.
10. What is the purpose of the `java.lang.Math` class in Java? 19. In Java, what is the purpose of the `@Override` annotation?
a) To perform mathematical operations. a) To indicate that a method is final and cannot be
b) To create new objects. overridden.
c) To handle exceptions. b) To indicate that a method should be declared in an
d) To define abstract methods. interface.
c) To indicate that a method is inherited from a superclass.
20. What is the Java `Executor` framework used for? 3. In Python, which of the following is not a valid data type?
a) To create new objects. a) int
b) To manage threads and execute tasks asynchronously. b) char
c) To perform bitwise operations. c) float
d) To define abstract methods. d) str
1. Which of the following is a valid way to declare a variable in 11. What is the result of `5 / 2` in Python?
Python? a) 2.5
a) variable 123 b) 2
b) 123_variable c) 2.0
c) _variable123 d) 2.5 with floor division
d) variable 123_
12. What is the Python keyword for defining a class?
2. What is the result of `2 ** 3` in Python? a) def
a) 8 b) class
b) 6 c) cls
d) object 23. What is the Python keyword for creating an empty function
that does nothing?
13. In Python, how do you import a module named "math"? a) empty
a) include math b) void
b) require math c) pass
c) import math d) None
d) from math import
24. How do you define a Python generator function?
14. What is the correct way to create an empty list in Python? a) def my_function:
a) list = [] b) generator my_function():
b) list = {} c) def my_function():
c) list = () yield
d) list = [None] d) function my_function():
15. In Python, how do you check if a key exists in a dictionary? 25. What is the Python `None` object used for?
a) key in dict a) To represent an empty dictionary.
b) dict.hasKey(key) b) To indicate the absence of a value.
c) key.exists(dict) c) To declare a variable.
d) dict[key] d) To exit the program.
16. What is the output of the code `print("Python"[::-1])` in 26. In Python, what is a lambda function?
Python? a) A way to define a global function.
a) "Python" b) A function that is not executed.
b) "nohtyP" c) A way to create new objects.
c) ['P', 'y', 't', 'h', 'o', 'n'] d) An anonymous, small, and inline function.
d) Error
27. What is the purpose of the `global` keyword in Python?
17. How do you define a Python class variable? a) To create a global variable.
a) It is defined inside a function. b) To indicate a constant variable.
b) It is defined within a class but outside any methods. c) To declare a function.
c) It is defined as a global variable. d) To modify a variable outside of the current scope.
d) It is defined within a method.
28. What is the Python `assert` statement used for?
18. What is the result of `7 % 2` in Python? a) To create new objects.
a) 7 b) To perform file I/O operations.
b) 2 c) To define abstract methods.
c) 3.5 d) To check if a given condition is true and raise an exception
d) 1 if it is not.
19. In Python, which data type is used to represent a sequence 29. What is a Python decorator used for?
of characters? a) To declare a constant variable.
a) char b) To indicate metadata about functions or methods.
b) str c) To create a new class.
c) string d) To define a class variable.
d) character
30. What does the `not` operator do in Python?
20. How do you create a set in Python? a) It performs a logical OR operation.
a) set = {} b) It inverts the value of a boolean expression.
b) set = [] c) It checks for inequality.
c) set = () d) It creates a new object.
d) set = {1, 2, 3}
31. What is the Python keyword used to iterate over a sequence
21. What is the output of the code `print(type("Hello"))` in (e.g., list, tuple, string)?
Python? a) iterate
a) <class 'str'> b) loop
b) str c) for
c) class 'str' d) while
d) "str"
32. What is the result of `bool("False")` in Python?
22. What is the purpose of the `return` statement in a Python a) True
function? b) False
a) To declare a variable. c) Error
b) To define a function. d) None
c) To exit the program.
d) To return a value from the function. 33. In Python, how do you open a file named "example.txt" in
write mode and create it if it doesn't exist?
38. What is the output of the code `print("Python"[-1])` in Advance 20 Question Set On Python
Python?
a) "Python" Language:
b) o Certainly, here are 20 advanced Python multiple-choice
c) 1 questions (MCQs) with their answers at the end:
d) Error
1. What is the purpose of the `yield` keyword in Python?
39. What is the result of the code `2 < 3 and 4 < 5` in Python? a) To indicate a variable as constant.
a) True b) To exit a loop.
b) False c) To define a generator function.
c) Error d) To create a new object.
d) None
2. In Python, what is a generator expression?
40. How do you import a module named "my_module" from a a) A way to define a new data type.
package named "my_package" in Python? b) A way to declare a constant variable.
a) import my_module.my_package c) A concise way to create generator objects.
b) import my_module d) A method to add new functionalities to existing methods.
c) from my_module import my_package
d) import my_package.my_module 3. What is the result of `3 // 2` in Python?
a) 1.5
Answers: b) 1
c) 1.0
1. c) _variable123 d) 2
2. a) 8
3. b) char 4. What is the Python `asyncio` library used for?
4. c) It defines the block structure and scope of the code. a) To perform mathematical operations.
5. c) # This is a comment b) To define abstract methods.
6. b) len() c) To write asynchronous, non-blocking code using the `async`
7. b) Hello, World! and `await` keywords.
8. c) def my_function(): d) To handle exceptions.
9. a) [0, 1, 2, 3, 4]
10. a) open("example.txt", "r") 5. What is the purpose of the `zip()` function in Python?
11. c) 2.0 a) To compress files.
12. b) class b) To unzip files.
13. c) import math c) To combine two or more iterables element-wise into tuples.
c) A key that links one table's column to another table's d) A table that combines data from multiple sources.
column.
d) A key that is used for encryption. 25. What is the purpose of the `UNION` operator in a MySQL
query?
17. Which of the following is not a valid database constraint in a) To concatenate two strings.
MySQL? b) To combine the result sets of two or more SELECT
a) NOT NULL statements.
b) UNIQUE c) To filter rows based on a condition.
c) ONLY d) To find the intersection of two sets.
d) CHECK
**Database Transactions:**
18. In a relational database, what is a one-to-many
relationship? 26. In a database, what is a transaction?
a) Each row in the first table is related to multiple rows in the a) A SQL query.
second table. b) A single database operation that is atomic and consistent.
b) Each row in the first table is related to one row in the c) A table that contains transaction history.
second table. d) A backup of the database.
c) Each row in the first table is unrelated to rows in the
second table. 27. What is the purpose of the `COMMIT` statement in a
d) Each row in the second table is related to multiple rows in database transaction?
the first table. a) To undo the changes made in the transaction.
b) To save the changes made in the transaction to the
19. What is normalization in the context of database design? database.
a) A process of making a database faster. c) To start a new transaction.
b) A process of organizing data in a database to eliminate d) To roll back the transaction.
data redundancy.
c) A process of securing the database from unauthorized 28. What does ACID stand for in the context of database
access. transactions?
d) A process of encrypting data in a database. a) Atomicity, Consistency, Isolation, Durability
b) Association, Concurrency, Integrity, Deletion
20. What is an index in a database table? c) Analysis, Collaboration, Insertion, Documentation
a) A list of unique values in a column. d) Accessibility, Complexity, Integration, Documentation
b) A type of constraint used for data validation.
c) A data structure that improves the speed of data retrieval 29. In a database, what is the purpose of the `ROLLBACK`
operations on a table. statement?
d) A foreign key relationship between two tables. a) To save the changes made in the transaction.
b) To commit the transaction.
**MySQL Advanced:** c) To undo the changes made in the transaction.
d) To start a new transaction.
21. What is the purpose of the `INNER JOIN` clause in a MySQL
query? 30. What is the purpose of the `SAVEPOINT` statement in a
a) database transaction?
a) To commit the transaction.
To retrieve only the first row of each table. b) To create a new table.
b) To include all rows from the left table and the matched c) To define a new variable.
rows from the right table. d) To set a point in the transaction to which you can later roll
c) To exclude rows that do not have matching values in both back.
tables.
d) To filter rows based on a condition. **Indexes and Optimization:**
22. Which command is used to update data in a MySQL table? 31. What is an index in the context of a database table?
a) ADD a) A list of unique values in a column.
b) INSERT b) A foreign key relationship between two tables.
c) UPDATE c) A data structure that improves the speed of data retrieval
d) MODIFY operations on a table.
d) A table that stores only index information.
23. In MySQL, which data type is used to store binary data?
a) VARCHAR 32. What is the purpose of the `EXPLAIN` statement in MySQL?
b) CHAR a) To execute a query.
c) BLOB b) To display the query result.
d) CLOB c) To obtain information about how MySQL executes a query.
d) To create a new table.
24. What is a MySQL view?
a) A virtual table that is the result of a SELECT query. 33. What is a database query optimization technique used to
b) A physical table that stores data. reduce the number of rows to be processed in a query?
c) A constraint used for data validation. a) Indexing
**DBMS Concepts:** 1. What is the purpose of the SQL CASE statement in a query?
1. a) Database Management System a) To specify the order of results
2. c) Data Redundancy b) To filter rows based on a condition
3. c) Managing data c) To define the primary key
4. b) A collection of related database tables d) To perform conditional operations in the query
5. b) To uniquely identify each record in the table
**MySQL Basics:** 2. In a database, what is a composite key?
6. b) Relational Database Management System (RDBMS) a) A key composed of multiple columns to uniquely identify a
7. a) CREATE record
8. a) Structured Query Language b) A key that combines two separate tables
9. c) To retrieve data from a table c) A key that is used for encryption
10. c) It filters rows based on a condition. d) A key for composite data types
**MySQL Queries:**
11. a) ORDER BY ASC 3. What does the term "ACID properties" refer to in a DBMS?
12. c) To aggregate data and group rows with similar values. a) Atomicity, Consistency, Isolation, Durability
13. c) A method for combining rows from two or more tables b) Access, Compression, Inheritance, Deletion
based on a related column.
c) Aggregate, Connect, Invert, Distribute b) To enforce data integrity by limiting the values that can be
d) Authorization, Configuration, Implementation, Data inserted into a column
c) To create a new table
4. What is the purpose of the SQL UNION ALL operator? d) To retrieve data from a table
a) To combine rows from two or more tables, including
duplicates 14. In a DBMS, what is the purpose of the SQL GRANT
b) To perform mathematical operations on columns statement?
c) To perform a join operation a) To revoke permissions from a user
d) To create a new table b) To insert new records into a table
c) To assign specific privileges to a user or role
5. In a relational database, what is the role of the SQL TRIGGER? d) To create a new table
a) To initiate a transaction
b) To create a new database 15. What is a bitmap index in a database?
c) To run a stored procedure automatically in response to a a) An index created using the B-tree data structure
specific event b) An index used to store images and binary data
d) To retrieve data from a table c) An index that uses a bitmap to represent the presence or
absence of values
6. What is referential integrity in the context of a DBMS? d) An index that combines multiple columns into a single
a) A constraint that ensures consistency between linked tables index
through foreign keys
b) A way to optimize database queries 16. What is the SQL command used to create a unique
c) A method for compressing data constraint on a table column?
d) A mechanism for data encryption a) CREATE CONSTRAINT
b) ADD UNIQUE
7. What is the purpose of the SQL MERGE statement (also c) SET UNIQUE
known as UPSERT)? d) ALTER TABLE
a) To merge two database tables into a single table
b) To perform mathematical operations on columns 17. What is the purpose of the SQL ROLLBACK statement?
c) To update rows if they exist or insert them if they do not a) To permanently save changes made during a transaction
d) To create a new table b) To commit all pending changes to the database
c) To undo all changes made during a transaction
8. What is a self-join in SQL? d) To create a new database
a) A join operation between two separate databases
b) A join operation between tables in the same database 18. What is a recursive CTE (Common Table Expression) in SQL?
c) A join operation between a table and itself a) A type of table that cannot be queried
d) A join operation that creates a new database b) A table that can be queried only once
c) A CTE that refers to itself, allowing for recursive queries
9. In the context of a DBMS, what is a schema? d) A CTE that combines data from multiple tables
a) A collection of tables
b) A database administrator's username and password 19. What is the purpose of the SQL LIMIT clause in a SELECT
c) A database file statement?
d) A logical container for organizing and managing database a) To limit the number of rows returned by a query
objects b) To specify the number of columns to retrieve
c) To order the results in ascending order
10. What is a materialized view in a DBMS? d) To filter rows based on a specific condition
a) A virtual table that does not store data
b) A table that stores cached results of a query 20. What is the SQL command used to rename a table in a
c) A view that only contains metadata database?
d) A table that contains raw data a) RENAME TABLE
b) ALTER TABLE RENAME
11. What is the primary function of a query optimizer in a c) MODIFY TABLE
DBMS? d) UPDATE TABLE
a) To validate SQL statements
b) To organize tables and columns Answers:
c) To generate an execution plan for SQL queries
d) To enforce security permissions 1. d) To perform conditional operations in the query
2. a) A key composed of multiple columns to uniquely identify a
12. What is the SQL command used to remove an index from a record
table? 3. a) Atomicity, Consistency, Isolation, Durability
a) REMOVE INDEX 4. a) To combine rows from two or more tables, including
b) DELETE INDEX duplicates
c) DROP INDEX 5. c) To run a stored procedure automatically in response to a
d) ERASE INDEX specific event
6. a) A constraint that ensures consistency between linked
13. What is the purpose of the SQL CHECK constraint? tables through foreign keys
a) To validate the database schema 7. c) To update rows if they exist or insert them if they do not
35. In Microsoft Excel, what is the function of the "AutoSum" 24. a) MAX
button? 25. d) Adobe Illustrator
a) Creating charts and graphs 26. c) Planning and tracking project tasks
b) Sorting data alphabetically 27. b) Organizing slides and changing their order
c) Automatically summing selected data 28. d) Microsoft Publisher
d) Inserting hyperlinks 29. b) Editing and entering formulas
30. c) Receiving and managing incoming emails
36. Which software application is commonly used for video 31. b) Adobe Audition
conferencing and online meetings? 32. b) Searching for specific text and replacing it with another
a) Adobe Premiere Pro 33. d) Microsoft Publisher
b) Adobe Illustrator 34. c) Organizing, storing, and retrieving documents
c) Zoom 35. c) Automatically summing selected data
d) Adobe Dreamweaver 36. c) Zoom
37. a) Previewing the printed document before printing
37. What is the purpose of the "Print Preview" feature in 38. b) Storing sent emails
Microsoft Word? 39. c) Comma-Separated Values
a) Previewing the printed document before printing 40. c) Creating visual representations of data
b) Changing the page layout
c) Converting the document to a PDF format
d) Sending the document by email Advance 30 Question Set On Common
38. In Microsoft Outlook, what is the "Sent Items" folder used Application and MS Office:
for? Certainly, here are 30 more advanced multiple-choice
a) Receiving and managing incoming emails questions on Common Applications and MS Office:
b) Storing sent emails
c) Organizing and managing contacts **Advanced Common Applications and MS Office:**
d) Drafting new emails
1. In Microsoft Excel, what is the purpose of the VLOOKUP
39. What does "CSV" stand for in the context of file formats? function?
a) Computer Software Version a) To create pivot tables
b) Compressed and Secured Video b) To perform vertical data lookup and retrieval
c) Comma-Separated Values c) To calculate standard deviation
d) Centralized Storage Volume d) To insert hyperlinks
40. In Microsoft Excel, what is the purpose of the "Chart" 2. Which software application is commonly used for 3D
feature? modeling and design?
a) Creating tables and lists a) Adobe Illustrator
b) Sorting data b) Adobe InDesign
c) Creating visual representations of data c) Autodesk AutoCAD
d) Formatting text documents d) Adobe Premiere Pro
25. In Microsoft Excel, what is the "PivotTable" feature used 21. c) Solving complex optimization and equation problems
for? 22. c) Adobe Premiere Pro
a) Sorting data 23. c) Managing references, citations, and bibliography
b) Analyzing and summarizing large sets of data 24. d) Microsoft Visio
c) Calculating monthly loan payments 25. b) Analyzing and summarizing large sets of data
d) Creating tables and lists 26. b) Adobe Audition
27. b) Merging contact information into documents
26. Which software application is commonly used for recording 28. d) Microsoft Access
and editing podcasts? 29. b) Ensuring data entered into cells meets specific criteria or
a) Adobe Premiere Pro rules
b) Adobe Audition 30. c) Autodesk Maya
c) Adobe InDesign
d) Adobe Illustrator
18. In pseudo code, what is the role of the "DO-WHILE" loop? 24. What is the output of the following pseudo code segment?
a) To perform a loop operation while a specified condition is ```
met total = 0
b) To perform a loop operation a fixed number of times for i = 1 to 5
c) To repeat a loop indefinitely if i mod 2 = 0 then
d) To perform a loop operation in reverse total = total + i
end if
order end for
Print total
19. What does the following pseudo code segment do? ```
``` a) 1
x=2 b) 6
y=3 c) 5
while x < 10 do d) 9
y=y*2
x=x+1 25. In pseudo code, what is the role of the "BREAK" statement
end while within a loop?
Print y a) To execute a specific code block
``` b) To exit the loop prematurely
a) Doubles the value of y until x is greater than or equal to 10 c) To start a new loop iteration
and then prints y d) To increment a counter variable
b) Doubles the value of x until y is greater than or equal to 10
and then prints x 26. What does the following pseudo code segment do?
c) Prints 3 ```
d) Does nothing, as it's not a valid pseudo code x=1
while x < 5 do
20. What is the purpose of the "FOR-EACH" loop in pseudo x=x+1
code? end while
a) To perform a loop operation for a fixed number of times Print x
b) To iterate through elements in a collection or array ```
c) To perform a loop operation until a specified condition is a) Sets x to 1 and prints it
met b) Sets x to 5 and prints it
d) To perform a loop operation in reverse order c) Sets x to 2 and prints it
d) Does nothing, as it's not a valid pseudo code
21. In pseudo code, what is the role of the "SWITCH"
statement? 27. In pseudo code, what is the purpose of the "CONTINUE"
a) To perform a mathematical calculation statement within a loop?
b) To make decisions based on a condition a) To exit the loop prematurely
c) To assign values to variables b) To start a new loop iteration
d) To execute different code blocks based on a specific value c) To execute a specific code block
d) To decrement a counter variable
22. What does the following pseudo code segment do?
``` 28. What is the output of the following pseudo code segment?
x=8 ```
y=2 x=1
if x mod y = 0 then while x <= 5 do
Print "Even" if x mod 2 = 0 then
Answers: