// sizeofDemo.cc  P. Conrad  2/14/05
// demo of of the sizeof operator in C++ to see
// how big int, float, double are on strauss

#include <iostream>
using namespace std;

int main(void)
{

  int a;
  float b;
  double c;
  char d;

  a = 2;
  b = 2.3;
  c = 22.5;
  d = 'J';
  
  cout << "All sizes are in \"bytes\"." << endl;

  cout << "sizeof(a) is " << sizeof(a) << endl;
  cout << "sizeof(b) is " << sizeof(b) << endl;
  cout << "sizeof(c) is " << sizeof(c) << endl;
  cout << "sizeof(d) is " << sizeof(d) << endl;

  cout << "sizeof(int) is " << sizeof(int) << endl;
  cout << "sizeof(float) is " << sizeof(float) << endl;
  cout << "sizeof(double) is " << sizeof(double) << endl;
  cout << "sizeof(char) is " << sizeof(char) << endl;

  // question: does CTRL/X CTRL/F in emacs (to visit another file)
  //     ... does it save the previous one?

}

