does any one know why my for loop work fine but printf("%c",num[0]); get me 0?
void test(char[]);
void test2(char[]);
int main(void)
{
char num[10];
test(num);
test2(num);
}
void test()
{
num[0] = '1';
num[1] = '2'
}
void test2(int num[])
{
for(a = 0; a < 10; a++)
{
printf("%c",num[a]);
printf("%c",num[0]);
}
}