Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The C++ language has more Built In Data Types than the C language. In this assignment I would like you to build a table of

The C++ language has more Built In Data Types than the C language. In this assignment I would like you to build a table of each data type, its min and max values and the literal prefix or postfix values for each data type.

Create two functions in types.h and types.cpp

bool printLine(string name, string min, string max, string size, string literal);

bool printTable();

Note that you can use the to_string() function to convert numeric types to a string.

Each data type has a built-in definition for the MIN and MAX values, and these can be gotten from within Visual Studio or by searching the Web. For example, the appropriate MIN and MAX values for a "char" data type are: CHAR_MIN and CHAR_MAX. Each data type will have an appropriate MIN and MAX value defined for you. You do not need to calculate it.

Also, use the sizeof() function on the data type to determine that data type's size in bytes.

Create one additional module called BuilltInTypes.cpp that contains the main(void) function.

The table should contain the following types:

=========================================================================== = NAME = MIN = MAX = SIZE = LITERAL = =========================================================================== = bool = 0 = 1 = 1 = n/a = ========================================================================== = unsigned char = 0 = 255 = 1 = u8 = =========================================================================== = char = -128 = 127 = 1 = u8 = =========================================================================== = wchar_t = 0 = 65535 = 2 = L = =========================================================================== = char16_t = 0 = 0 = 2 = u = =========================================================================== = char32_t = 0 = 0 = 4 = U = =========================================================================== = unsigned short = 0 = 0 = 2 = replace = =========================================================================== = short = 0 = 0 = 2 = replace = =========================================================================== = unsigned int = 0 = 0 = 4 = replace = =========================================================================== = int = 0 = 0 = 4 = replace = =========================================================================== = unsigned long = 0 = 0 = 4 = replace = =========================================================================== = long = 0 = 0 = 4 = replace = =========================================================================== = unsigned long long = 0 = 0 = 8 = replace = =========================================================================== = long long = 0 = 0 = 8 = replace = =========================================================================== = float = 0 = 0 = 4 = replace = =========================================================================== = double = 0 = 0 = 8 = replace = =========================================================================== = long double = 0 = 0 = 8 = replace = ===========================================================================

Replace all the values in the tables with the appropriate values.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899