init
This commit is contained in:
12
exam-basedir02/subjects/rostring/examples.txt
Normal file
12
exam-basedir02/subjects/rostring/examples.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
$>./rostring "abc " | cat -e
|
||||
abc$
|
||||
$>
|
||||
$>./rostring "Que la lumiere soit et la lumiere fut"
|
||||
la lumiere soit et la lumiere fut Que
|
||||
$>
|
||||
$>./rostring " AkjhZ zLKIJz , 23y"
|
||||
zLKIJz , 23y AkjhZ
|
||||
$>
|
||||
$>./rostring | cat -e
|
||||
$
|
||||
$>
|
31
exam-basedir02/subjects/rostring/subject.en.txt
Normal file
31
exam-basedir02/subjects/rostring/subject.en.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
Assignment name : rostring
|
||||
Expected files : rostring.c
|
||||
Allowed functions: write, malloc, free
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Write a program that takes a string and displays this string after rotating it
|
||||
one word to the left.
|
||||
|
||||
Thus, the first word becomes the last, and others stay in the same order.
|
||||
|
||||
A "word" is defined as a part of a string delimited either by spaces/tabs, or
|
||||
by the start/end of the string.
|
||||
|
||||
Words will be separated by only one space in the output.
|
||||
|
||||
If there's less than one argument, the program displays \n.
|
||||
|
||||
Example:
|
||||
|
||||
$>./rostring "abc " | cat -e
|
||||
abc$
|
||||
$>
|
||||
$>./rostring "Que la lumiere soit et la lumiere fut"
|
||||
la lumiere soit et la lumiere fut Que
|
||||
$>
|
||||
$>./rostring " AkjhZ zLKIJz , 23y"
|
||||
zLKIJz , 23y AkjhZ
|
||||
$>
|
||||
$>./rostring | cat -e
|
||||
$
|
||||
$>
|
31
exam-basedir02/subjects/rostring/subject.fr.txt
Normal file
31
exam-basedir02/subjects/rostring/subject.fr.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
Assignment name : rostring
|
||||
Expected files : rostring.c
|
||||
Allowed functions: write, malloc, free
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Écrire un programme qui prend en paramètre une chaîne de caractères, et qui
|
||||
affiche cette chaîne en procédant à une rotation d'un mot de droite à gauche.
|
||||
|
||||
Ainsi, le premier mot se retrouve le dernier et les autres restent dans l'ordre.
|
||||
|
||||
On appelle "mot" une portion de chaîne de caractères délimitée soit par des
|
||||
espaces et/ou des tabulations, soit par le début / fin de la chaîne.
|
||||
|
||||
Les mots affichés seront séparés par un seul et unique espace.
|
||||
|
||||
Si le nombre de paramètres est inférieur à 1, le programme devra afficher '\n'.
|
||||
|
||||
Exemple:
|
||||
|
||||
$>./rostring "abc " | cat -e
|
||||
abc$
|
||||
$>
|
||||
$>./rostring "Que la lumiere soit et la lumiere fut"
|
||||
la lumiere soit et la lumiere fut Que
|
||||
$>
|
||||
$>./rostring " AkjhZ zLKIJz , 23y"
|
||||
zLKIJz , 23y AkjhZ
|
||||
$>
|
||||
$>./rostring | cat -e
|
||||
$
|
||||
$>
|
31
exam-basedir02/subjects/rostring/subject.ro.txt
Normal file
31
exam-basedir02/subjects/rostring/subject.ro.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
Exercitii : rostring
|
||||
Fisiere de iesire : rostring.c
|
||||
Functii de iesire : write, malloc, free
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Scrieti un program ce ia ca parametru un sir de caractere si care afiseaza acest
|
||||
sir procedand la rotirea unui cuvant de la dreapta la stanga.
|
||||
|
||||
Astfel, primul cuvant va deveni ultimul, iar celelalte vor ramane in aceeasi ordine.
|
||||
|
||||
Numim "cuvant" o portiune a sirului de caractere delimitat fie de spatii si/sau
|
||||
tabulatoare, fie de inceputul/sfarsitul sirului.
|
||||
|
||||
Cuvintele vor fi afisate, separate de un singur spatiu.
|
||||
|
||||
Daca numarul de parametri este inferior lui 1, programul va trebui sa afiseze '\n'.
|
||||
|
||||
Exemplu:
|
||||
|
||||
$>./rostring "abc " | cat -e
|
||||
abc$
|
||||
$>
|
||||
$>./rostring "Que la lumiere soit et la lumiere fut"
|
||||
la lumiere soit et la lumiere fut Que
|
||||
$>
|
||||
$>./rostring " AkjhZ zLKIJz , 23y"
|
||||
zLKIJz , 23y AkjhZ
|
||||
$>
|
||||
$>./rostring | cat -e
|
||||
$
|
||||
$>
|
Reference in New Issue
Block a user