This commit is contained in:
Tanguy MAZE
2019-06-22 18:23:35 +02:00
commit f9e508d5ef
173 changed files with 6727 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
# General guidelines
* No communication whatsoever is allowed.
* This is an exam, you don't have a right to chat, listen to music, make noise, or generally do anything that may disturb the other students in any way.
* Your phones and other technological devices must be turned off and put away. If a phone rings, the whole row will be disqualified from the exam and kicked out immediately.
* Your home directory contains three directories : "rendu", "subjects" and "traces".
* The "subjects" directory will contain the subjects of your assignments
* The "rendu" folder is a clone of your Git turn-in repository. You will work in it, and use it as any regular Git repository.
* The system will not grade anything that is not pushed on your Git turn-in repository, and at the right place. Pay attention to where examshell tells you to put your files.
* You can only run your programs in the "rendu" directory or one of its subdirectories.
* You may need to read the man to carry out some assignments...
* You will be graded by a program. You must respect the specified file/path/function names to the letter.
* Assignments will always specify which files will be collected :
* When an assignment asks for specific files, they will be explicitly named. For example "file1.c file1.h".
* Otherwise, when filenames and/or the number of files is up to you, the assignment will say something along the lines of "*.c *.h".
* When a Makefile is required, it will ALWAYS be explicitly stated.
* In case of technical problem, question about the subject, or any other problem, you must get up silently and wait for a member of the staff to come to you. It is forbidden to ask your neighbors, or to verbally call for a staff member.
* Any equipment not explicitly allowed is implicitly forbidden.
* Any exit is definitive, you can not come in again.
* Staff members may kick you out of the exam without warning if they deem it necessary.
* You are allowed blank pieces of paper, and a pen. No notebooks, notes, or any help of the sort. You are alone to face this exam.
# Coding guidelines
* Useful functions and files will sometimes be given to you in the subject directory
* The correction is fully automated, and performed by the program we know as Deepthought.
* When an assignment asks you to write a program with one or more explicitly named files, it will be compiled with the following command: clang -Wall -Wextra -Werror file1.c file2.c file3.c -o program_name.
* When the assignment leaves the filenames up to you, it will be compiled with: clang -Wall -Wextra -Werror *.c -o program_name.
* Finally, when you must only turn in a function (so, one file), it will be compiled with clang -c -Wall -Wextra -Werror yourfile.c, then we will compile our main function and link them together to create a test program.
* Allowed functions will be specified in the headers of the assignments. You may recode any other function you think is necessary. Using a function that's not explicitly allowed is considered cheating, and will result in a failing grade, with no possible discussion or appeal whatsoever. You've been warned.
* Any function that isn't explicitly allowed is implicitly forbidden.

View File

@@ -0,0 +1,54 @@
# Consignes générales
* Aucune communication, quelle qu'elle soit, n'est permise
* Ceci est un examen, il est interdit de discuter, écouter de la musique, faire du bruit, ou de façon générale de faire quoi que ce soit qui puisse perturber le travail des autres étudiants.
* Vos téléphones et autres appareils technologiques doivent être éteints et rangés. Pas en silencieux, éteints. Si un téléphone sonne, toute la rangée sera exclue immédiatement de l'examen.
* Votre répertoire home contient trois répertoires : "rendu", "subjects" et "traces".
* Le répertoire "subjects" contiendra les sujets de vos exercices
* Le répertoire "rendu" contiendra un clone de votre dépôt Git de rendu. Vous y travaillerez, et l'utiliserez comme n'importe quel autre dépôt Git de rendu.
* Le système ne corrigera rien qui n'est pas push sur votre dépôt de rendu à l'endroit correct. Faites attention à ce qu'examshell vous dit concernant les emplacements de rendu.
* Vous ne pouvez lancer vos propres programmes que dans le répertoire "rendu" ou l'un de ses sous-répertoires.
* Vous aurez peut-être besoin de lire les man pour certains exercices ...
* Vous aller être corrigé par un programme. Vous devez donc respecter à la lettre les noms de fichiers/fonctions qui vous sont imposés.
* Les exercices spécifient toujours les noms de fichiers qui vous sont demandés:
* Quand on vous demande des fichiers spécifiques, ils seront nommés explicitement, par exemple "file1.c file1.h"
* Quand les noms et le nombre de fichier sont à votre discrétion, on dira quelque chose comme "*.c *.h"
* Quand il faut un Makefile, ce sera toujours explicitement précisé
* En cas de problème technique, de question sur un sujet, ou tout autre souci, vous devez vous lever EN SILENCE et attendre qu'un membre du staff vienne vous voir. Il est interdit de demander à vos voisins, ou d'appeler verbalement un membre du staff.
* Vous avez le droit à des feuilles vierges, un stylo, et c'est tout. Pas de cahiers, carnets, ou autres. Pas d'écouteurs, de casques, de portable, etc ...
* Tout équipement qui n'est pas explicitement autorisé est implicitement interdit.
* Toute sortie est définitive.
* Les membres du staff peuvent vous exclure de l'examen sans préavis s'ils l'estiment nécessaire pour quelque raison que ce soit.
# Consignes relative au code
* Des fonctions et fichiers utiles vous seront parfois donnés dans le répertoire du sujet
* Les corrections sont entièrement automatiques et réalisées par un programme nommé Deepthought
* Les programmes seront compilés avec "clang -Wall -Wextra -Werror"
* Quand on ne vous demande qu'une fonction, et non un programme, cela signifie que votre fichier sera compilé accompagné de notre propre main.c
* Les fonctions autorisées sont précisées dans les en-têtes des exercices. Vous pouvez recoder toute fonction que vous jugez nécessaire. Utiliser une fonction non-autorisée est assimilé à de la triche et résultera en un échec immédiat de l'exercice, sans appel. Vous êtes prévenu.
* Toute fonction qui n'est pas explicitement autorisée est implicitement interdite

View File

@@ -0,0 +1,56 @@
#Reguli generale de urmat la examene
*Nici un fel de comunicare nu este permisă.
*Acesta este un examen, nu aveți dreptul să vorbiți, să ascultați muzică, să faceți zgomot sau să faceți ceva ce ar putea deranja pe ceilați studenți în vreun fel.
*Telefoanele mobile sau orice alte dispozitive trebuie să fie închise și puse deoparte. Dacă sună vreun telefon, tot rândul va fi descalificat din examen și dat afară imediat!
*Directorul vostru ”home” conține trei directoare: ”rendu”, ”subjects” și ”traces”.
*Directorul ”subjects” va conține subiectul examenului vostru.
*Directorul ”rendu” este o clonă a Git-ului vostru ”turn-in repository”. Veți lucra în el, și poate fi utilizat ca orice depozit Git regulat.
*Sistemul nu va nota nimic ce nu este trimis pe Git ”turn-in repository” și în locul corect. Fiți foarte atenți unde ”examshell” va spune sa puneți fișierele voastre.
*Puteți să vă rulați programele voastre în directorul ”rendu” sau în unul din subdirectoarele lui.
*Este posibil să fie nevoie să citiți man-ul pentru a realiza un exercițiu.….
*Veți fi notați de un program. Trebuie să respectați specificațiile fisierului / căii (path) / numele funcțiilor EXACT așa cum este cerut.
*Exercițiile vor specifica întotdeauna ce fișiere vor fi corectate:
* Când un exercițiu cere un anumit fișier, acesta va fi numit explicit. De exemplu ”file1.c” sau ”file1.h”
* Altfel, când numele sau numărul de fișiere este la latitudinea voastră, exercițiul va specifica ceva de genul ”*.c” sau ”*.h”
* Când un ”Makefile” este cerut, va fi ÎNTOTDEAUNA specificată starea lui.
* În cazul unei defecțiuni tehnice, întrebări despre subiect sau orice altă problemă, trebuie să te ridici în picioare, în liniște și să aștepți ca un membru al staff-ului sa vină la tine. Este interzis să îți întrebi vecinii sau să strigi după un membru al staff-ului.
* Oricei echipament care nu este explicit permis, este implicit interzis.
* Orice părăsire a sălii de examinare este definitivă, nu te mai poți întoarce.
* Membri staff-ului vă pot da afară din examen, fără avertisment, în cazul în care consideră necesar.
* Vă este permisă intrarea în sală cu o hartie albă și un pix, Fără caiete, notițe sau orice alt ajutor de acest fel. Ești singur ca să înfrunți acest examen.
# Reguli pentru codare
* Funcții folositoare sau fișiere vor fi date, câteodată, în directorul subiectului.
* Corectarea este complet automată și se face de către un program pe care îl numim ”Deepthought”
* Când un exercițiu îți cere să scrii un program cu unul sau mai multe nume de fișiere date explicit, va fi compliat cu următoarea comandă: ”clang -Wall -Wextra -Werror file1.c file2.c file3.c -o nume_program”.
* Cand exercitiul lasa la latitudinea voastra numele fisierelor, exercitiul va fi compilat cu: clang -Wall -Wextra -Werror *.c -o program_name
* Când trebuie doar să trimiteți o funcție (adică un fișier) va fi compilat cu ”clang -c -Wall -Wextra -Werror yourfile.c” apoi noi vom compila funcția noastră principală și le vom lega împreună pentru a crea un program de test.
* Funcțiile permise vor fi specificate în antetele fiecărui exercițiu. Puteți recoda orice altă funcție credeți că este necesar. Folosirea unei funcții care nu este permisă în mod explicit este considerată trișare, și va duce la nepromovarea examenului, fără drept la discuții sau contenstații. Ați fost avertizați.
*Orice funcție, care nu este permisă în mod explicit, este implicit interzisă

