R1 Control Structures in C
R1 Control Structures in C
INSTRUCTION: Conduct research on the topic of Control Structures in c++ programming by exploring the
following questions (need a hard copy for submission on September 11, 2023):
1. What are the three primary types of control structures in C++? Provide a brief explanation of each
type.
2. How does the "if" statement differ from the "switch" statement in C++ when it comes to making
decisions in your code? Provide examples for both.
3. Explain the concept of a loop in C++. What are the differences between "while," "for," and "do-
while" loops? When would you use each type of loop?
4. In C++, what is the purpose of the "break" and "continue" statements within loops? Provide
examples to illustrate their usage.
5. Describe the role of conditional operators (e.g., "? :" ternary operator) in control structures in C++.
How do they work, and what are some common use cases for them? Provide examples to
demonstrate their functionality.
NOTE: If you want to answer the questions using google or any tool, then copy and paste the original statement and
write the rephrased answer made by you. See format below; (this will be check according to the content of your research
paper)
Link: https://www.techtarget.com/searchnetworking/definition/hardware
Revised Answer:
Computer hardware refers to all the physical parts of a computer, whether it's a regular or digital one. It's what
you can touch and see, like the screen, keyboard, or the computer's brain, the CPU. Hardware is different from
software, which is the computer's instructions that tell these physical parts what to do. Hardware and software
need to work together for a computer to be useful. It's like having a car (the hardware) and knowing how to
drive it (the software) to go where you want. Computer hardware can be divided into two main groups: stuff
inside the computer (like the CPU, memory, and storage) that make it work, and things you can plug into it from
the outside (like a printer or a mouse) to add more features or abilities.
PROGRAMMING 1 | PROG1
Copy and paste the table below to follow the format to answer the questions.
Revised Answer:
Revised Answer:
Revised Answer:
Revised Answer:
Revised Answer:
PROGRAMMING 1 | PROG1