字符串格式化防止数组越界

字符串格式化防止数组越界
    char  buffers[ 10 ];
   

    
// _snprintf_s(buffers,sizeof(buffers),"%s","lsdafjasdlfjasdl;fjasdl;fjasd;fjasd;fjasd;fasd;fsd");
    _snprintf(buffers, sizeof (buffers) , " %s " , " lseeeeeeeeeeeeeeeeeeeed " );
    buffers[ 9 =  0 ;

    printf(
" %s " ,buffers);
    fflush(stdin);

你可能感兴趣的:(字符串格式化防止数组越界)