/* * funcrw1.c */ #include #include void makeupper(void); // function prototype int main(void) // header for main function { printf("Please enter a line of text using "); printf("both upper and lower case letters.\n"); makeupper(); // call the function makeupper printf("End of program.\n"); return 3; } void makeupper(void) // function header and definition: takes nothing, returns nothing { char cc; // declare char while( (cc=getchar()) != '\n' ) // get a char from stdin // assign value to memory location of cc // if not newline, do block { if (islower(cc) ) // true if cc is lowercase { putchar(cc-32); // subtract 32 form value of cc // put the ascii value of result } else { putchar(cc); // print the ascii value of cc } } putchar('\n'); // print a new line }