1
exam-basedir02/rendu Submodule

Submodule exam-basedir02/rendu added at 4f05818062

View File

@@ -0,0 +1,20 @@
Assignment name : aff_a
Expected files : aff_a.c
Allowed functions: write
--------------------------------------------------------------------------------
Write a program that takes a string, and displays the first 'a' character it
encounters in it, followed by a newline. If there are no 'a' characters in the
string, the program just writes a newline. If the number of parameters is not
1, the program displays 'a' followed by a newline.
Example:
$> ./aff_a "abc" | cat -e
a$
$> ./aff_a "RaInB0w d4Sh!" | cat -e
a$
$> ./aff_a "ThE Ck3 Is L|3" | cat -e
$
$> ./aff_a | cat -e
a$

View File

@@ -0,0 +1,20 @@
Assignment name : aff_a
Expected files : aff_a.c
Allowed functions: write
--------------------------------------------------------------------------------
Écrire un programme qui prend une chaîne de caractères et affiche le premier
caractère 'a' qu'il y rencontre, suivi d'un newline. S'il n'y a pas de
caractère 'a' dans la chaîne, le programme affiche juste un newline. Si le
nombre de paramètres n'est pas 1, le programme affiche 'a' suivi d'un newline.
Exemple:
$> ./aff_a "abc" | cat -e
a$
$> ./aff_a "dubO a POIL" | cat -e
a$
$> ./aff_a "zz sent le poney" | cat -e
$
$> ./aff_a | cat -e
a$

View File

@@ -0,0 +1,20 @@
Exercitiu : aff_a
Fisiere de iesire : aff_a.c
Functii autorizate : write
--------------------------------------------------------------------------------
Scrieti un program ce ia ca parametru un sir de caractere, si care afiseaza la
iesirea standard primul caracter 'a' intalnit in acest sir, urmat de '\n'. Daca
nu este intalnit niciun caracter 'a', programul va afisa '\n'. Daca numarul de
parametri este diferit de 1, programul va afisa 'a' urmat de '\n'.
Example:
$> ./aff_a "abc" | cat -e
a$
$> ./aff_a "dubO a POIL" | cat -e
a$
$> ./aff_a "zz sent le poney" | cat -e
$
$> ./aff_a | cat -e
a$

View File

@@ -0,0 +1,16 @@
$> ./fprime 225225 | cat -e
3*3*5*5*7*11*13$
$> ./fprime 8333325 | cat -e
3*3*5*5*7*11*13*37$
$> ./fprime 9539 | cat -e
9539$
$> ./fprime 804577 | cat -e
804577$
$> ./fprime 42 | cat -e
2*3*7$
$> ./fprime 1 | cat -e
1$
$> ./fprime | cat -e
$
$> ./fprime 42 21 | cat -e
$

View File

@@ -0,0 +1,33 @@
Assignment name : fprime
Expected files : fprime.c
Allowed functions: printf, atoi
--------------------------------------------------------------------------------
Write a program that takes a positive int and displays its prime factors on the
standard output, followed by a newline.
Factors must be displayed in ascending order and separated by '*', so that
the expression in the output gives the right result.
If the number of parameters is not 1, simply display a newline.
The input, when there's one, will be valid.
Examples:
$> ./fprime 225225 | cat -e
3*3*5*5*7*11*13$
$> ./fprime 8333325 | cat -e
3*3*5*5*7*11*13*37$
$> ./fprime 9539 | cat -e
9539$
$> ./fprime 804577 | cat -e
804577$
$> ./fprime 42 | cat -e
2*3*7$
$> ./fprime 1 | cat -e
1$
$> ./fprime | cat -e
$
$> ./fprime 42 21 | cat -e
$

View File

@@ -0,0 +1,35 @@
Assignment name : fprime
Expected files : fprime.c
Allowed functions: printf, atoi
--------------------------------------------------------------------------------
Écrire un programme qui prend en paramètre un entier strictement positif, et
qui affiche sa décomposition en facteurs premiers sur la sortie standard,
suivie d'un '\n'.
Les facteurs doivent être affichés dans l'ordre croissant et séparés par des
'*', de telle sorte que l'expression affichée donne le bon résultat.
Si le nombre de paramètres est différent de 1, le programme doit afficher '\n'.
L'entrée, quand elle est passée, sera toujours un nombre valide sans caractères
parasites.
Exemple:
$> ./fprime 225225 | cat -e
3*3*5*5*7*11*13$
$> ./fprime 8333325 | cat -e
3*3*5*5*7*11*13*37$
$> ./fprime 9539 | cat -e
9539$
$> ./fprime 804577 | cat -e
804577$
$> ./fprime 42 | cat -e
2*3*7$
$> ./fprime 1 | cat -e
1$
$> ./fprime | cat -e
$
$> ./fprime 42 21 | cat -e
$

View File

@@ -0,0 +1,34 @@
Exercitiu : fprime
Fisiere de iesire : fprime.c
Functii autorizate : printf, atoi
--------------------------------------------------------------------------------
Scrieti un program ce ia ca parametru un intreg strict pozitiv si care va afisa
descompunerea in factori primi la iesirea standard, urmat de un '\n'.
Factorii trebuie sa fie afisati in ordine crescatoare si separati de '*',
astfel incat expresia afisata sa dea rezultatul corect.
Daca numarul de parametri este diferit de 1, programul va afisa '\n'.
Parametrul de intrare, cand este transmis, va fi totdeauna un numar valid
fara caractere neconforme.
Exemplu:
$> ./fprime 225225 | cat -e
3*3*5*5*7*11*13$
$> ./fprime 8333325 | cat -e
3*3*5*5*7*11*13*37$
$> ./fprime 9539 | cat -e
9539$
$> ./fprime 804577 | cat -e
804577$
$> ./fprime 42 | cat -e
2*3*7$
$> ./fprime 1 | cat -e
1$
$> ./fprime | cat -e
$
$> ./fprime 42 21 | cat -e
$

View File

