alright, well ive been having a problem trying to get this code to work,
i have my three arrays
char first[80];
char second[80];
char third[160];
First i have to use the fgets() function to get a string from the user and store the data in the array first.. then do the same for the second array.
next, i have to use the strcmp() function to determine which string is last alphabetically.
then the strlen() function to determine which string is longest.
and last use the strcpy() and strcat() functions to take first join it to second and store the result in the array named third.
I have attempted this, it sounds easy to me, but i cant figure it out, i just need help on this so hopfully it will help me to understand how arrays work alittle better so that i can complete my test and pass.... thanks
i have my three arrays
char first[80];
char second[80];
char third[160];
First i have to use the fgets() function to get a string from the user and store the data in the array first.. then do the same for the second array.
next, i have to use the strcmp() function to determine which string is last alphabetically.
then the strlen() function to determine which string is longest.
and last use the strcpy() and strcat() functions to take first join it to second and store the result in the array named third.
I have attempted this, it sounds easy to me, but i cant figure it out, i just need help on this so hopfully it will help me to understand how arrays work alittle better so that i can complete my test and pass.... thanks
Comment