You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2.0 KiB

cat

Instructions

Écrire un programme qui a le même comportement que la ligne de commande cat.

  • Les options ne doivent pas être gérés.

  • Si le programme est éxécuté sans arguments il doit prendre l'input et l'afficher.

  • Dans le dossier du programme créer deux fichiers nommés quest8.txt et quest8T.txt.

  • Copier dans le fichier quest8.txt la phrase suivante :

"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing

  • Copier dans le fichier quest8T.txt la phrase suivante :

"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."

  • En cas d'erreur le programme doit afficher l'erreur.

  • Le programme doit être rendu dans un dossier nommé cat.

Utilisation:

student@ubuntu:~/[[ROOT]]/cat$ go build
student@ubuntu:~/[[ROOT]]/cat$ ./cat abc
open abc: no such file or directory
student@ubuntu:~/[[ROOT]]/cat$ ./cat quest8.txt
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
student@ubuntu:~/[[ROOT]]/cat$ ./cat
Hello
Hello
^C
student@ubuntu:~/[[ROOT]]/cat$ ./cat quest8.txt quest8T.txt
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing

"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."