ushtabalakh
Programmer
- Jun 4, 2007
- 132
I'm trying to have the first character of *p stored in c, or printed directly. I should not use any external libraries I wanna do it using pointer arithmatics and stuff...
Any clues?
Code:
char *s = "this is a test";
char *p = s;
while (*p != '\0'){
p++;
char c = *p;
printf("%s\n",c);
}