@@ -0,0 +1,20 @@
Assignment name : ft_atoi_base
Expected files : ft_atoi_base.c
Allowed functions: None
--------------------------------------------------------------------------------
Write a function that converts the string argument str (base N <= 16)
to an integer (base 10) and returns it.
The characters recognized in the input are: 0123456789abcdef
Those are, of course, to be trimmed according to the requested base. For
example, base 4 recognizes "0123" and base 16 recognizes "0123456789abcdef".
Uppercase letters must also be recognized: "12fdb3" is the same as "12FDB3".
Minus signs ('-') are interpreted only if they are the first character of the
string.
Your function must be declared as follows:
int ft_atoi_base(const char *str, int str_base);

View File

@@ -0,0 +1,21 @@
Assignment name : ft_atoi_base
Expected files : ft_atoi_base.c
Allowed functions: None
--------------------------------------------------------------------------------
Écrire une fonction qui convertit son argument 'str', une chaîne (en base N <= 16)
en un entier (base 10) et le retourne.
Les caractères reconnus dans l'entrée sont : 0123456789abcdef
Bien entendu, la base demandée conditionne le nombre de caractères à prendre
en compte. Par exemple, la base 4 reconnaîtra "0123" et la base 16 reconnaîtra
"0123456789abcdef".
Les majuscules marchent aussi : "12fdb3" est pareil que "12FDB3".
Les caractères '-' doivent être interprétés seulement s'ils sont en première
position dans la chaîne.
Votre fonction sera déclarée comme suit:
int ft_atoi_base(const char *str, int str_base);

View File

@@ -0,0 +1,11 @@
Assignment name : ft_itoa
Expected files : ft_itoa.c
Allowed functions: malloc
--------------------------------------------------------------------------------
Write a function that takes an int and converts it to a null-terminated string.
The function returns the result in a char array that you must allocate.
Your function must be declared as follows:
char *ft_itoa(int nbr);

View File

@@ -0,0 +1,12 @@
Assignment name : ft_itoa
Expected files : ft_itoa.c
Allowed functions: malloc
--------------------------------------------------------------------------------
Écrire une fonction qui prend un int et le convertit en chaîne terminée par un
caractère nul. Cette fonction retourne le résultat en tant qu'un tableau de
char que vous devez allouer.
Votre fonction sera déclarée comme suit:
char *ft_itoa(int nbr);

View File

@@ -0,0 +1,10 @@
Assignment name : ft_itoa
Expected files : ft_itoa.c
Allowed functions: malloc
--------------------------------------------------------------------------------
Scrieti o functie care primeste un int si il converteste intr-un sir de caractere, care se termina cu null. Functia returneaza resultatul intr-un vector de char pe care trebuie sa il alocati.
Functia trebuie declarata ca si mai jos:
char *ft_itoa(int nbr);

View File

@@ -0,0 +1,20 @@
Assignment name : ft_itoa_base
Expected files : ft_itoa_base.c
Allowed functions: malloc
--------------------------------------------------------------------------------
Write a function that converts an integer value to a null-terminated string
using the specified base and stores the result in a char array that you must
allocate.
The base is expressed as an integer, from 2 to 16. The characters comprising
the base are the digits from 0 to 9, followed by uppercase letter from A to F.
For example, base 4 would be "0123" and base 16 "0123456789ABCDEF".
If base is 10 and value is negative, the resulting string is preceded with a
minus sign (-). With any other base, value is always considered unsigned.
Your function must be declared as follows:
char *ft_itoa_base(int value, int base);

View File

@@ -0,0 +1,21 @@
Assignment name : ft_itoa_base
Expected files : ft_itoa_base.c
Allowed functions: malloc
--------------------------------------------------------------------------------
Écrire une fonction qui prend un int et le convertit en chaîne terminée par un
caractère nul, en utilisant la base passée en paramètre. Cette fonction
retourne le résultat en tant qu'un tableau de char que vous devez allouer.
La base est exprimée par un entier qui va de 2 à 16. Les caractères composant
la base sont les chiffres de 0 à 9 suivis par les lettres majuscules A à F.
Par exemple, la base 4 serait "0123" et la base 16 "0123456789ABCDEF".
Si la base est 10 et la valeur est négative, la chaîne de sortie doit être
précédée d'un caractère '-'. Pour toute autre base, la valeur est toujours
considérée non-signée.
Votre fonction doit être déclarée comme suit:
char *ft_itoa_base(int value, int base);

View File

@@ -0,0 +1,11 @@
$> ./last_word "FOR PONY" | cat -e
PONY$
$> ./last_word "this ... is sparta, then again, maybe not" | cat -e
not$
$> ./last_word " " | cat -e
$
$> ./last_word "a" "b" | cat -e
$
$> ./last_word " lorem,ipsum " | cat -e
lorem,ipsum$
$>

View File

@@ -0,0 +1,25 @@
Assignment name : last_word
Expected files : last_word.c
Allowed functions: write
--------------------------------------------------------------------------------
Write a program that takes a string and displays its last word followed by a \n.
A word is a section of string delimited by spaces/tabs or by the start/end of
the string.
If the number of parameters is not 1, or there are no words, display a newline.
Example:
$> ./last_word "FOR PONIES" | cat -e
PONIES$
$> ./last_word "this ... is sparta, then again, maybe not" | cat -e
not$
$> ./last_word " " | cat -e
$
$> ./last_word "a" "b" | cat -e
$
$> ./last_word " lorem,ipsum " | cat -e
lorem,ipsum$
$>

View File

@@ -0,0 +1,27 @@
Assignment name : last_word
Expected files : last_word.c
Allowed functions: write
--------------------------------------------------------------------------------
Écrire un programme qui prend une chaîne de caractères en paramètre, et qui
affiche le dernier mot de cette chaîne, suivi d'un '\n'.
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.
Si le nombre de paramètres transmis est différent de 1, ou s'il n'y a aucun mot
à afficher, le programme affiche '\n'.
Exemple:
$> ./last_word "FOR PONY" | cat -e
PONY$
$> ./last_word "this ... is sparta, then again, maybe not" | cat -e
not$
$> ./last_word " " | cat -e
$
$> ./last_word "a" "b" | cat -e
$
$> ./last_word " lorem,ipsum " | cat -e
lorem,ipsum$
$>

View File

@@ -0,0 +1,27 @@
Exercitiu : last_word
Fisiere de iesire : last_word.c
Functii autorizate : write
--------------------------------------------------------------------------------
Scrieti un program ce ia ca parametru un sir de caractere si care afiseaza ultimul
cuvant al acestui sir urmat de '\n'.
Numim "cuvant" o portiune a sirului de caractere delimitat fie de spatii si/sau
tabulatoare, fie de incepulul ori sfarsitul sirului.
Daca numarul de parametri transmis este diferit de 1, sau nu exista nicun cuvant
de afisat, programul va afisa '\n'.
Exemple:
$> ./last_word "FOR PONY" | cat -e
PONY$
$> ./last_word "this ... is sparta, then again, maybe not" | cat -e
not$
$> ./last_word " " | cat -e
$
$> ./last_word "a" "b" | cat -e
$
$> ./last_word " lorem,ipsum " | cat -e
lorem,ipsum$
$>

View 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
$
$>

View 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
$
$>

View 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
$
$>

View 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
$
$>

View File

@@ -0,0 +1,12 @@
$>./rotone "abc"
bcd
$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e
Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$
$>./rotone "AkjhZ zLKIJz , 23y " | cat -e
BlkiA aMLJKa , 23z $
$>./rotone | cat -e
$
$>
$>./rotone "" | cat -e
$
$>

View File

@@ -0,0 +1,28 @@
Assignment name : rotone
Expected files : rotone.c
Allowed functions: write
--------------------------------------------------------------------------------
Write a program that takes a string and displays it, replacing each of its
letters by the next one in alphabetical order.
'z' becomes 'a' and 'Z' becomes 'A'. Case remains unaffected.
The output will be followed by a \n.
If the number of arguments is not 1, the program displays \n.
Example:
$>./rotone "abc"
bcd
$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e
Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$
$>./rotone "AkjhZ zLKIJz , 23y " | cat -e
BlkiA aMLJKa , 23z $
$>./rotone | cat -e
$
$>
$>./rotone "" | cat -e
$
$>

