Advertisement
Guest User

Test Sprintf

a guest
Sep 26th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2.  
  3. int main() {
  4.     char str[20];
  5.     double x = 10.123456, y = 1.2345;
  6.  
  7.     sprintf(str, "%lf, %lf", x, y);
  8.     printf("%s\n", str);
  9.  
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement