See comments in code again:
CODE
#include <stdio.h>
#include <ctype.h>
int main void
{
char array s[ 100 ]; /* create char array */ comment: again, you have tow variable names, it will need to look like the following: char s[100];
printf( ''Enter a line of text:\n'' );
/* use gets to read line of text*/
gets ( array s); comment: same as above, will need to resemble gets(s);
printf( ''%s%c\n, ''The line converted to uppercase is '', toupper ); comment: toupper is a function that takes a single char as a parameter, you will need to use a looping mechanism to talk through each element of the array and apply the function to each element.
printf( ''%s%c\n, '' The line converted to lowercase is '', tolower );
comment: lower is a function that takes a single char as a parameter, you will need to use a looping mechanism to talk through each element of the array and apply the function to each element.
return 0; /* indicates successful termination */
} /* end main */
See below for an example of walking through the array and applying the function:
CODE
int main(int argc, char *argv[])
{
char str1[256];
int i;
printf("Please enter a string:\n");
gets(str1);
for(i=0;i<strlen(str1);i++)
str1[i]=toupper(str1[i]);
printf("The upper string is: %s\n",str1);
for(i=0;i<strlen(str1);i++)
str1[i]=tolower(str1[i]);
printf("The lower string is: %s\n",str1);
return 0;
}