View File

@@ -0,0 +1,31 @@
Assignment name : rotone
Expected files : rotone.c
Allowed functions: write
--------------------------------------------------------------------------------
Écrire un programme nommé rotone, qui prend en paramètre une chaîne de
caractères, et qui affiche cette chaîne en remplaçant chaque caractère
alphabétique par le caractère suivant dans l'ordre alphabétique.
'z' devient 'a' et 'Z' devient 'A'. Les majuscules restent des majuscules, les
minuscules restent des minuscules.
L'affichage se termine toujours par un retour à la ligne.
Si le nombre de paramètres transmis est différent de 1, le programme affiche
'\n'.
Exemple:
$>./rotone "abc"
bcd
$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e
Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$
$>./rotone "AkjhZ zLKIJz , 23y " | cat -e
BlkiA aMLJKa , 23z $
$>./rotone | cat -e
$
$>
$>./rotone "" | cat -e
$
$>

View File

@@ -0,0 +1,30 @@
Exercitiu : rotone
Fisiere de iesire : rotone.c
Functii autorizate : write
--------------------------------------------------------------------------------
Scrieti un program numit rotone, ce ia ca parametru un sir de caractere si care
afiseaza acest sir inlocuind fiecare caracter alfabetic cu caracterul urmator
in ordine alfabetica.
'z' devine 'a' si 'Z' devine 'A'. Majusculele raman majuscule, iar minusculele
raman minuscule.
Afisarea se termina intotdeauna cu un retur de linie.
Daca numarul de parametri transmis este diferit de 1, programul va afisa '\n'.
Exemplu:
$>./rotone "abc"
bcd
$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e
Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$
$>./rotone "AkjhZ zLKIJz , 23y " | cat -e
BlkiA aMLJKa , 23z $
$>./rotone | cat -e
$
$>
$>./rotone "" | cat -e
$
$>

View File

@@ -0,0 +1,72 @@
= Host-specific information ====================================================
$> hostname; uname -msr
e1r2p22.42.fr
Darwin 16.7.0 x86_64
$> date
Sun Apr 15 18:53:34 CEST 2018
$> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$> clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
= User files collection ========================================================
Collecting user files from Vogsphere
Repository URL: auto-exam/2018/c-exam-alone-in-the-dark-beginner/practice-exam_20180415/tmaze
= Git history ==================================================================
$> git -C /var/folders/gn/752g7c9969g_34cxrh7q_73w0000gq/T/tmpQBUvov/user log --pretty='%H - %an, %ad : %s'
7e6a238b497dc094b3da7b312c9947f083762a0b - Tanguy MAZE, Sun Apr 15 18:53:13 2018 +0200 : aff_a
= Collected files ==========================================
$> ls -lAR /var/folders/gn/752g7c9969g_34cxrh7q_73w0000gq/T/tmpQBUvov/user
total 8
-rw-r--r-- 1 deepthought deepthought 231 Apr 15 18:53 __GIT_HISTORY
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 18:53 aff_a
/var/folders/gn/752g7c9969g_34cxrh7q_73w0000gq/T/tmpQBUvov/user/aff_a:
total 8
-rw-r--r-- 1 deepthought deepthought 1173 Apr 15 18:53 aff_a.c
= aff_a ========================================================================
$> clang -Wextra -Wall -Werror aff_a.c -o user_exe
= Test 1 ===================================================
$> ./ezfshj5q2zawxihsplzwj3vb
$> diff -U 3 user_output_test1 test1.output | cat -e
Diff OK :D
= Test 2 ===================================================
$> ./4lmsi690xwxu102bl347meqh "17" "23" "42"
$> diff -U 3 user_output_test2 test2.output | cat -e
Diff OK :D
= Test 3 ===================================================
$> ./48tkangdfazmkooqx1gxbl3r "OaQ0"
$> diff -U 3 user_output_test3 test3.output | cat -e
Diff OK :D
= Test 4 ===================================================
$> ./j9nj3whajx528tzlo9t4b5v2 "aChgWXdAP46LzQ"
$> diff -U 3 user_output_test4 test4.output | cat -e
Diff OK :D
= Test 5 ===================================================
$> ./39e80kk37kkizsjzgtrcuil0 "Y0xe"
$> diff -U 3 user_output_test5 test5.output | cat -e
Diff OK :D
= Test 6 ===================================================
$> ./w8vi5lv34vx69jn4deqsibs8 "xlgGHPL"
$> diff -U 3 user_output_test6 test6.output | cat -e
Diff OK :D
Grade: 1
= Final grade: 1 ===============================================================

View File

