C++ Programming Exercises: Structures, Functions, and Classes
1. Working with Structures
1a. Declaring a Structure
Declare a structure named Organization
containing:
- a string named
name
- an int named
seats
struct Organization
{
string name;
int seats;
};
1b. Using the Structure
In the main
function, create a variable named x
of type Organization
. Assign “Opera San Jose” to the string and 1000 to the int in x
.
int main(void)
{
// put your code here
Organization x;
x.name = "Opera San Jose";
x.seats = 1000;
// code to process the structure is omitted
Read More
Introduction to Distributed Systems
Characteristics of Distributed Systems (DS)
- Concurrency
- Independent Failures
- Parallelism
- Scalability
- No Global Clock: DS do not need a global clock system to coordinate with the network at different locations because the only way of communication is message passing through the network.
Pros of DS
- Unlimited Horizontal Scaling
- Low Latency
- Fault Tolerance
- Decentralization
- Security
Cons of DS
- Data Integration & Consistency
- Network and Communication Failure
- Management Overhead
Design Goals of DS
- Making Resources
AES vs. DES: A Comprehensive Comparison of Encryption Algorithms
A Denial of Service (DoS) attack is an attempt to make a computer resource unavailable to its intended users. This attack can occur by overwhelming the target system, such as a server, network, or website, with excessive requests or malicious traffic, which exhausts its resources and prevents legitimate users from accessing the service. A Distributed Denial of Service (DDoS) attack is a variation where the attack is carried out using multiple compromised devices, often forming a botnet, to flood
Read MoreAssembly Language Concepts: A Comprehensive Guide
System Software | Application Software |
---|---|
Manages and controls computer hardware and resources | Performs specific tasks for end users |
Interfaces between hardware and application software | Interfaces between system software and end users |
Operating systems, device drivers, utility programs | Web browsers, word processors, spreadsheet software |
General-purpose software | Specific-purpose software |
Typically written in low-level languages | Usually written in high-level languages |
Literal | Immediate Operand |
---|---|
A constant value specified |
System Software, Application Software, and Assembly Language Concepts
System Software | Application Software |
---|---|
Manages and controls computer hardware and resources | Performs specific tasks for end users |
Interfaces between hardware and application software | Interfaces between system software and end users |
Operating systems, device drivers, utility programs | Web browsers, word processors, spreadsheet software |
General-purpose software | Specific-purpose software |
Typically written in low-level languages | Usually written in high-level languages |
Literal | Immediate Operand |
---|---|
A constant value specified |
System Software, Application Software, and Assembly Language Concepts
System Software | Application Software |
---|---|
Manages and controls computer hardware and resources | Performs specific tasks for end users |
Interfaces between hardware and application software | Interfaces between system software and end users |
Operating systems, device drivers, utility programs | Web browsers, word processors, spreadsheet software |
General-purpose software | Specific-purpose software |
Typically written in low-level languages | Usually written in high-level languages |
Literal | Immediate Operand |
---|---|
A constant value specified |