Đàm Ngọc Lan
New member
What is the output of this program?
A. 5
B. 10
C. 0
D. -1
Code:
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
int main()
{
int fd, count;
char ch, *buff;
buff = (char *)malloc(sizeof(char)*10);
fd = open("san.c",O_RDONLY);
count = read(fd,buff,5);
printf("%d\n",count);
return 0;
}
B. 10
C. 0
D. -1