Select Git revision
string-ops-3.c
Forked from
Peter Gerwinski / hp
361 commits behind the upstream repository.
Peter Gerwinski authored
string-ops-3.c 359 B
#include <stdio.h>
#include <string.h>
int main (void)
{
char hello_buffer[] = "Hello, world!\n";
char *hello = hello_buffer;
printf ("%s\n", hello);
printf ("%zd\n", strlen (hello));
printf ("%s\n", hello + 7);
printf ("%zd\n", strlen (hello + 7));
hello[5] = 0;
printf ("%s\n", hello);
printf ("%zd\n", strlen (hello));
return 0;
}