@@ -0,0 +1,148 @@
= Host-specific information ====================================================
$> hostname; uname -msr
e2r6p6.42.fr
Darwin 16.7.0 x86_64
$> date
Sun Apr 15 19:02:49 CEST 2018
$> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$> clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
= User files collection ========================================================
Collecting user files from Vogsphere
Repository URL: auto-exam/2018/c-exam-alone-in-the-dark-beginner/practice-exam_20180415/tmaze
= Git history ==================================================================
$> git -C /var/folders/yt/j6phq77s49x1q7fnp3tn5l6m0000gq/T/tmpcL3Qu6/user log --pretty='%H - %an, %ad : %s'
6cbf3dea3a97b714b5a7e3503b16758fa4ca53ae - Tanguy MAZE, Sun Apr 15 19:02:40 2018 +0200 : rotone
7e6a238b497dc094b3da7b312c9947f083762a0b - Tanguy MAZE, Sun Apr 15 18:53:13 2018 +0200 : aff_a
= Collected files ==========================================
$> ls -lAR /var/folders/yt/j6phq77s49x1q7fnp3tn5l6m0000gq/T/tmpcL3Qu6/user
total 8
-rw-r--r-- 1 deepthought deepthought 471 Apr 15 19:02 __GIT_HISTORY
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 19:02 aff_a
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 19:02 rotone
/var/folders/yt/j6phq77s49x1q7fnp3tn5l6m0000gq/T/tmpcL3Qu6/user/aff_a:
total 8
-rw-r--r-- 1 deepthought deepthought 1173 Apr 15 19:02 aff_a.c
/var/folders/yt/j6phq77s49x1q7fnp3tn5l6m0000gq/T/tmpcL3Qu6/user/rotone:
total 8
-rw-r--r-- 1 deepthought deepthought 1276 Apr 15 19:02 rotone.c
= rotone =======================================================================
$> clang -Wextra -Wall -Werror rotone.c -o user_exe
= Test 1 ===================================================
$> ./sr0aeykua2f7xqp3al5d4ndy
$> diff -U 3 user_output_test1 test1.output | cat -e
Diff OK :D
= Test 2 ===================================================
$> ./50vee23b62qgw6hl6p9h2461
$> diff -U 3 user_output_test2 test2.output | cat -e
Diff OK :D
= Test 3 ===================================================
$> ./yrbhftewj049xn4bhio0ago7 "salut" "a" "tous" "tout" "le" "monde"
$> diff -U 3 user_output_test3 test3.output | cat -e
Diff OK :D
= Test 4 ===================================================
$> ./g813zz7vce6iqa7id2a8k381 "X53rNJaH"
$> diff -U 3 user_output_test4 test4.output | cat -e
Diff OK :D
= Test 5 ===================================================
$> ./sblc9wyswgompvar33yxpn21 "SFsU6kMB31cxj"
$> diff -U 3 user_output_test5 test5.output | cat -e
Diff OK :D
= Test 6 ===================================================
$> ./ygbuidmj727ywzhd7hvnorwa "HJp"
$> diff -U 3 user_output_test6 test6.output | cat -e
Diff OK :D
= Test 7 ===================================================
$> ./vuwx0n3vrzqsq231mo52n0r4 "5MR6VGDEcAiI EZQo1HJO yG8WeXDaBlCihfFLT yI4HvO"
$> diff -U 3 user_output_test7 test7.output | cat -e
Diff OK :D
= Test 8 ===================================================
$> ./ytoscuxnm80ok82q37s7rsf3 "62dnRx9cH73MkS Pvk5Uj tjFL5 3x49VyDZW 0luk2g7 rw4y 7y0C45Wfeq g1U6ad8Hx QblJm tKUO hyEiUWLa19pMb5O 5LTV2EuZGm"
$> diff -U 3 user_output_test8 test8.output | cat -e
Diff OK :D
= Test 9 ===================================================
$> ./46jomn8lhuc1u90tdd5bibyu "xdflAMVXtmb2gGB UsWq58yF4zLnGlS qXnHzI84Cv 7AxGhF5rE20TwvkK pDJmv8ZyMqj 3GcgRJOidYC54K uINozwkhXncBHd q0waRYPv1NE2 jJ4zERchblZ9q"
$> diff -U 3 user_output_test9 test9.output | cat -e
Diff OK :D
= Test 10 ==================================================
$> ./m9ttbkhfn80xtsqlw9t4zyts ":v6lKF1k9sSD)r7QoqvPcfGOSi02Kn7ZeoslQ8NAVx 25pWJygGz 0"
$> diff -U 3 user_output_test10 test10.output | cat -e
Diff OK :D
= Test 11 ==================================================
$> ./m65ik6zxavtze5ot3f6xb7b7 "2aK21E8w4DL 7OJ30pSxF9 "
$> diff -U 3 user_output_test11 test11.output | cat -e
Diff OK :D
= Test 12 ==================================================
$> ./fhjwk7fh3wn5w0ghrgsl7821 "(CfVXaj=3ZHO8jSscIkF:"
$> diff -U 3 user_output_test12 test12.output | cat -e
Diff OK :D
= Test 13 ==================================================
$> ./c6qee16x8zn3mxqhn5h1fw08 " .GW3e5uRFL 7"
$> diff -U 3 user_output_test13 test13.output | cat -e
Diff OK :D
= Test 14 ==================================================
$> ./v839w2yr65sdc1rgc8cr7z64 "3LpCq4 uBR8nY7yMvIizg @CsVN8fiJcnLhd ?R9peXOd -7gf3Dc1XPle3>tcVqE*"
$> diff -U 3 user_output_test14 test14.output | cat -e
Diff OK :D
= Test 15 ==================================================
$> ./g0aj2j9tr5vtxqczqsm1w7sk " ?x9MYbyw8TziCo=z8v55"
$> diff -U 3 user_output_test15 test15.output | cat -e
Diff OK :D
= Test 16 ==================================================
$> ./kodl3msjao4nh5t2de7m53ln "*YfFjn3pOJCWxETi@bM6c3zBXy5VeLF1"
$> diff -U 3 user_output_test16 test16.output | cat -e
Diff OK :D
= Test 17 ==================================================
$> ./dnrfwmil3ib5oowcsmvju2f4 "5Sdg5PW:9nrdAHq8savN0RZ2syYzkjbCJm xGuFV0pHQB SFbtwqrD31cG?MZrs01A6Lx3C4VEYBz7ZP5uAC3PNxZzjhT 0KnVSUMw23*YHgGUrx21X?"
$> diff -U 3 user_output_test17 test17.output | cat -e
Diff OK :D
= Test 18 ==================================================
$> ./7e6qutaqggut5i0c1sdzokgj "4GfNmuAKC8F520ldVEpmDax+"
$> diff -U 3 user_output_test18 test18.output | cat -e
Diff OK :D
= Test 19 ==================================================
$> ./pqmbc9unkidt86i6bbulfnyt "0dOLjcC8HG0JTImo :2Xizuv6c5LqRtFM45v ,tRe7CumU5Ia2pw*eK21vtAg3YHoPG7y>Y7Dbt1k -Gsqmh2H65ZITFgL3t "
$> diff -U 3 user_output_test19 test19.output | cat -e
Diff OK :D
= Test 20 ==================================================
$> ./n22ushkzrrrnhfghpf7ki1ue " h2uvZ4Lzdn (glaBT0ApdOZs =w52iEI ONjde 6jNpsXKUZ 2HVI13akJX7 *M0eNR4rZPq (8vkplrYeWfbq5U ("
$> diff -U 3 user_output_test20 test20.output | cat -e
Diff OK :D
Grade: 1
= Final grade: 1 ===============================================================

View File

