fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdbool.h>
  4.  
  5.  
  6. int main(void) {
  7. unsigned int i = 10 ;
  8. char* b ;
  9. bool a[ 16 ] ;
  10.  
  11. b = ( char* )malloc( 17 ) ;
  12. b[ 16 ] = 0 ;
  13. memcpy( a , i , 2 ) ;
  14.  
  15. for( int t = 0 ; t < 16 ; ++t )
  16. b[ t ] = a[ t ] ;
  17.  
  18. printf( "%s" , b ) ;
  19.  
  20. return 0;
  21. }
  22.  
Runtime error #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
Standard output is empty