C Programming Code Examples C > Pointers Code Examples Char pointer as the function parameter Char pointer as the function parameter #include <stdio.h> void f(char *p); int main(void) { f("c.happycodings.com"); return 0; } void f(char *p) { while(*p) { /* loop as long as p does not point to the null which is the string terminator*/ printf("%c", *p); p++; /* go to next character */ } printf("\n"); }