@@ -0,0 +1,154 @@
= Host-specific information ====================================================
$> hostname; uname -msr
e3r3p7.42.fr
Darwin 16.7.0 x86_64
$> date
Sun Apr 15 19:21:16 CEST 2018
$> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$> clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
= User files collection ========================================================
Collecting user files from Vogsphere
Repository URL: auto-exam/2018/c-exam-alone-in-the-dark-beginner/practice-exam_20180415/tmaze
= Git history ==================================================================
$> git -C /var/folders/z2/by9fztvn2gsc0l5_5rlwjxj80000gq/T/tmpH8Lgw0/user log --pretty='%H - %an, %ad : %s'
6d83726a6b82be8915fca3fc254d258ed7090e88 - Tanguy MAZE, Sun Apr 15 19:21:05 2018 +0200 : last_word
6cbf3dea3a97b714b5a7e3503b16758fa4ca53ae - Tanguy MAZE, Sun Apr 15 19:02:40 2018 +0200 : rotone
7e6a238b497dc094b3da7b312c9947f083762a0b - Tanguy MAZE, Sun Apr 15 18:53:13 2018 +0200 : aff_a
= Collected files ==========================================
$> ls -lAR /var/folders/z2/by9fztvn2gsc0l5_5rlwjxj80000gq/T/tmpH8Lgw0/user
total 8
-rw-r--r-- 1 deepthought deepthought 731 Apr 15 19:21 __GIT_HISTORY
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 19:21 aff_a
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 19:21 last_word
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 19:21 rotone
/var/folders/z2/by9fztvn2gsc0l5_5rlwjxj80000gq/T/tmpH8Lgw0/user/aff_a:
total 8
-rw-r--r-- 1 deepthought deepthought 1173 Apr 15 19:21 aff_a.c
/var/folders/z2/by9fztvn2gsc0l5_5rlwjxj80000gq/T/tmpH8Lgw0/user/last_word:
total 8
-rw-r--r-- 1 deepthought deepthought 1463 Apr 15 19:21 last_word.c
/var/folders/z2/by9fztvn2gsc0l5_5rlwjxj80000gq/T/tmpH8Lgw0/user/rotone:
total 8
-rw-r--r-- 1 deepthought deepthought 1276 Apr 15 19:21 rotone.c
= last_word ====================================================================
$> clang -Wextra -Wall -Werror last_word.c -o user_exe
= Test 1 ===================================================
$> ./birzgojkhj9ddswht7dyqrcb
$> diff -U 3 user_output_test1 test1.output | cat -e
Diff OK :D
= Test 2 ===================================================
$> ./njj8wkplu36dhv9edo4dctik
$> diff -U 3 user_output_test2 test2.output | cat -e
Diff OK :D
= Test 3 ===================================================
$> ./5c5atrxzywx7b4zdoon6iwqk "salut" "a" "tous" "tout" "le" "monde"
$> diff -U 3 user_output_test3 test3.output | cat -e
Diff OK :D
= Test 4 ===================================================
$> ./egmfgcscdrekvxv5meslss5o "enA7TMx"
$> diff -U 3 user_output_test4 test4.output | cat -e
Diff OK :D
= Test 5 ===================================================
$> ./5up07lbj37newybzc2gyxbw3 "KztsfX9qcpb"
$> diff -U 3 user_output_test5 test5.output | cat -e
Diff OK :D
= Test 6 ===================================================
$> ./l52zdlhm14gw6dd8qy925z73 "ib3awRtp1HfW"
$> diff -U 3 user_output_test6 test6.output | cat -e
Diff OK :D
= Test 7 ===================================================
$> ./cv9w2dar4foyjuoo9sozjkxg "gmz kwKG7YS5h FVmeRIxNLH24kE WCF3M RZE36ckQvxbypg cWA1SuTtBngGlrs4v"
$> diff -U 3 user_output_test7 test7.output | cat -e
Diff OK :D
= Test 8 ===================================================
$> ./2g8o6xbtu15jkjmv09vwkft5 "ATRQtP4GwaUL jO7EY3IpR94V EOv a0bdAnjltNk8M FiOK2 fuvUbGsZ xmBeA c248flAU tnh30yF7SV1 yoP trZTKRC0Y AeFOVG7 GZbtvzkCPr VNtjMgLUxefQ1iBC 8CqEc1K"
$> diff -U 3 user_output_test8 test8.output | cat -e
Diff OK :D
= Test 9 ===================================================
$> ./fhd0oq05923whufd5686cmvu "cOawiREpILD lXAIhNS70M2kgC I51XKe FyIs5ta kL8p rwmR97QU45YVXTxOZ yRVF Sp7MQnOof2BWxlhd T4KmxNrERPJ5u KWxw2AkYjvBCn1O4 sTb6YKzRlokvZ85p Z84m6U EIZulayk3 CHp62cSky1JrBKX mro 4Cl"
$> diff -U 3 user_output_test9 test9.output | cat -e
Diff OK :D
= Test 10 ==================================================
$> ./d64fo2osc7iu59loje5vdvz9 " <lo4AT jfFauRS09wgZOx5IGlFNhC4JEduDcK ,8aZukbUfjqB 23OcpPIr4EL "
$> diff -U 3 user_output_test10 test10.output | cat -e
Diff OK :D
= Test 11 ==================================================
$> ./afd0qk1yjufclpie3533v9un "7cJNft9ehCnsxqL0kVESWO whTvSlCJVPW3q4 <eglTir biGf80@UXDSHg35xp.7mb/"
$> diff -U 3 user_output_test11 test11.output | cat -e
Diff OK :D
= Test 12 ==================================================
$> ./w13b7uhxzhkjq65jg6pxcm4c ">LSAmO *oX5mctyO(HV8gBhkdUC "
$> diff -U 3 user_output_test12 test12.output | cat -e
Diff OK :D
= Test 13 ==================================================
$> ./4b8sdd13p4zlv53hucce5clb " +rRtSw3ncH5GPk;xnJGFRqP2Y8X +LjHgXMQYbw2BhrA11eIluqvh8aBAYk(ieT 170vz5i,rufV2oJsp50NY4"
$> diff -U 3 user_output_test13 test13.output | cat -e
Diff OK :D
= Test 14 ==================================================
$> ./cpu7vr77p8l48ae2kivg6zxp "-w8vDhH11VLBsUZmScMHKu80tfTmZwqecx9Oky4ud ;"
$> diff -U 3 user_output_test14 test14.output | cat -e
Diff OK :D
= Test 15 ==================================================
$> ./xa5qvxlep9q3z5qkk4woa57r " rI5iocPdRmNg3 @of5MdhQFwtlND0Rj2>L5qSchZbB +LW3i9Rs0YkKS WEK0UcH2PRh83pfCA3KV lUfOiE:LE4hR;"
$> diff -U 3 user_output_test15 test15.output | cat -e
Diff OK :D
= Test 16 ==================================================
$> ./qlp5iask2jafi1zkesauullg " 7TBnHfXYb86QmIqgVs4PeDali5HBXh9eYviFkSdygNQ3*"
$> diff -U 3 user_output_test16 test16.output | cat -e
Diff OK :D
= Test 17 ==================================================
$> ./qrdoypdnlxt1fszbthttj9k0 ")TAMy9GwQ <"
$> diff -U 3 user_output_test17 test17.output | cat -e
Diff OK :D
= Test 18 ==================================================
$> ./a5zric6x40eg98dhdr1tenrk " =1qYTEcpMCKk )Lj04l35.NZ0q6ErWbj T0NlXy8U7wa31j9 .GFZvla48Tmn *hu0odfLbQ>"
$> diff -U 3 user_output_test18 test18.output | cat -e
Diff OK :D
= Test 19 ==================================================
$> ./jrb5fonq3xjm61mtwut9np5s " /xkuKObVUPQeh4tm ?bB6GXmS.Ranb6mJs8iusZU83vAYSwk5/YERj6DmJ-Qax3cGUuhoSDw;PBJ3-"
$> diff -U 3 user_output_test19 test19.output | cat -e
Diff OK :D
= Test 20 ==================================================
$> ./51relk86o6wrlnqdkk86oxqo " 6rqy Neg4HPacRO DyANrS9gCQ)"
$> diff -U 3 user_output_test20 test20.output | cat -e
Diff OK :D
Grade: 1
= Final grade: 1 ===============================================================

View File

