From 264ae2f047a53ffac92271e4609038d17605738e Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 26 Jul 2019 23:17:36 +0200 Subject: exam final --- exam_final/subjects/2-0-aff_last_param/subject.en.txt | 18 ++++++++++++++++++ exam_final/subjects/2-0-aff_last_param/subject.fr.txt | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 exam_final/subjects/2-0-aff_last_param/subject.en.txt create mode 100644 exam_final/subjects/2-0-aff_last_param/subject.fr.txt (limited to 'exam_final/subjects/2-0-aff_last_param') diff --git a/exam_final/subjects/2-0-aff_last_param/subject.en.txt b/exam_final/subjects/2-0-aff_last_param/subject.en.txt new file mode 100644 index 0000000..847abfe --- /dev/null +++ b/exam_final/subjects/2-0-aff_last_param/subject.en.txt @@ -0,0 +1,18 @@ +Assignment name : aff_last_param +Expected files : aff_last_param.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes strings as arguments, and displays its last +argument followed by a newline. + +If the number of arguments is less than 1, the program displays a newline. + +Examples: + +$> ./aff_last_param "Zelda" "is" "a" "boy" | cat -e +boy$ +$> ./aff_last_param "I read this on internet !" | cat -e +I read this on internet !$ +$> ./aff_last_param | cat -e +$ diff --git a/exam_final/subjects/2-0-aff_last_param/subject.fr.txt b/exam_final/subjects/2-0-aff_last_param/subject.fr.txt new file mode 100644 index 0000000..d1de6f0 --- /dev/null +++ b/exam_final/subjects/2-0-aff_last_param/subject.fr.txt @@ -0,0 +1,17 @@ +Assignment name : aff_last_param +Expected files : aff_last_param.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme qui prend des chaînes, et affiche son dernier argument suivi d'un newline. + +S'il y a moins d'un argument, le programme affiche juste un newline. + +Exemples: + +$> ./aff_last_param "zaz" "mange" "des" "chats" | cat -e +chats$ +$> ./aff_last_param "j'aime le savon" | cat -e +j'aime le savon$ +$> ./aff_last_param | cat -e +$ -- cgit