I did a little testing on what your doing and I think you are trying to access the array as if it was a string.
Code:
// test.c
#include <stdio.h>
int main(void)
{
char one[] = {'a','e','i','o','u'};
char *two;
two = one;
printf("\n%s\n",two)
}
will result in this ....
Code:
[ash@gnulinux ash]$ gcc test.c
[ash@gnulinux ash]$ ./a.out
aeiouéÿ¿éÿ¿Èéÿ¿'6@
Doing something like this ...
Code:
// test.c revised
#include <stdio.h>
int main(void)
{
char one[] = {'a','e','i','o','u'};
char *two;
two = one;
printf("\n%c\n",two[1]);
}
will result in the printing of e.
Bookmarks