这个程序为什么输出缺两位
#include "stdio.h"main()
{
int n;
int t;
char m1[] = "My name is :";
char m2[12];
printf( "input your name: \n" );
gets( m2 );
strcat( m1, m2 );
puts( m1 );
n = strlen( m1 );
printf( "the length of the string is: %d\n",n );
t = strcmp( m1, m2 );
if( t == 0 ) printf( "m1=m2\n" );
if( t > 0 ) printf( "m1>m2\n" );
if( t < 0 ) printf( "m1<m2\n" );
strupr(m2);
puts(m2);
/*printf( "the upper-case of m2: %s", m2 );*/
}
我运行后,最后输出大写时,硬是缺了前面两个字。为什么会出现这种情况?