我希望输出打印我们打印的数据。但它没有按预期工作,输出没有显示并且正在退出
#include <stdio.h>
int main() {
char name[20], department[3], section[1];
printf("enter the name of the student:");
scanf("%s", name);
printf("enter your department:");
scanf("%s", department);
printf("enter the section");
scanf("%s", section);
printf("Name:%s \n Department:%s \n Section: %s ", name, department, section);
return 0;
}
Run Code Online (Sandbox Code Playgroud) c ×1