Các bạn thảo luận đáp án nhé, bài test lấy từ http://www.indiabix.com/online-test/c-programming-test/13
7. Point out the error in the program?
#include<stdio.h>
int main()
{
struct emp
{
char name[20];
float sal;
};
struct emp e[10];
int i;
for(i=0; i<=9; i++)
scanf("%s %f", e[i].name, &e[i].sal);
return 0;
}
- A. Error: invalid structure member
- B. Error: Floating point formats not linked
- C. No error
- D. None of above
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?