aboutsummaryrefslogtreecommitdiff
path: root/exam_final/subjects/11-0-ord_alphlong/subject.en.txt
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-07-26 23:17:36 +0200
committerCharles <sircharlesaze@gmail.com>2019-07-26 23:17:36 +0200
commit264ae2f047a53ffac92271e4609038d17605738e (patch)
tree480c68814f822439850029df0e0249a2cafb8177 /exam_final/subjects/11-0-ord_alphlong/subject.en.txt
parentad9867052d496f2c2a7f120a512208fb4dd4e787 (diff)
downloadpiscine-264ae2f047a53ffac92271e4609038d17605738e.tar.gz
piscine-264ae2f047a53ffac92271e4609038d17605738e.tar.bz2
piscine-264ae2f047a53ffac92271e4609038d17605738e.zip
exam final
Diffstat (limited to 'exam_final/subjects/11-0-ord_alphlong/subject.en.txt')
-rw-r--r--exam_final/subjects/11-0-ord_alphlong/subject.en.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/exam_final/subjects/11-0-ord_alphlong/subject.en.txt b/exam_final/subjects/11-0-ord_alphlong/subject.en.txt
new file mode 100644
index 0000000..118a1ca
--- /dev/null
+++ b/exam_final/subjects/11-0-ord_alphlong/subject.en.txt
@@ -0,0 +1,40 @@
+Assignment name : ord_alphlong
+Expected files : *.c, *.h
+Allowed functions: write, malloc, free
+--------------------------------------------------------------------------------
+
+Write a program that takes a string as a parameter and prints its words sorted
+in length order then in alphabetical order: when words are alphabetically
+equals (for example aA and Aa), original order must remain (lower and upper
+case are the same in alphabetical order). If there are duplicates, they must
+remain.
+
+If number of parameters is different from 1, the program prints
+\n.
+
+There will be only spaces, tabs and alphanumeric caracters in strings.
+
+You'll print only one space between each word. Nothing before the first and
+after the last word of each line.
+
+Examples:
+
+$>./ord_alphlong
+$
+$>./ord_alphlong "After all this time Always said Snape" | cat -e
+all$
+said this time$
+After Snape$
+Always$
+$>./ord_alphlong "A a b B cc ca cd" | cat -e
+A a b B$
+ca cc cd$
+$>./ord_alphlong "Never take a gamble you are not prepared to lose" | cat -e
+a$
+to$
+are not you$
+lose take$
+Never$
+gamble$
+prepared$
+$>