Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char **argv)
  4. {
  5.     char buf[42] = "Hallo!";
  6.  
  7.     printf("Before snprintf(): %s\n", buf);
  8.     snprintf(buf, sizeof(buf), "Mahlzeit!");
  9.     printf("After snprintf(): %s\n", buf);
  10.  
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement