#include <stdio.h>

/*
C-style comments.
*/

// C++-style comments. Cannot be used on some C compilers.

// Floating types.
float float_number = -0.1f;
double double_number = -0.1;
long double long_double_number = -0.1;

// Integer types.
int int_number = -1;
unsigned int unsigned_int_number = 1;
long long_number = -1;
short short_number = 32768;

// Character type. It is an integer, each alphanumerical character 
// is in reality an integer code.
char char_number = 'A';

// Use typedef to define custom types from existing one.
// Note that there is no predefined boolean type, the int 
// type is usually used : 0 -> false, other number -> true.
typedef int BOOLEAN;

// Structures.
struct _STRUCT_EXAMPLE
{
	int num;
	double value;
};

struct _STRUCT_EXAMPLE struct_example;

typedef struct _STRUCT_EXAMPLE STRUCT_EXAMPLE;

STRUCT_EXAMPLE struct_example_after_typedef;

// Macros.
#define MACRO_EXAMPLE(number) (2*number+1)

// Constants.
const double constant_example = 3.1;
#define CONSTANT_MACRO_EXAMPLE (2*3.0)

int main(int argc, char* argv[])
{
	printf("int_number = %d, double_number = %f, char_number = %c, char_number = %d\n", 
		int_number, double_number, char_number, (int)char_number);
	printf("Size of a char in Bytes = %d\n", sizeof(char));

	return 0;
}
