// This C program named size_int.c is to display size and value of MAXINT // Author ... (type here your name) // Date ... (type here the current date) // For ... (institution, course, purpose) //--------------------------------------------------------------------------- #include //Handles the keyboard input and screen output #include //Handles DOS system commands ("cls", "pause", etc.) #include //Contains values of constants (e.g. MAXINT). void main() { //This part declares variables used by the program char your_name[12]; // String declaration to store your name int int_size, maxint_value = 0; //This part inputs your name and displays personalised hello message printf("This program is to tell you the size and value of MAXINT!"); printf("\nPlease enter your name (e.g. Jan) "); //prompts for your name scanf("%s", your_name); // Inputs your name printf("Hello "); // Displays the Hello printf(your_name); // Displays your name int_size = sizeof(int); // Determines the byte size of integer numbers maxint_value = MAXINT; printf("\nInteger = %d [bytes]", int_size); //the byte size of integer printf("\nMaxint = %d [as a number]", maxint_value);//Value of MAXINT printf ("!\n"); // Changes the line system("pause"); // DOS "Pause" (for user to look at results) }