What i want to do is to input 30 characters at the standard input, then covert them to uppercase. This is hopefully leading somewhere, so i only want to read 15 characters at a time, then convert those to uppercase, then do the second 15?
here's the code i have so far but have the slight problem, where i over write things, and because I'm new to C i cant quite get my read round it.
Code:
#include <stdio.h>
#include <ctype.h>
int main( void )
{
char text[64];
int z=0, counter=0;
while(++counter<=2)
{
scanf("%15c", &text);
while(text[z]>0)
{
text[z]=toupper(text[z]);
printf("%c", text[z]);
z++;
}
}
}
Thank you for reading this, i hope you can help me