Created
          August 21, 2012 13:35 
        
      - 
      
- 
        Save syohex/3415464 to your computer and use it in GitHub Desktop. 
    sprintf test
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | buf=10000, len=5 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <stdio.h> | |
| int main (void) | |
| { | |
| char buf[16]; | |
| int len; | |
| len = sprintf(buf, "%d", 10000); | |
| printf("buf=%s, len=%d\n", buf, len); | |
| return 0; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment