Is it possible to use one string function inside another string function. See below....
strcmp(string1, strupr(string2));
Here I have used strupr() function to make the all characters of string2 in uppercase then It will use to compare with string1 by strcmp() function.
Below is my program...
#include <stdio.h>
#include <string.h>
int main()
{
char str[41], name[43];
gets(str);
gets(name);
if (strcmp(strupr(str), name) == 0)
printf("\nwow it works.");
return 0;
}
Following is the error shown by compilor..
use of undeclared identifier 'strupr'; did you mean 'strdup'?