[elektro] PIC C sztring
Palasik Sandor
palasik at mail.datanet.hu
Wed Feb 29 10:31:36 CET 2012
> Nem kötözködés képpen, de ha pointer a helyére mutat onnan már
> kezelésben és leírásban nincs különbség. (csak az egyik konstans
> pointer)
Ja, abból a modulból nézve. Akkor gondoljuk tovább:
DATA.C:
char hello[] = "Hello World!\n";
void printhello()
{
printf(hello);
}
POINTER.C:
extern char *hello;
extern void printhello();
int main()
{
printhello();
printf("hello ptr: %X\n",(int)hello);
hello = "Hello World!\n";
printf(hello);
printhello();
return 0;
}
Szerinted ebből mi fog kijönni?
Palasik Sándor
More information about the Elektro
mailing list