#include #include #include int main(){ printf("hi\n"); int a = 5; int b = 10; printf("%d\n", a); printf("a = %d, b = %d\n", a, b); // %d: int (signed) unsigned int c; a = -357; c = a; if(c < 0) printf("c is less than 0!\n"); else printf("c is not less than 0. Good, it's unsigned, it should be!\n"); printf("c = %d\n", c); printf("c = %u\n", c); printf("c = %x\n", c); c = 'c'; char d = c; printf("c = %u\n", d); printf("c = %c\n", c); printf("c = %s\n", &c); double pi = 3.141592653; printf("pi = %1.2lf\n", pi); strcpy((char*)&c, "cat"); // (char*) is a cast. We told the compiler to treat the address of c like a char* printf("The animal my daughter fed this morning was a %s\n", &c); printf("C is at location %ld\n", &c); printf("C is at location %lx\n", &c); printf("C is at location %p\n", &c); size_t l; printf("sizeof(l) = %d\n", sizeof(l)); return 0; }