jfcmacro icon

tiposelemdec.cpp

jfcmacro | PRO | 03/16/19 06:28:09 PM UTC | 0 ⭐ | 337 👁️ | Never ⏰ | []
C++ |

710 B

|

None

|

0 👍

/

0 👎

/*
 * fichero: tiposeledec.cpp
 *
 * proposito: mostrar la declaracion de variables globales
 *
 * compilar: $ g++ -o tiposeledec tiposeledec.cpp
 *           $ make tiposeledec
 * ejecutar: $ ./tiposeledec
 */
#include <iostream>
 
using namespace std;
 
/* <decls>    ::= <decl>*
   <decl>     ::= <tipo> <listvar> ";"
   <tipo>     ::= <modent>? "int" | <modchar>? "char" | "float" | "long"? "double"
   <modent>   ::= <signomod> | <modtam> | <signomod> <modtam>
   <signomod> ::= "signed" | "unsigned"
   <modtam>   ::= "short"  | "long" | "long long"
    <listvar>  ::= ID (,ID)*
*/
int
main(void) {
 
  int a;
  char b;
  float c;
  double d;
 
  cout << "tamano entero: "
       << sizeof(a)
       << endl;
 
  return 0;
}

Comments