/* integers2.c Jeff Ondich, 16 Jan 2023 More about integers. For each section: uncomment, predict output, try it */ #include int main() { int j; // fprintf(stdout, "SECTION 1: fprintf output specifiers\n"); // j = 165; // fprintf(stdout, "Decimal: %d\n", j); // fprintf(stdout, "Hexadecimal: 0x%x\n", j); // fprintf(stdout, "Hexadecimal (upper case): 0x%X\n", j); // fprintf(stdout, "Octal: %o\n", j); // fprintf(stdout, "\n"); // fprintf(stdout, "SECTION 2\n"); // j = 0b10100101; // fprintf(stdout, "Decimal: %d\n", j); // fprintf(stdout, "Hexadecimal: 0x%X\n", j); // fprintf(stdout, "\n"); // fprintf(stdout, "SECTION 3\n"); // j = 0xA5; // fprintf(stdout, "Decimal: %d\n", j); // fprintf(stdout, "Hexadecimal: 0x%X\n", j); // fprintf(stdout, "\n"); // fprintf(stdout, "SECTION 4\n"); // j = 0254; // fprintf(stdout, "Decimal: %d\n", j); // fprintf(stdout, "Hexadecimal: 0x%X\n", j); // fprintf(stdout, "Octal: %o\n", j); // fprintf(stdout, "\n"); // fprintf(stdout, "SECTION 5\n"); // j = 0xFFFFFFFE; // fprintf(stdout, "Hexadecimal: 0x%X\n", j); // fprintf(stdout, "Decimal: %d\n", j); // fprintf(stdout, "\n"); // fprintf(stdout, "SECTION 6: isn't this an infinite loop?\n"); // j = 1; // while (j > 0) { // j++; // } // fprintf(stdout, "We made it! j = %d\n", j); // What happened? Why does j have the value it has? return 0; }