#include<stdio.h>
int main(){
char *q;
int i=0;
do{
*(q+i)=getchar();
i++;
}while(*(q+i)!=48);
int j=0;
for(;j<i;j++)
printf("%c",*(q+j));
}
I try to use in this way. I could compile. However ıt does not work . My aim is that I wanna acquire char array (unlimited or limit will be defined by the user) What should I do?
qchar[]will do. Avoid dynamic memory when you can, it's slower and adds complexity. Bugs like complexity