
这个哪里有问题啊 VC++6.0 提示我在第8行fgets处,我不会改啊 求大神!!! 50
#include"stdafx.h"#include"string.h"intmain(void){charbuffer[256];printf("Enteryourna...
#include "stdafx.h"
#include "string.h"
int main(void)
{
char buffer[256];
printf("Enter your name and press <Enter>;\n");
fgets( buffer );
printf( "\nYour name has %d characters and spaces!",
strlen( buffer ));
return 0;
} 展开
#include "string.h"
int main(void)
{
char buffer[256];
printf("Enter your name and press <Enter>;\n");
fgets( buffer );
printf( "\nYour name has %d characters and spaces!",
strlen( buffer ));
return 0;
} 展开
1个回答
展开全部
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char buffer[256];
printf("Enter your name and press <Enter>;\n");
gets( buffer );
printf( "\nYour name has %d characters and spaces!",
strlen( buffer ));
return 0;
}
#include <stdlib.h>
#include <string.h>
int main(void)
{
char buffer[256];
printf("Enter your name and press <Enter>;\n");
gets( buffer );
printf( "\nYour name has %d characters and spaces!",
strlen( buffer ));
return 0;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询