Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- char * ConvertToUppercase(char * input)
- {
- char output[255];
- int i;
- for(i=0;i<strlen(input);i++)
- {
- output[i] = input[i]-32;
- }
- return output;
- }
- main() {
- FILE *fp;
- char buff[255];
- fp = fopen("test.txt", "r");
- fgets(buff, 255, (FILE*)fp);
- printf("3: %s\n", buff );
- fclose(fp);
- printf("%s",ConvertToUppercase(buff));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement