1 what common data types are represented in almost every language how are these decl 5346424

1.      What common data types are represented in almost every language? How are these declared in C++?

2.      What are the arguments for and against representing Boolean values as single bits in memory?

3.      Answer the following:

a.       Describe a use for string pattern matching not listed in your text.

b.      What are the advantages and disadvantages to having dynamic length strings?

4.      Describe how enumeration types and subrange types can enhance readability and reliability.

5.      Differentiate clearly between static, fixed stack-dynamic, stack-dynamic and heap-dynamic arrays.

6.      Consider the following pseudocode array declaration:

X: array [1-5] [1-5] [1-5] of integer;

Assume integers require two bytes of storage and that the array begins at location 10000.  What is address of X[2][3][4], assuming row-major order?  What is the address assuming column-major order?

7.      Consider the following pseudocode:

aggregateType valuePack is

               f: float;

               i: integer;


Assume that floats take four bytes and integers two.  If valuePack is a record, how many bytes does a valuePack require? If valuePack is a union, how many bytes does it require?  Explain.

8.      What is a dangling reference, and how can it lead to program crashes?

9.      Create an example in C++ that causes a memory leak.

10.  Compare the tombstones and locks-and-keys methods of avoiding dangling pointers, from the points of view of safety and implementation cost.

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now