So to copy the characters of the array into a char variable, like this, but I get an invalid indirection error. Not sure what I'm doing wrong.
Code:
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<string.h>
int main(int argc, char* argv[])
{
char words[3][10], reversed[3][10], temp[3][10], charCopy;
int count, num, length;
for(count=0; count<3; count++)
{
printf("\nPlease enter word #%d: ",count+1);
gets(words[count]);
}
puts("");
length=strlen(words);
for(count=0, num=length-1; count<num; count++, num--)
{
charCopy[count] = words[num];
}
//puts(words[count]);
printf("%c",charCopy);
getch();
return 0;
}