Skip to content
Snippets Groups Projects
Select Git revision
  • 08256e681ca958282c556749d6332bf473cf4251
  • master default
2 results

string-ops-3.c

Blame
  • Forked from Peter Gerwinski / hp
    361 commits behind the upstream repository.
    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;
    }