[SOLVED] CS代考计算机代写 #include

30 $

File Name: CS代考计算机代写_#include.zip
File Size: 301.44 KB

SKU: 5618632654 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


#include
#include
#include
#include
#include

int main(int argc, char *argv[])
{
int fd;
char buf[4];

if (argc < 2)exit(EXIT_FAILURE);memset(buf, 0, sizeof(buf));fd = open(argv[1], O_RDONLY);if (fd < 0) {perror(“open”);exit(EXIT_FAILURE);}read(fd, buf, sizeof(buf));close(fd);printf(“Executable detection… “);if (buf[0] == 0x7F && buf[1] == 0x45&& buf[2] == 0x4C && buf[3] == 0x46)printf(“ELF”);else if (buf[0] == ‘#’ && buf[1] == ‘!’)printf(“script”);elseprintf(“Not an executable!”);printf(”
“);return 0;}

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS代考计算机代写 #include
30 $