Thanks oogabooga, those are exactly the functions I needed for this specific program.
However, I see some application in the way I am approaching it (what if i am looking for a char inside of a string but don't want it to be upper/lower case).
Here is how I written it so far. I need something along the lines of: strcpy(temp[i],abc[a]);
Thanks!
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char start [50];
int sizeStart;
char abc[53] = {"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"};
char ABC[53] = {"ABCDEFGHIJKLMNOPKRSTUVWXYZabcdefghijklmnopqrstuvwxyz"};
int i = 0;
int a = 0;
int compare;
printf("Input a string to reverse the case: ");
scanf("%s", start);
sizeStart = strlen (start);
printf("size of start is %d\n", sizeStart);
while(i<=sizeStart)
{
a = 0;
while(a<=51)
{
compare = strcmp(start[i],abc[a]);
if(compare == 0)
{
strcpy(start[i],ABC[a]);
}
a++;
}
i++;
}
printf("New String is: %s", start);
return 0;
}