Syntax
#include <string.h> char *strupr(char *string);Description
strupr converts any lowercase letters in string to uppercase. Other characters are not affected.
strupr returns a pointer to the converted string. There is no error return.
This example makes a copy in all uppercase of the string "DosWrite", and then prints the copy.
#include <string.h> #include <stdio.h> int main(void) { char *string = "DosWrite"; char *copy; copy = strupr(strdup(string)); printf("This is a copy of the string\n"); printf("with all letters capitalized: %s\n", copy); return 0; /**************************************************************************** The output should be: This is a copy of the string with all letters capitalized: DOSWRITE ****************************************************************************/ }Related Information