Guest User

Untitled

a guest
Jan 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. char buffer[512];
  2.  
  3. memset(buffer, 0, sizeof(buffer));
  4. sprintf(&buffer[0],"This Is The Longest String In the World that in text goes on and..");
  5.  
  6. printf("Buffer:%srn",buffer);
  7.  
  8. sprintf(&buffer[0],"This Is The
  9. Longest String In the World
  10. that in text goes on and..");
  11.  
  12. Buffer:This Is The Longest String In the World that in text goes on and..
  13.  
  14. sprintf(buffer, "This Is The "
  15. "Longest String In the World "
  16. "that in text goes on and..");
  17.  
  18. sprintf(buffer, "This Is The
  19. Longest String In the World
  20. that in text goes on and..");
  21.  
  22. char buffer[512];
  23. sprintf(&buffer[0], "This is the longest string"
  24. "in the world that in text"
  25. "goes on and on and on and on ....");
  26. printf("%sn", buffer);
  27.  
  28. char buffer[512];
  29. snprintf(buffer, sizeof buffer, "%s",
  30. "This is The Longest String "
  31. "In the World that in text "
  32. "goes on and on and on and on ....");
  33. printf("Buffer:%srn", buffer);
Add Comment
Please, Sign In to add comment