well i alawys wondered when i make char name[]="bla"; and count by ptr it doesnt work it says cant count wrong argument to increment
but see whenever i like make it a function like void putit(char *Name);
it work i dunno why though why does it work then if its an array ? does it cast it or something ? like take for example this code here
#include <stdio.h>
//put it function work but how so even i use normal array in name it wasnt a chr ptr ??
void Put_it(char *Name) {
while(*Name)
putchar(*Name++);
}
int main(void)
{
char name[]="blabla";
while(*name)
putchar(*name++);//doesnt work
return getchar();
}
if it does cast it why when i cast in putchar in main function it doesnt work ??