@@ -0,0 +1,160 @@
= Host-specific information ====================================================
$> hostname; uname -msr
e2r4p6.42.fr
Darwin 16.7.0 x86_64
$> date
Sun Apr 15 20:13:22 CEST 2018
$> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$> clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
= User files collection ========================================================
Collecting user files from Vogsphere
Repository URL: auto-exam/2018/c-exam-alone-in-the-dark-beginner/practice-exam_20180415/tmaze
= Git history ==================================================================
$> git -C /var/folders/p7/2hgwzwv96m12qmfm2ncsp6z80000gq/T/tmpDqWqa2/user log --pretty='%H - %an, %ad : %s'
c3407605045e34e5ec46745468c80ed637c04ddc - Tanguy MAZE, Sun Apr 15 20:12:52 2018 +0200 : ft_atoi_base
6d83726a6b82be8915fca3fc254d258ed7090e88 - Tanguy MAZE, Sun Apr 15 19:21:05 2018 +0200 : last_word
6cbf3dea3a97b714b5a7e3503b16758fa4ca53ae - Tanguy MAZE, Sun Apr 15 19:02:40 2018 +0200 : rotone
7e6a238b497dc094b3da7b312c9947f083762a0b - Tanguy MAZE, Sun Apr 15 18:53:13 2018 +0200 : aff_a
= Collected files ==========================================
$> ls -lAR /var/folders/p7/2hgwzwv96m12qmfm2ncsp6z80000gq/T/tmpDqWqa2/user
total 8
-rw-r--r-- 1 deepthought deepthought 994 Apr 15 20:13 __GIT_HISTORY
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 20:13 aff_a
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 20:13 ft_atoi_base
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 20:13 last_word
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 20:13 rotone
/var/folders/p7/2hgwzwv96m12qmfm2ncsp6z80000gq/T/tmpDqWqa2/user/aff_a:
total 8
-rw-r--r-- 1 deepthought deepthought 1173 Apr 15 20:13 aff_a.c
/var/folders/p7/2hgwzwv96m12qmfm2ncsp6z80000gq/T/tmpDqWqa2/user/ft_atoi_base:
total 8
-rw-r--r-- 1 deepthought deepthought 1788 Apr 15 20:13 ft_atoi_base.c
/var/folders/p7/2hgwzwv96m12qmfm2ncsp6z80000gq/T/tmpDqWqa2/user/last_word:
total 8
-rw-r--r-- 1 deepthought deepthought 1463 Apr 15 20:13 last_word.c
/var/folders/p7/2hgwzwv96m12qmfm2ncsp6z80000gq/T/tmpDqWqa2/user/rotone:
total 8
-rw-r--r-- 1 deepthought deepthought 1276 Apr 15 20:13 rotone.c
= ft_atoi_base =================================================================
$> clang -Wextra -Wall -Werror ft_atoi_base.c main.c -o user_exe
= Test 1 ===================================================
$> ./nniwepcc4bf716mbquid38y6
$> diff -U 3 user_output_test1 test1.output | cat -e
Diff OK :D
= Test 2 ===================================================
$> ./pjfwxp1mvpr1l8vwn67pyfld "21" "2313" "12"
$> diff -U 3 user_output_test2 test2.output | cat -e
Diff OK :D
= Test 3 ===================================================
$> ./je3vfvi2gfvipin4mduavehw "2147483647" "10"
$> diff -U 3 user_output_test3 test3.output | cat -e
Diff OK :D
= Test 4 ===================================================
$> ./91o58o7st9u5s2yxbfyyllk8 "-2147483648" "10"
$> diff -U 3 user_output_test4 test4.output | cat -e
Diff OK :D
= Test 5 ===================================================
$> ./t429n189gcb6cv8lys7v4urf "0" "2"
$> diff -U 3 user_output_test5 test5.output | cat -e
Diff OK :D
= Test 6 ===================================================
$> ./137etmngkcwzwyurlalaqbfc "--223" "10"
$> diff -U 3 user_output_test6 test6.output | cat -e
Diff OK :D
= Test 7 ===================================================
$> ./7pl9bgzankmujlvxod6s71z1 "463262768" "12"
$> diff -U 3 user_output_test7 test7.output | cat -e
Diff OK :D
= Test 8 ===================================================
$> ./ysmwzvzbx2e4cji0uhqc2keo "2260135104" "8"
$> diff -U 3 user_output_test8 test8.output | cat -e
Diff OK :D
= Test 9 ===================================================
$> ./1mg80ppd38lb036pr601l1a5 "4807B94" "13"
$> diff -U 3 user_output_test9 test9.output | cat -e
Diff OK :D
= Test 10 ==================================================
$> ./ccimt84kkc6czztuyum8cppl "212200210121210021" "3"
$> diff -U 3 user_output_test10 test10.output | cat -e
Diff OK :D
= Test 11 ==================================================
$> ./x9nhzrc9sxt2aawzu5wgyg6j "-10111010110101011100000100" "2"
$> diff -U 3 user_output_test11 test11.output | cat -e
Diff OK :D
= Test 12 ==================================================
$> ./lbr16qgy4gak73ul1pb0mu8l "48C14A51" "15"
$> diff -U 3 user_output_test12 test12.output | cat -e
Diff OK :D
= Test 13 ==================================================
$> ./e0fv7ojp4ez1ipv1dy0dqfsj "1212022133321313" "4"
$> diff -U 3 user_output_test13 test13.output | cat -e
Diff OK :D
= Test 14 ==================================================
$> ./rsoge09fe9ox4lknzhreawxw "38aA7Bd7" "14"
$> diff -U 3 user_output_test14 test14.output | cat -e
Diff OK :D
= Test 15 ==================================================
$> ./exqo8yikhjvktrmprz2av1z9 "10101212212202010121" "3"
$> diff -U 3 user_output_test15 test15.output | cat -e
Diff OK :D
= Test 16 ==================================================
$> ./2bxuavqqac8zhr56rsm41l9v "1312333330200112" "4"
$> diff -U 3 user_output_test16 test16.output | cat -e
Diff OK :D
= Test 17 ==================================================
$> ./hyc9zvid45pjod98tndhfg0b "4aC339E7" "15"
$> diff -U 3 user_output_test17 test17.output | cat -e
Diff OK :D
= Test 18 ==================================================
$> ./abepkj4auy9wga7yecrvmu4m "19782B933" "12"
$> diff -U 3 user_output_test18 test18.output | cat -e
Diff OK :D
= Test 19 ==================================================
$> ./o7qzj96i9e1y9w8oqq1iez7c "220201120022001122" "3"
$> diff -U 3 user_output_test19 test19.output | cat -e
Diff OK :D
= Test 20 ==================================================
$> ./jbhkikge8uicanl8zztk5fn7 "40a76aa79" "12"
$> diff -U 3 user_output_test20 test20.output | cat -e
Diff OK :D
Grade: 1
= Final grade: 1 ===============================================================

View File

@@ -0,0 +1,67 @@
= Host-specific information ====================================================
$> hostname; uname -msr
e2r2p17.42.fr
Darwin 16.7.0 x86_64
$> date
Sun Apr 15 21:01:50 CEST 2018
$> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$> clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
= User files collection ========================================================
Collecting user files from Vogsphere
Repository URL: auto-exam/2018/c-exam-alone-in-the-dark-beginner/practice-exam_20180415/tmaze
= Git history ==================================================================
$> git -C /var/folders/s0/pmy608wd3y76cch8zwjlwv780000gq/T/tmpPtYH1V/user log --pretty='%H - %an, %ad : %s'
6d5a04375cefa27e521dd4713b33a37e0ce2b579 - Tanguy MAZE, Sun Apr 15 21:01:39 2018 +0200 : ft_itoa_base
c3407605045e34e5ec46745468c80ed637c04ddc - Tanguy MAZE, Sun Apr 15 20:12:52 2018 +0200 : ft_atoi_base
6d83726a6b82be8915fca3fc254d258ed7090e88 - Tanguy MAZE, Sun Apr 15 19:21:05 2018 +0200 : last_word
6cbf3dea3a97b714b5a7e3503b16758fa4ca53ae - Tanguy MAZE, Sun Apr 15 19:02:40 2018 +0200 : rotone
7e6a238b497dc094b3da7b312c9947f083762a0b - Tanguy MAZE, Sun Apr 15 18:53:13 2018 +0200 : aff_a
= Collected files ==========================================
$> ls -lAR /var/folders/s0/pmy608wd3y76cch8zwjlwv780000gq/T/tmpPtYH1V/user
total 8
-rw-r--r-- 1 deepthought deepthought 1257 Apr 15 21:01 __GIT_HISTORY
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:01 aff_a
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:01 ft_atoi_base
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:01 ft_itoa_base
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:01 last_word
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:01 rotone
/var/folders/s0/pmy608wd3y76cch8zwjlwv780000gq/T/tmpPtYH1V/user/aff_a:
total 8
-rw-r--r-- 1 deepthought deepthought 1173 Apr 15 21:01 aff_a.c
/var/folders/s0/pmy608wd3y76cch8zwjlwv780000gq/T/tmpPtYH1V/user/ft_atoi_base:
total 8
-rw-r--r-- 1 deepthought deepthought 1788 Apr 15 21:01 ft_atoi_base.c
/var/folders/s0/pmy608wd3y76cch8zwjlwv780000gq/T/tmpPtYH1V/user/ft_itoa_base:
total 8
-rw-r--r-- 1 deepthought deepthought 1664 Apr 15 21:01 ft_itoa_base.c
/var/folders/s0/pmy608wd3y76cch8zwjlwv780000gq/T/tmpPtYH1V/user/last_word:
total 8
-rw-r--r-- 1 deepthought deepthought 1463 Apr 15 21:01 last_word.c
/var/folders/s0/pmy608wd3y76cch8zwjlwv780000gq/T/tmpPtYH1V/user/rotone:
total 8
-rw-r--r-- 1 deepthought deepthought 1276 Apr 15 21:01 rotone.c
= ft_itoa_base =================================================================
$> clang -Wextra -Wall -Werror ft_itoa_base.c main.c -o user_exe
Forbidden function call in 'ft_itoa_base.c': 'printf'
Grade: -42
= Final grade: -42 =============================================================

View File

