/* * SelfTest1.Ch3.txt * By: John Stile */ 1. What are the statemnts for: (a) declaring an intager variable name year? int year; (b) setting it's value to 1991 year = 1991; (c) printing it's value printf( "year = %d\n", year); 2. What are the statements for: (a) declaring a floating point variable named payrate float payrate; (b) setting it's value to 14.75 payrate=14.75; (c) print it's value printf( "payrate = %.2f\n", payrate); 3. What are the statements for: (a) declaring a char variable named paylevel char paylevel; (b) setting its value to 9 paylevel="9"; (c) printing it's value printf("paylevel = %c\n", paylevel); 4. What is the statement for printing a string variable that was declared as follows? char message[]="Hello!"; printf("%s\n", message); 5. What is the statement for printing an integer variable named month that has been declared? printf("month = %d\n", month); 6. Given a floating point variable named payrate, and a string variable named lastname, what is the statement for prining. The payrate of ________ is _______. printf("The payrate of %s is %.2f.\n", lastname, payrate);