Show Bid Request
Limits
Bid Request Id: 30949
|
|
|
Posted by: |
aminew (21 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 0.00%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Oct 13, 2002 3:39:05 PM EDT
|
Bidding Closes: |
Oct 14, 2002 7:00:00 PM EDT
|
Viewed (by coders): |
113 times
|
Deadline: |
10/15/2002
TIME EXPIRED
|
|
|
|
Description:
The program requires you to do the following.
define and initialize variables using all of the primitive data types
print the size (in bytes) of the primitive data types on your computer
print the size (in bytes) of the variables defined in the program on your computer
print the maximum and minimum values that can be stored in the variables defined using the primitive data types
Important Note: The file comment block for this program must do a good job describing what this program does.
Part 0
Declare and define local (i.e. auto ) variables using the C/C++ primitive data types (bool, char, short, int, long, float, double, long double). Initialize each variable with a value when you define it. Examples.
char aChar = 'A';
short int shortInt = 122;
int anInt = 29;
...
Part 1
Use the sizeof() unary-operator to print the size (in bytes) of the primitive data types. Examples.
cout << "sizeof(char) is " << sizeof(char) << endl;
cout << "sizeof(short) is " << sizeof(short) << endl;
Use sizeof() to print the size of each defined variable. Examples:
char aChar = 'A';
short shortInt = 122;
...
cout << "sizeof(aChar) is " << sizeof(aChar) << endl;
cout << "sizeof(shortInt) is " << sizeof(shortInt) << endl;
Use sizeof() to print the size of the following constants: character constant 'A', integer constant 162, long integer constant 100200210, double constant 3.14, newline character constant '\n' and the string literal "hello, world".
Note: the string literal "hello, world" must be printed between double quotes.
Part 2
Print the value of selected macros (see "Example Limits Output" section for the names of the macros) defined in the <limits.h> and <float.h> Standard C Library header files.
Example Limits Output
Important Notes: You do not have to worry about columns being neatly aligned; however, one (1) extra credit point will be awarded for output formatted like mine. In addition, the numbers generated by your program may not match the numbers that my program generated. I defined variables having the following names: aBool, aChar, shortInt, anInt, longInt, aFloat, aDouble, aLongDouble.
sizeof(type) = #bytes sizeof(variable) = #bytes
=======================================================
sizeof(bool) = 1 sizeof(aBool) = 1
sizeof(char) = 1 sizeof(aChar) = 1
sizeof(short int) = 2 sizeof(shortInt) = 2
size
Deliverables: 1) The program has to be done by October 14th 2002.
Platform:
Windows XP
Must be 100% finished and received by buyer on:
Oct 15, 2002 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$13 (USD)
|
Oct 13, 2002 3:58:17 PM EDT
|
10
(Excellent)
|
|
|
I'll do this program right away! |
|
|
|
|
|