Help me about point in C

Help me about point in C

Post by NooB » Sat, 10 Nov 2007 04:59:09


Hello,first sorry my English.
ok

i have code.

#include <stdio.h>
char buffer[6];
char *pbuffer=buffer;


int main(void)
{

while((*pbuffer++=getchar()) != '\n')

*(pbuffer)='\0';

int i=0;
for(i;i<6;i++)
printf("\n %c",buffer[i]);
*(pbuffer+2)='A'; // chang buffer[3];
for(i;i<6;i++)
printf("\n %c",buffer[i]);


return(0);

}

i have question : where '\0' add in buffer?,i cant see it
add.i want to change buffer[3],and i use *(pbuffer+2)='A'; but dont
work.pls help me thanks you.
 
 
 

Help me about point in C

Post by Roland Ill » Sat, 10 Nov 2007 05:07:10


You have asked in the wrong group. Please try comp.lang.c instead. Here
we are discussing mainly how the C language is _defined_, not how it is
_used_.

Roland