Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How is the null character represented in C++? Identify and describe two common e

ID: 3699764 • Letter: H

Question

How is the null character represented in C++?

Identify and describe two common errors that are easy to make when manipulating arrays.

What are the disadvantages of using global variables instead of local variables?

Create a class called "Savings". This class has three attributes, all private,

The methods are

The main() should have:

Savings savings("college", 0.05);

savings .alias("car");

savings .deposit(5000);

savings.display();

This should produce the output:

The savings called car has $5250.0

____________________ are variables that can hold memory addresses.

Explanation / Answer

Please find my answer for first two Questions.

Please repost others in separate post.


Q. Identify and describe two common errors that are easy to make when manipulating arrays.

- Initially we do not know the exact size of the array that is required. SO sometimes
   we may face sortaze of memory in array and sometimes we might declare very large array
- In c++, there is no bound checking for an array


QWhat are the disadvantages of using global variables instead of local variables?

No Access Control or Constraint Checking -- A global variable can be get or set by any part of the program, and any rules regarding its use can be easily broken or forgotten. (In other words, get/set accessors are generally preferable over direct data access, and this is even more so for global data.) By extension, the lack of access control greatly hinders achieving security in situations where you may wish to run untrusted code (such as working with 3rd party plugins).

Implicit coupling -- A program with many global variables often has tight couplings between some of those variables, and couplings between variables and functions. Grouping coupled items into cohesive units usually leads to better programs.

Concurrency issues -- if globals can be accessed by multiple threads of execution, synchronization is necessary (and too-often neglected). When dynamically linking modules with globals, the composed system might not be thread-safe even if the two independent modules tested in dozens of different contexts were safe.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote