Untitled
public c v1 · immutable#include <fcntl.h>#include <unistd.h>char *bsq(char *fichier){ char *str; int fd; char *hauteur; str = malloc(sizeof(*str) * 700); //malloc sale fd = open(fichier, O_RDONLY, 0); read(fd, hauteur, 1); // sale aussi lseek(fd, 2, SEEK_SET); read(fd, str, 700); write(1, str, 700); //Appeler la fonction find_o qui va retourner la position des O dans un char* find_o(str);}int main(int argc, char **argv){ if (argc > 1) bsq(argv[1]); else return (0);}