@@ -0,0 +1,94 @@
= Host-specific information ====================================================
$> hostname; uname -msr
e1r1p11.42.fr
Darwin 16.7.0 x86_64
$> date
Sun Apr 15 21:06:25 CEST 2018
$> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$> clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
= User files collection ========================================================
Collecting user files from Vogsphere
Repository URL: auto-exam/2018/c-exam-alone-in-the-dark-beginner/practice-exam_20180415/tmaze
= Git history ==================================================================
$> git -C /var/folders/cn/w8pk5pms1qj2tcpx8z2zvlmc0000gq/T/tmp220vQZ/user log --pretty='%H - %an, %ad : %s'
4f0581806228b31ae5df41cf7777e822056401d8 - Tanguy MAZE, Sun Apr 15 21:06:15 2018 +0200 : ft_itoa
6d5a04375cefa27e521dd4713b33a37e0ce2b579 - Tanguy MAZE, Sun Apr 15 21:01:39 2018 +0200 : ft_itoa_base
c3407605045e34e5ec46745468c80ed637c04ddc - Tanguy MAZE, Sun Apr 15 20:12:52 2018 +0200 : ft_atoi_base
6d83726a6b82be8915fca3fc254d258ed7090e88 - Tanguy MAZE, Sun Apr 15 19:21:05 2018 +0200 : last_word
6cbf3dea3a97b714b5a7e3503b16758fa4ca53ae - Tanguy MAZE, Sun Apr 15 19:02:40 2018 +0200 : rotone
7e6a238b497dc094b3da7b312c9947f083762a0b - Tanguy MAZE, Sun Apr 15 18:53:13 2018 +0200 : aff_a
= Collected files ==========================================
$> ls -lAR /var/folders/cn/w8pk5pms1qj2tcpx8z2zvlmc0000gq/T/tmp220vQZ/user
total 8
-rw-r--r-- 1 deepthought deepthought 1515 Apr 15 21:06 __GIT_HISTORY
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:06 aff_a
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:06 ft_atoi_base
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:06 ft_itoa
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:06 ft_itoa_base
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:06 last_word
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:06 rotone
/var/folders/cn/w8pk5pms1qj2tcpx8z2zvlmc0000gq/T/tmp220vQZ/user/aff_a:
total 8
-rw-r--r-- 1 deepthought deepthought 1173 Apr 15 21:06 aff_a.c
/var/folders/cn/w8pk5pms1qj2tcpx8z2zvlmc0000gq/T/tmp220vQZ/user/ft_atoi_base:
total 8
-rw-r--r-- 1 deepthought deepthought 1788 Apr 15 21:06 ft_atoi_base.c
/var/folders/cn/w8pk5pms1qj2tcpx8z2zvlmc0000gq/T/tmp220vQZ/user/ft_itoa:
total 8
-rw-r--r-- 1 deepthought deepthought 1480 Apr 15 21:06 ft_itoa.c
/var/folders/cn/w8pk5pms1qj2tcpx8z2zvlmc0000gq/T/tmp220vQZ/user/ft_itoa_base:
total 8
-rw-r--r-- 1 deepthought deepthought 1664 Apr 15 21:06 ft_itoa_base.c
/var/folders/cn/w8pk5pms1qj2tcpx8z2zvlmc0000gq/T/tmp220vQZ/user/last_word:
total 8
-rw-r--r-- 1 deepthought deepthought 1463 Apr 15 21:06 last_word.c
/var/folders/cn/w8pk5pms1qj2tcpx8z2zvlmc0000gq/T/tmp220vQZ/user/rotone:
total 8
-rw-r--r-- 1 deepthought deepthought 1276 Apr 15 21:06 rotone.c
= ft_itoa ======================================================================
$> clang -Wextra -Wall -Werror main.c ft_itoa.c -o user_exe
ft_itoa.c:30:14: error: use of undeclared identifier 'value'
nb = ft_abs(value);
^
ft_itoa.c:36:9: error: use of undeclared identifier 'base'; did you mean 'else'?
div /= base;
^~~~
else
ft_itoa.c:36:9: error: expected expression
ft_itoa.c:37:18: error: use of undeclared identifier 'value'
if (div == 1 || value < 0)
^
ft_itoa.c:43:6: error: use of undeclared identifier 'value'
if (value < 0 && ++i)
^
ft_itoa.c:45:6: error: use of undeclared identifier 'value'
if (value == 0)
^
ft_itoa.c:20:20: error: unused parameter 'nbr' [-Werror,-Wunused-parameter]
char *ft_itoa(int nbr)
^
7 errors generated.
Could not compile 'user_exe'
Grade: 0
= Final grade: 0 ===============================================================

View File

@@ -0,0 +1,71 @@
= Host-specific information ====================================================
$> hostname; uname -msr
e3r9p9.42.fr
Darwin 16.7.0 x86_64
$> date
Sun Apr 15 21:08:52 CEST 2018
$> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$> clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
= User files collection ========================================================
Collecting user files from Vogsphere
Repository URL: auto-exam/2018/c-exam-alone-in-the-dark-beginner/practice-exam_20180415/tmaze
= Git history ==================================================================
$> git -C /var/folders/2y/85898_k55r56djp9ndnbw65r0000gq/T/tmp43mwXU/user log --pretty='%H - %an, %ad : %s'
4f0581806228b31ae5df41cf7777e822056401d8 - Tanguy MAZE, Sun Apr 15 21:06:15 2018 +0200 : ft_itoa
6d5a04375cefa27e521dd4713b33a37e0ce2b579 - Tanguy MAZE, Sun Apr 15 21:01:39 2018 +0200 : ft_itoa_base
c3407605045e34e5ec46745468c80ed637c04ddc - Tanguy MAZE, Sun Apr 15 20:12:52 2018 +0200 : ft_atoi_base
6d83726a6b82be8915fca3fc254d258ed7090e88 - Tanguy MAZE, Sun Apr 15 19:21:05 2018 +0200 : last_word
6cbf3dea3a97b714b5a7e3503b16758fa4ca53ae - Tanguy MAZE, Sun Apr 15 19:02:40 2018 +0200 : rotone
7e6a238b497dc094b3da7b312c9947f083762a0b - Tanguy MAZE, Sun Apr 15 18:53:13 2018 +0200 : aff_a
= Collected files ==========================================
$> ls -lAR /var/folders/2y/85898_k55r56djp9ndnbw65r0000gq/T/tmp43mwXU/user
total 8
-rw-r--r-- 1 deepthought deepthought 1515 Apr 15 21:08 __GIT_HISTORY
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:08 aff_a
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:08 ft_atoi_base
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:08 ft_itoa
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:08 ft_itoa_base
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:08 last_word
drwxr-xr-x 3 deepthought deepthought 102 Apr 15 21:08 rotone
/var/folders/2y/85898_k55r56djp9ndnbw65r0000gq/T/tmp43mwXU/user/aff_a:
total 8
-rw-r--r-- 1 deepthought deepthought 1173 Apr 15 21:08 aff_a.c
/var/folders/2y/85898_k55r56djp9ndnbw65r0000gq/T/tmp43mwXU/user/ft_atoi_base:
total 8
-rw-r--r-- 1 deepthought deepthought 1788 Apr 15 21:08 ft_atoi_base.c
/var/folders/2y/85898_k55r56djp9ndnbw65r0000gq/T/tmp43mwXU/user/ft_itoa:
total 8
-rw-r--r-- 1 deepthought deepthought 1480 Apr 15 21:08 ft_itoa.c
/var/folders/2y/85898_k55r56djp9ndnbw65r0000gq/T/tmp43mwXU/user/ft_itoa_base:
total 8
-rw-r--r-- 1 deepthought deepthought 1664 Apr 15 21:08 ft_itoa_base.c
/var/folders/2y/85898_k55r56djp9ndnbw65r0000gq/T/tmp43mwXU/user/last_word:
total 8
-rw-r--r-- 1 deepthought deepthought 1463 Apr 15 21:08 last_word.c
/var/folders/2y/85898_k55r56djp9ndnbw65r0000gq/T/tmp43mwXU/user/rotone:
total 8
-rw-r--r-- 1 deepthought deepthought 1276 Apr 15 21:08 rotone.c
= fprime =======================================================================
Nothing turned in
Grade: 0
= Final grade: 0 ===============================================================