Friday
March 24, 2017

Post a New Question

Posted by on Saturday, September 15, 2012 at 11:29am.

Cyborg data type sizes. You have been given a job as a programmer on a Cyborg supercomputer. In order to accomplish some calculations, you need to know how many bytes the following data types use: char, int, float, and double. You do not have any manuals, so you can’t look this information up. Write a C++ program that will determine the amount of memory used by these types and display the information on the screen.

  • computer science - , Tuesday, March 12, 2013 at 2:26pm

    // Programming Challenges of Chapter 2 on P77
    // Written by Lanchuan Chang

    #include <iostream>
    using namespace std;

    int main()
    {
    // 9. Cyborg Data Type Sizes
    cout << " the size of a char is " << sizeof(char) << " bytes.\n";
    cout << " the size of an int is " << sizeof(int) << " bytes.\n";
    cout << " the size of a float is " << sizeof(float) << " bytes.\n";
    cout << " the size of a double is " << sizeof(double) << " bytes.\n";

    return 0;

    }

  • computer science - , Saturday, September 20, 2014 at 4:36am

    HAHAHAAHAHAHAHA

Answer This Question

First Name:
School Subject:
Answer:

Related Questions

More Related Questions

Post a New Question