init
This commit is contained in:
55
exam-basedir01/docs/GUIDELINES.en.md
Normal file
55
exam-basedir01/docs/GUIDELINES.en.md
Normal 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.
|
54
exam-basedir01/docs/GUIDELINES.fr.md
Normal file
54
exam-basedir01/docs/GUIDELINES.fr.md
Normal 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
|
56
exam-basedir01/docs/GUIDELINES.ro.md
Normal file
56
exam-basedir01/docs/GUIDELINES.ro.md
Normal 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-basedir01/rendu
Submodule
1
exam-basedir01/rendu
Submodule
Submodule exam-basedir01/rendu added at ea9350c4e0
8
exam-basedir01/subjects/aff_z/examples.txt
Normal file
8
exam-basedir01/subjects/aff_z/examples.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
$> ./aff_z "abc" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "dubO a POIL" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "zaz sent le poney" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z | cat -e
|
||||||
|
z$
|
21
exam-basedir01/subjects/aff_z/subject.en.txt
Normal file
21
exam-basedir01/subjects/aff_z/subject.en.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Assignment name : aff_z
|
||||||
|
Expected files : aff_z.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a program that takes a string, and displays the first 'z'
|
||||||
|
character it encounters in it, followed by a newline. If there are no
|
||||||
|
'z' characters in the string, the program writes 'z' followed
|
||||||
|
by a newline. If the number of parameters is not 1, the program displays
|
||||||
|
'z' followed by a newline.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
$> ./aff_a "abc" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_a "RaInB0w d4Sh!" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_a "ThE C4k3 Is a L|3" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_a | cat -e
|
||||||
|
z$
|
22
exam-basedir01/subjects/aff_z/subject.fr.txt
Normal file
22
exam-basedir01/subjects/aff_z/subject.fr.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Assignment name : aff_z
|
||||||
|
Expected files : aff_z.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire un programme qui prend en paramètre une chaîne de caractères, et qui
|
||||||
|
affiche sur la sortie standard le premier caractère 'z' rencontré dans
|
||||||
|
cette chaîne, suivi de '\n'. Si aucun 'z'
|
||||||
|
n'est rencontré dans la chaîne, le programme affiche 'z' suivi de
|
||||||
|
'\n'. Si le nombre de paramètres est différent de 1, le
|
||||||
|
programme affiche 'z' suivi de '\n'.
|
||||||
|
|
||||||
|
Exemple:
|
||||||
|
|
||||||
|
$> ./aff_z "abc" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "dubO a POIL" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "zaz sent le poney" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z | cat -e
|
||||||
|
z$
|
19
exam-basedir01/subjects/aff_z/subject.ro.txt
Normal file
19
exam-basedir01/subjects/aff_z/subject.ro.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Exercitiu : aff_z
|
||||||
|
Fisiere de iesire : aff_z.c
|
||||||
|
Functii autorizate : write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
Scrieti un program ce ia ca parametru un sir de caractere, si care afiseaza la
|
||||||
|
iesirea standard primul caracter 'z' intalnit in acest sir, urmat de '\n'. Daca
|
||||||
|
nu este intalnit niciun caracter 'z', programul va afisa 'z' urmat de '\n'. Daca
|
||||||
|
numarul de parametri este diferit de 1, programul va afisa 'z' urmat de '\n'.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
$> ./aff_z "abc" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "dubO a POIL" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "zaz sent le poney" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z | cat -e
|
||||||
|
z$
|
9
exam-basedir01/subjects/expand_str/examples.txt
Normal file
9
exam-basedir01/subjects/expand_str/examples.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
$> ./expand_str "vous voyez c'est facile d'afficher la meme chose" | cat -e
|
||||||
|
vous voyez c'est facile d'afficher la meme chose$
|
||||||
|
$> ./expand_str " seulement la c'est plus dur " | cat -e
|
||||||
|
seulement la c'est plus dur$
|
||||||
|
$> ./expand_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e
|
||||||
|
$
|
||||||
|
$> ./expand_str "" | cat -e
|
||||||
|
$
|
||||||
|
$>
|
26
exam-basedir01/subjects/expand_str/subject.en.txt
Normal file
26
exam-basedir01/subjects/expand_str/subject.en.txt
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
Assignment name : expand_str
|
||||||
|
Expected files : expand_str.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a program that takes a string and displays it with exactly three spaces
|
||||||
|
between each word, with no spaces or tabs either at the beginning or the end,
|
||||||
|
followed by a newline.
|
||||||
|
|
||||||
|
A word is a section of string delimited either by spaces/tabs, or by the
|
||||||
|
start/end of the string.
|
||||||
|
|
||||||
|
If the number of parameters is not 1, or if there are no words, simply display
|
||||||
|
a newline.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$> ./epur_str "See? It's easy to print the same thing" | cat -e
|
||||||
|
See? It's easy to print the same thing$
|
||||||
|
$> ./epur_str " this time it will be more complex " | cat -e
|
||||||
|
this time it will be more complex$
|
||||||
|
$> ./epur_str "No S*** Sherlock..." "nAw S*** ShErLaWQ..." | cat -e
|
||||||
|
$
|
||||||
|
$> ./epur_str "" | cat -e
|
||||||
|
$
|
||||||
|
$>
|
26
exam-basedir01/subjects/expand_str/subject.fr.txt
Normal file
26
exam-basedir01/subjects/expand_str/subject.fr.txt
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
Assignment name : expand_str
|
||||||
|
Expected files : expand_str.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire un programme qui prend une chaîne de caractères en paramètre, et qui
|
||||||
|
affiche cette chaîne avec exactement trois espaces entre chaque mot, sans
|
||||||
|
espaces ou tabulations ni au début ni à la fin de la chaîne, suivie 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:
|
||||||
|
|
||||||
|
$> ./expand_str "vous voyez c'est facile d'afficher la meme chose" | cat -e
|
||||||
|
vous voyez c'est facile d'afficher la meme chose$
|
||||||
|
$> ./expand_str " seulement la c'est plus dur " | cat -e
|
||||||
|
seulement la c'est plus dur$
|
||||||
|
$> ./expand_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e
|
||||||
|
$
|
||||||
|
$> ./expand_str "" | cat -e
|
||||||
|
$
|
||||||
|
$>
|
25
exam-basedir01/subjects/expand_str/subject.ro.txt
Normal file
25
exam-basedir01/subjects/expand_str/subject.ro.txt
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
Exercitiu : expand_str
|
||||||
|
Fisiere de iesire : expand_str.c
|
||||||
|
Functii autorizate : write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Scrieti un program care ia ca parametru un sir de caractere si afiseaza acest sir
|
||||||
|
cu exact trei spatii intre fiecare cuvinte, fara spatii ori tabulatori la inceputul
|
||||||
|
ori sfarsitul sirului, urmat de un '\n'.
|
||||||
|
|
||||||
|
Numim "cuvant" o portiune a sirului de caractere delimitat de spatii sau/si tabulatori,
|
||||||
|
atat la inceputul cat si la sfarsitul sirului.
|
||||||
|
|
||||||
|
Daca numarul de parametri transmis este diferit de 1, sau daca nu este niciun cuvant
|
||||||
|
de afisat, programul va afisa '\n'.
|
||||||
|
Exemplu:
|
||||||
|
|
||||||
|
$> ./expand_str "vous voyez c'est facile d'afficher la meme chose" | cat -e
|
||||||
|
vous voyez c'est facile d'afficher la meme chose$
|
||||||
|
$> ./expand_str " seulement la c'est plus dur " | cat -e
|
||||||
|
seulement la c'est plus dur$
|
||||||
|
$> ./expand_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e
|
||||||
|
$
|
||||||
|
$> ./expand_str "" | cat -e
|
||||||
|
$
|
||||||
|
$>
|
16
exam-basedir01/subjects/fprime/examples.txt
Normal file
16
exam-basedir01/subjects/fprime/examples.txt
Normal 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
|
||||||
|
$
|
33
exam-basedir01/subjects/fprime/subject.en.txt
Normal file
33
exam-basedir01/subjects/fprime/subject.en.txt
Normal 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
|
||||||
|
$
|
35
exam-basedir01/subjects/fprime/subject.fr.txt
Normal file
35
exam-basedir01/subjects/fprime/subject.fr.txt
Normal 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
|
||||||
|
$
|
34
exam-basedir01/subjects/fprime/subject.ro.txt
Normal file
34
exam-basedir01/subjects/fprime/subject.ro.txt
Normal 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
|
||||||
|
$
|
14
exam-basedir01/subjects/ft_split/subject.en.txt
Normal file
14
exam-basedir01/subjects/ft_split/subject.en.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Assignment name : ft_split
|
||||||
|
Expected files : ft_split.c
|
||||||
|
Allowed functions: malloc
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a function that takes a string, splits it into words, and returns them as
|
||||||
|
a NULL-terminated array of strings.
|
||||||
|
|
||||||
|
A "word" is defined as a part of a string delimited either by spaces/tabs/new
|
||||||
|
lines, or by the start/end of the string.
|
||||||
|
|
||||||
|
Your function must be declared as follows:
|
||||||
|
|
||||||
|
char **ft_split(char *str);
|
16
exam-basedir01/subjects/ft_split/subject.fr.txt
Normal file
16
exam-basedir01/subjects/ft_split/subject.fr.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
Assignment name : ft_split
|
||||||
|
Expected files : ft_split.c
|
||||||
|
Allowed functions: malloc
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire une fonction qui prend en paramètre une chaîne de caractères et la
|
||||||
|
découpe en mots, qui seront retournés sous la forme d'un tableau de chaînes
|
||||||
|
terminé par NULL.
|
||||||
|
|
||||||
|
On appelle "mot" une portion de chaîne de caractères délimitée soit par des
|
||||||
|
espaces, des retours à la ligne et/ou des tabulations, soit par le début / fin
|
||||||
|
de la chaîne.
|
||||||
|
|
||||||
|
Votre fonction devra être prototypée de la façon suivante :
|
||||||
|
|
||||||
|
char **ft_split(char *str);
|
15
exam-basedir01/subjects/ft_split/subject.ro.txt
Normal file
15
exam-basedir01/subjects/ft_split/subject.ro.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Exercitiu : ft_split
|
||||||
|
Fisier de iesire : ft_split.c
|
||||||
|
Functii autorizate : malloc
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Scrieti o functie ce ia ca parametru un sir de caractere si pe care il separa
|
||||||
|
in cuvinte, ce vor fi returnate sub forma unui tablou siruri terminate cu NULL.
|
||||||
|
|
||||||
|
Numim "cuvant" o portiune a a sirului de caractere delimitate de fie de spatii
|
||||||
|
si/sau tabulatoare, fie de inceputul/sfarsitul sirului.
|
||||||
|
|
||||||
|
Functia va trebui sa aiba urmatorul prototip:
|
||||||
|
|
||||||
|
char **ft_split(char *str);
|
||||||
|
|
12
exam-basedir01/subjects/ft_swap/\
Normal file
12
exam-basedir01/subjects/ft_swap/\
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Exercitiu : ft_swap
|
||||||
|
Fisiere de iesire : ft_swap.c
|
||||||
|
Functii autorizate :
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Scrieti o functie ce schimba valoarea a doi intregi ale caror adrese sunt
|
||||||
|
transmise ca parametri.
|
||||||
|
|
||||||
|
Ea trebuie sa aibaprototipul urmator:
|
||||||
|
|
||||||
|
void ft_swap(int *a, int *b);
|
||||||
|
|
11
exam-basedir01/subjects/ft_swap/subject.en.txt
Normal file
11
exam-basedir01/subjects/ft_swap/subject.en.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Assignment name : ft_swap
|
||||||
|
Expected files : ft_swap.c
|
||||||
|
Allowed functions:
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a function that swaps the contents of two integers the adresses of which
|
||||||
|
are passed as parameters.
|
||||||
|
|
||||||
|
Your function must be declared as follows:
|
||||||
|
|
||||||
|
void ft_swap(int *a, int *b);
|
11
exam-basedir01/subjects/ft_swap/subject.fr.txt
Normal file
11
exam-basedir01/subjects/ft_swap/subject.fr.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Assignment name : ft_swap
|
||||||
|
Expected files : ft_swap.c
|
||||||
|
Allowed functions:
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire une fonction qui échange le contenu de deux entiers dont les adresses
|
||||||
|
sont passées en paramêtres.
|
||||||
|
|
||||||
|
Elle devra être prototypée de la façon suivante :
|
||||||
|
|
||||||
|
void ft_swap(int *a, int *b);
|
12
exam-basedir01/subjects/ft_swap/subject.ro.txt
Normal file
12
exam-basedir01/subjects/ft_swap/subject.ro.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Exercitiu : ft_swap
|
||||||
|
Fisiere de iesire : ft_swap.c
|
||||||
|
Functii autorizate :
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Scrieti o functie ce schimba valoarea a doi intregi ale caror adrese sunt
|
||||||
|
transmise ca parametri.
|
||||||
|
|
||||||
|
Ea trebuie sa aibaprototipul urmator:
|
||||||
|
|
||||||
|
void ft_swap(int *a, int *b);
|
||||||
|
|
9
exam-basedir01/subjects/inter/examples.txt
Normal file
9
exam-basedir01/subjects/inter/examples.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
$>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e
|
||||||
|
padinto$
|
||||||
|
$>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e
|
||||||
|
df6ewg4$
|
||||||
|
$>./inter "rien" "cette phrase ne cache rien" | cat -e
|
||||||
|
rien$
|
||||||
|
$>./inter | cat -e
|
||||||
|
$
|
||||||
|
|
23
exam-basedir01/subjects/inter/subject.en.txt
Normal file
23
exam-basedir01/subjects/inter/subject.en.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
Assignment name : inter
|
||||||
|
Expected files : inter.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a program that takes two strings and displays, without doubles, the
|
||||||
|
characters that appear in both strings, in the order they appear in the first
|
||||||
|
one.
|
||||||
|
|
||||||
|
The display will be followed by a \n.
|
||||||
|
|
||||||
|
If the number of arguments is not 2, the program displays \n.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e
|
||||||
|
padinto$
|
||||||
|
$>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e
|
||||||
|
df6ewg4$
|
||||||
|
$>./inter "nothing" "This sentence hides nothing" | cat -e
|
||||||
|
nothing$
|
||||||
|
$>./inter | cat -e
|
||||||
|
$
|
23
exam-basedir01/subjects/inter/subject.fr.txt
Normal file
23
exam-basedir01/subjects/inter/subject.fr.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
Assignment name : inter
|
||||||
|
Expected files : inter.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire un programme qui prend en paramètres deux chaînes de caractères et qui
|
||||||
|
affiche sans doublon les caractères communs aux deux chaînes.
|
||||||
|
|
||||||
|
L'affichage se fera dans l'ordre d'apparition dans la premiere chaîne.
|
||||||
|
L'affichage doit être suivi d'un '\n'.
|
||||||
|
|
||||||
|
Si le nombre de paramètres transmis est différent de 2, le programme affiche
|
||||||
|
'\n'.
|
||||||
|
|
||||||
|
Exemples:
|
||||||
|
$>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e
|
||||||
|
padinto$
|
||||||
|
$>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e
|
||||||
|
df6ewg4$
|
||||||
|
$>./inter "rien" "cette phrase ne cache rien" | cat -e
|
||||||
|
rien$
|
||||||
|
$>./inter | cat -e
|
||||||
|
$
|
22
exam-basedir01/subjects/inter/subject.ro.txt
Normal file
22
exam-basedir01/subjects/inter/subject.ro.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Exercitiu : inter
|
||||||
|
Fisiere de iesire : inter.c
|
||||||
|
Functii autorizate : write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Scrieti un program ce ia ca parametru doua siruri de caractere si care afiseaza
|
||||||
|
caracterele comune celor doua siruri, fara a le dubla.
|
||||||
|
|
||||||
|
Afisarea se va face in ordinea aparitiei din primul sir, urmata de '\n'.
|
||||||
|
|
||||||
|
Daca numarul ed parametri transmis este diferit de 2, programul va afisa '\n'.
|
||||||
|
|
||||||
|
Exemple:
|
||||||
|
|
||||||
|
$>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e
|
||||||
|
padinto$
|
||||||
|
$>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e
|
||||||
|
df6ewg4$
|
||||||
|
$>./inter "rien" "cette phrase ne cache rien" | cat -e
|
||||||
|
rien$
|
||||||
|
$>./inter | cat -e
|
||||||
|
$
|
72
exam-basedir01/traces/0-0_aff_z.trace
Normal file
72
exam-basedir01/traces/0-0_aff_z.trace
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
= Host-specific information ====================================================
|
||||||
|
$> hostname; uname -msr
|
||||||
|
e1r6p13.42.fr
|
||||||
|
Darwin 16.7.0 x86_64
|
||||||
|
$> date
|
||||||
|
Fri Apr 13 11:41:11 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_20180413/tmaze
|
||||||
|
|
||||||
|
= Git history ==================================================================
|
||||||
|
$> git -C /var/folders/8_/k4v31h394nj0pj108ytgr4xm0000gq/T/tmpZXdKvK/user log --pretty='%H - %an, %ad : %s'
|
||||||
|
2d8bf5c9f17b97a9c04b8c0254a84d64278f8821 - Tanguy MAZE, Fri Apr 13 11:40:49 2018 +0200 : aff_z
|
||||||
|
|
||||||
|
= Collected files ==========================================
|
||||||
|
$> ls -lAR /var/folders/8_/k4v31h394nj0pj108ytgr4xm0000gq/T/tmpZXdKvK/user
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 215 Apr 13 11:41 __GIT_HISTORY
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 11:41 aff_z
|
||||||
|
|
||||||
|
/var/folders/8_/k4v31h394nj0pj108ytgr4xm0000gq/T/tmpZXdKvK/user/aff_z:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 966 Apr 13 11:41 aff_z.c
|
||||||
|
|
||||||
|
= aff_z ========================================================================
|
||||||
|
$> clang -Wextra -Wall -Werror aff_z.c -o user_exe
|
||||||
|
|
||||||
|
= Test 1 ===================================================
|
||||||
|
$> ./5rpehy400cgna40wybx8awyt
|
||||||
|
$> diff -U 3 user_output_test1 test1.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 2 ===================================================
|
||||||
|
$> ./58n1ykoco3xgtc9euw0e1ixk "mjiSev0bG4" "Jk2hMrd03ISxWet8w" "Yvg5L" "JaA" "KhtuH" "JBf7" "S1z9d6iFbuL" "gVeEsjK" "BDqX" "QS4yPspfM" "VZWGmrRa2n7US3D" "w2n" "k3Psy598CFK" "5jK0xV6Qo"
|
||||||
|
$> diff -U 3 user_output_test2 test2.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 3 ===================================================
|
||||||
|
$> ./5jgz03vufmnt3v0u89ilukbq "XzNC3"
|
||||||
|
$> diff -U 3 user_output_test3 test3.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 4 ===================================================
|
||||||
|
$> ./ha422vhxa3xnooexmu9ub1f0 "SiUzx7cDL9RIpBnA"
|
||||||
|
$> diff -U 3 user_output_test4 test4.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 5 ===================================================
|
||||||
|
$> ./vru3h17k7ac3lmvyoem05b8w "NAmLc"
|
||||||
|
$> diff -U 3 user_output_test5 test5.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 6 ===================================================
|
||||||
|
$> ./q3uvyld5twnrtb9lc3u16k0i "xme9CAdLH8uQGMrK"
|
||||||
|
$> diff -U 3 user_output_test6 test6.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
Grade: 1
|
||||||
|
|
||||||
|
= Final grade: 1 ===============================================================
|
93
exam-basedir01/traces/1-0_ft_swap.trace
Normal file
93
exam-basedir01/traces/1-0_ft_swap.trace
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
= Host-specific information ====================================================
|
||||||
|
$> hostname; uname -msr
|
||||||
|
e1r4p8.42.fr
|
||||||
|
Darwin 16.7.0 x86_64
|
||||||
|
$> date
|
||||||
|
Fri Apr 13 11:44:33 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_20180413/tmaze
|
||||||
|
|
||||||
|
= Git history ==================================================================
|
||||||
|
$> git -C /var/folders/1_/z092vpvx1ydd1nxlp34v0yc00000gq/T/tmpEyFlug/user log --pretty='%H - %an, %ad : %s'
|
||||||
|
2ab798b8f4f6d6877e6ba6a2f5930ee3c12c88ad - Tanguy MAZE, Fri Apr 13 11:44:16 2018 +0200 : ft_swap
|
||||||
|
2d8bf5c9f17b97a9c04b8c0254a84d64278f8821 - Tanguy MAZE, Fri Apr 13 11:40:49 2018 +0200 : aff_z
|
||||||
|
|
||||||
|
= Collected files ==========================================
|
||||||
|
$> ls -lAR /var/folders/1_/z092vpvx1ydd1nxlp34v0yc00000gq/T/tmpEyFlug/user
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 438 Apr 13 11:44 __GIT_HISTORY
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 11:44 aff_z
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 11:44 ft_swap
|
||||||
|
|
||||||
|
/var/folders/1_/z092vpvx1ydd1nxlp34v0yc00000gq/T/tmpEyFlug/user/aff_z:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 966 Apr 13 11:44 aff_z.c
|
||||||
|
|
||||||
|
/var/folders/1_/z092vpvx1ydd1nxlp34v0yc00000gq/T/tmpEyFlug/user/ft_swap:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 968 Apr 13 11:44 ft_swap.c
|
||||||
|
|
||||||
|
= ft_swap ======================================================================
|
||||||
|
$> clang -Wextra -Wall -Werror ft_swap.c main.c -o user_exe
|
||||||
|
|
||||||
|
= Test 1 ===================================================
|
||||||
|
$> ./3b5vrm92blpgrf89yxuy5pru "706626262" "364685118"
|
||||||
|
$> diff -U 3 user_output_test1 test1.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 2 ===================================================
|
||||||
|
$> ./bpuxbmw8bplrhhr9a1m3ovbo "408635404" "-802490398"
|
||||||
|
$> diff -U 3 user_output_test2 test2.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 3 ===================================================
|
||||||
|
$> ./6hd5ghtcf81s1mkqosqlgct0 "-1045169027" "-105518579"
|
||||||
|
$> diff -U 3 user_output_test3 test3.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 4 ===================================================
|
||||||
|
$> ./jy5r8htlk93xv2dd71so0jcz "-345921438" "1420916860"
|
||||||
|
$> diff -U 3 user_output_test4 test4.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 5 ===================================================
|
||||||
|
$> ./9qn52zrmh5tl4zuwjcmxjlg0 "-947973237" "-223965263"
|
||||||
|
$> diff -U 3 user_output_test5 test5.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 6 ===================================================
|
||||||
|
$> ./7v2mq3kt1fpai317rhad09i9 "-601213970" "364430817"
|
||||||
|
$> diff -U 3 user_output_test6 test6.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 7 ===================================================
|
||||||
|
$> ./k4u7ta2ijyl004xu4do63cqj "-797032518" "-898871763"
|
||||||
|
$> diff -U 3 user_output_test7 test7.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 8 ===================================================
|
||||||
|
$> ./bgx8wibqya12t15fwhtcr9ry "829225805" "1965530847"
|
||||||
|
$> diff -U 3 user_output_test8 test8.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 9 ===================================================
|
||||||
|
$> ./shov8omsapwgvruy7q2ouw0z "-1886413568" "1834299037"
|
||||||
|
$> diff -U 3 user_output_test9 test9.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
Grade: 1
|
||||||
|
|
||||||
|
= Final grade: 1 ===============================================================
|
154
exam-basedir01/traces/2-0_inter.trace
Normal file
154
exam-basedir01/traces/2-0_inter.trace
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
= Host-specific information ====================================================
|
||||||
|
$> hostname; uname -msr
|
||||||
|
e2r11p11.42.fr
|
||||||
|
Darwin 16.7.0 x86_64
|
||||||
|
$> date
|
||||||
|
Fri Apr 13 11:59:19 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_20180413/tmaze
|
||||||
|
|
||||||
|
= Git history ==================================================================
|
||||||
|
$> git -C /var/folders/l8/2dn_mc5n50j78m_xrn9szj900000gq/T/tmp4jge8b/user log --pretty='%H - %an, %ad : %s'
|
||||||
|
f04f956d0834716296c1766b0023c33bb352beae - Tanguy MAZE, Fri Apr 13 11:59:11 2018 +0200 : inter
|
||||||
|
2ab798b8f4f6d6877e6ba6a2f5930ee3c12c88ad - Tanguy MAZE, Fri Apr 13 11:44:16 2018 +0200 : ft_swap
|
||||||
|
2d8bf5c9f17b97a9c04b8c0254a84d64278f8821 - Tanguy MAZE, Fri Apr 13 11:40:49 2018 +0200 : aff_z
|
||||||
|
|
||||||
|
= Collected files ==========================================
|
||||||
|
$> ls -lAR /var/folders/l8/2dn_mc5n50j78m_xrn9szj900000gq/T/tmp4jge8b/user
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 688 Apr 13 11:59 __GIT_HISTORY
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 11:59 aff_z
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 11:59 ft_swap
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 11:59 inter
|
||||||
|
|
||||||
|
/var/folders/l8/2dn_mc5n50j78m_xrn9szj900000gq/T/tmp4jge8b/user/aff_z:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 966 Apr 13 11:59 aff_z.c
|
||||||
|
|
||||||
|
/var/folders/l8/2dn_mc5n50j78m_xrn9szj900000gq/T/tmp4jge8b/user/ft_swap:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 968 Apr 13 11:59 ft_swap.c
|
||||||
|
|
||||||
|
/var/folders/l8/2dn_mc5n50j78m_xrn9szj900000gq/T/tmp4jge8b/user/inter:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 1433 Apr 13 11:59 inter.c
|
||||||
|
|
||||||
|
= inter ========================================================================
|
||||||
|
$> clang -Wextra -Wall -Werror inter.c -o user_exe
|
||||||
|
|
||||||
|
= Test 1 ===================================================
|
||||||
|
$> ./t9dkgbvzuysqelu2g7stwnag
|
||||||
|
$> diff -U 3 user_output_test1 test1.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 2 ===================================================
|
||||||
|
$> ./8vu4lxwhr1g8s8h6tss38pfb "salut a tous tout le monde"
|
||||||
|
$> diff -U 3 user_output_test2 test2.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 3 ===================================================
|
||||||
|
$> ./fxw9eljfvovwq7acd9l5gpnf "salut" "a" "tous" "tout" "le" "monde"
|
||||||
|
$> diff -U 3 user_output_test3 test3.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 4 ===================================================
|
||||||
|
$> ./ijf2hva07e7kpyimxj44f8jt "llo" "helllo"
|
||||||
|
$> diff -U 3 user_output_test4 test4.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 5 ===================================================
|
||||||
|
$> ./xiqre3l27x3nr5tc56m3ixu2 "X7nEF" "7E"
|
||||||
|
$> diff -U 3 user_output_test5 test5.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 6 ===================================================
|
||||||
|
$> ./yk96doh3gu8slzkvh89doh68 "sJWOAraBXqG" "RdoIOLvSuN7c9yg"
|
||||||
|
$> diff -U 3 user_output_test6 test6.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 7 ===================================================
|
||||||
|
$> ./s8p9ck04a0usz4vrhku963j6 "7e4jrvwWAD" "erWA"
|
||||||
|
$> diff -U 3 user_output_test7 test7.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 8 ===================================================
|
||||||
|
$> ./7dgo3oci4z6xdr9g0xeikphd "iFx3C8" "F3C8"
|
||||||
|
$> diff -U 3 user_output_test8 test8.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 9 ===================================================
|
||||||
|
$> ./g0w8pbsg6x0qf0lozk6i1bab "vR0ZGmgw2SzqLYk" "aI8MS"
|
||||||
|
$> diff -U 3 user_output_test9 test9.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 10 ==================================================
|
||||||
|
$> ./kh11erzrvymr5yqpjtzi2415 "Ni6Qbkd27Kz" "ibd27z"
|
||||||
|
$> diff -U 3 user_output_test10 test10.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 11 ==================================================
|
||||||
|
$> ./ikpx9nmvdfd5qo8xaxhuoq63 "WIlXDZ" "lXD"
|
||||||
|
$> diff -U 3 user_output_test11 test11.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 12 ==================================================
|
||||||
|
$> ./6j3s8ea54476s98708wjwdnm "9XDcE" "Wl63tXUIS"
|
||||||
|
$> diff -U 3 user_output_test12 test12.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 13 ==================================================
|
||||||
|
$> ./lg8lp67099knsgulxumn79s4 "CzYnN9krqw0gFE" "znkqw0gE"
|
||||||
|
$> diff -U 3 user_output_test13 test13.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 14 ==================================================
|
||||||
|
$> ./1ncsf1hc9s3onzp9v7crh8ex "8qivgVQO" "qgO"
|
||||||
|
$> diff -U 3 user_output_test14 test14.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 15 ==================================================
|
||||||
|
$> ./7as6cimd1v42m2h38x2iu3b5 "z2BSmYy" "l7WQRampfZE"
|
||||||
|
$> diff -U 3 user_output_test15 test15.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 16 ==================================================
|
||||||
|
$> ./hpceb30pqdh74g2s6wepxvpw "lrULTb" "lrTb"
|
||||||
|
$> diff -U 3 user_output_test16 test16.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 17 ==================================================
|
||||||
|
$> ./zn0ot7v8e2cmv97a5vqj327i "mSqcBz8AQl" "Sc8Al"
|
||||||
|
$> diff -U 3 user_output_test17 test17.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 18 ==================================================
|
||||||
|
$> ./oorr6q5bulcqzf6fwp3hx86d "MDbj" "D"
|
||||||
|
$> diff -U 3 user_output_test18 test18.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 19 ==================================================
|
||||||
|
$> ./mt1msb1nkjqw6vhyln8m6h38 "r0zk217BP" "Lem"
|
||||||
|
$> diff -U 3 user_output_test19 test19.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 20 ==================================================
|
||||||
|
$> ./va76iodxi2brhcrbillhsqm9 "wvyQba3YrzT7" "P2g4icuvr"
|
||||||
|
$> diff -U 3 user_output_test20 test20.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
Grade: 1
|
||||||
|
|
||||||
|
= Final grade: 1 ===============================================================
|
160
exam-basedir01/traces/3-0_expand_str.trace
Normal file
160
exam-basedir01/traces/3-0_expand_str.trace
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
= Host-specific information ====================================================
|
||||||
|
$> hostname; uname -msr
|
||||||
|
e1r4p5.42.fr
|
||||||
|
Darwin 16.7.0 x86_64
|
||||||
|
$> date
|
||||||
|
Fri Apr 13 12:14:47 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_20180413/tmaze
|
||||||
|
|
||||||
|
= Git history ==================================================================
|
||||||
|
$> git -C /var/folders/z0/z383yrl15zv962t1bhsr1jbm0000gq/T/tmpHOCR9H/user log --pretty='%H - %an, %ad : %s'
|
||||||
|
8c23b2844362a999283edf51405d739bb58ef972 - Tanguy MAZE, Fri Apr 13 12:14:36 2018 +0200 : expand_str
|
||||||
|
f04f956d0834716296c1766b0023c33bb352beae - Tanguy MAZE, Fri Apr 13 11:59:11 2018 +0200 : inter
|
||||||
|
2ab798b8f4f6d6877e6ba6a2f5930ee3c12c88ad - Tanguy MAZE, Fri Apr 13 11:44:16 2018 +0200 : ft_swap
|
||||||
|
2d8bf5c9f17b97a9c04b8c0254a84d64278f8821 - Tanguy MAZE, Fri Apr 13 11:40:49 2018 +0200 : aff_z
|
||||||
|
|
||||||
|
= Collected files ==========================================
|
||||||
|
$> ls -lAR /var/folders/z0/z383yrl15zv962t1bhsr1jbm0000gq/T/tmpHOCR9H/user
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 949 Apr 13 12:14 __GIT_HISTORY
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 12:14 aff_z
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 12:14 expand_str
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 12:14 ft_swap
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 12:14 inter
|
||||||
|
|
||||||
|
/var/folders/z0/z383yrl15zv962t1bhsr1jbm0000gq/T/tmpHOCR9H/user/aff_z:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 966 Apr 13 12:14 aff_z.c
|
||||||
|
|
||||||
|
/var/folders/z0/z383yrl15zv962t1bhsr1jbm0000gq/T/tmpHOCR9H/user/expand_str:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 1442 Apr 13 12:14 expand_str.c
|
||||||
|
|
||||||
|
/var/folders/z0/z383yrl15zv962t1bhsr1jbm0000gq/T/tmpHOCR9H/user/ft_swap:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 968 Apr 13 12:14 ft_swap.c
|
||||||
|
|
||||||
|
/var/folders/z0/z383yrl15zv962t1bhsr1jbm0000gq/T/tmpHOCR9H/user/inter:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 1433 Apr 13 12:14 inter.c
|
||||||
|
|
||||||
|
= expand_str ===================================================================
|
||||||
|
$> clang -Wextra -Wall -Werror expand_str.c -o user_exe
|
||||||
|
|
||||||
|
= Test 1 ===================================================
|
||||||
|
$> ./4mxb5l8d56xv5i2hmvrr7jq3
|
||||||
|
$> diff -U 3 user_output_test1 test1.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 2 ===================================================
|
||||||
|
$> ./1h6q7mzvzhg2a4i0e4s2ki4y
|
||||||
|
$> diff -U 3 user_output_test2 test2.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 3 ===================================================
|
||||||
|
$> ./htld2om7h0ny6rqm4avaxaiy "salut" "a" "tous" "tout" "le" "monde"
|
||||||
|
$> diff -U 3 user_output_test3 test3.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 4 ===================================================
|
||||||
|
$> ./uzaj26ha0xx18el3y2bpzm0w "ZGlzAbSVxyOTjJEI"
|
||||||
|
$> diff -U 3 user_output_test4 test4.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 5 ===================================================
|
||||||
|
$> ./gch2pajiqq5yokg2zk1ruz5q "XqAMCx"
|
||||||
|
$> diff -U 3 user_output_test5 test5.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 6 ===================================================
|
||||||
|
$> ./8amnx8mzgfhncveffsotfw2q "27fycMY5Wj"
|
||||||
|
$> diff -U 3 user_output_test6 test6.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 7 ===================================================
|
||||||
|
$> ./myfv3b570mvs3i9u1v1v3t9c "dhNw0FmOJT4X73E F8Y2xj bSczLh hYljP8u2INCQJF HPNC"
|
||||||
|
$> diff -U 3 user_output_test7 test7.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 8 ===================================================
|
||||||
|
$> ./w0prgexvblme2dx09zq339qu "FUD4n PQb4vWJ0TLdIn NICOei3dZST F7TLhGlf2en6 5LUc2me bUqLBTgy3W28tk BxtyvhVcZ oQ5vjCbiAzapSdWlL vyco3xt0SjmWr7Ja"
|
||||||
|
$> diff -U 3 user_output_test8 test8.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 9 ===================================================
|
||||||
|
$> ./vjfbo9mtr1hvgca0deuo32gd "2QB7vtqy SJOf4AUmKlqZYo9GI sXW 2Gazd NvhCWs9 zbI sToODIqrM TNAeMCvHJZiy5n6 8XtYFyo1EpO vw04SNxfrTmyluQ JUiyOnfXSBzmQo SAY6z NLKwy TcnIRbJrg E2DHCfw4W6"
|
||||||
|
$> diff -U 3 user_output_test9 test9.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 10 ==================================================
|
||||||
|
$> ./pitsg3pr5rez2cg2tt8j8w45 " iefjDtO9 9riCpHzWjB1b ZIBYbmth4V3Fk07yl H8x ysx5nD sFpynw4BX79EuQOR2 "
|
||||||
|
$> diff -U 3 user_output_test10 test10.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 11 ==================================================
|
||||||
|
$> ./etr4qesw6obxjmy9v55zz1dj " fZHp KCQ2psoENJ m8Qos nO3HF2WYx uKY ZdwV7Fq2njPrGvOH Xj5ZJqYK8 0RxYFywJ41qrXi tjJsf5eUPd PqfYA2OWh9g "
|
||||||
|
$> diff -U 3 user_output_test11 test11.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 12 ==================================================
|
||||||
|
$> ./igdhspotmaub93q4rj8yev8t " Dqj EthGzsoQv4wZ wiqyxHN78crzkG PYofvE "
|
||||||
|
$> diff -U 3 user_output_test12 test12.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 13 ==================================================
|
||||||
|
$> ./3c5ce2ofjrw95w6onwen5t2n " jqQAlmDc4gs kWchX8ZUVmuAG SYHsnLIGTr uvVnA XnBLNZ dKACMZrXJVIQ aDh2VCKtvUz 1elR0CkSZxsu Tg67O S0OI1kV6TdPnez "
|
||||||
|
$> diff -U 3 user_output_test13 test13.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 14 ==================================================
|
||||||
|
$> ./b35jiih2ldqsaorv8htk71nb " rwzDj8vW CqXBc9Tu SiTL8hZm1QXuv K3XQO8fxyV4cbrSmM HQf0GM69lUaz 57TXO4EGWAocjgLxs TrqH 5k7HLi6NwjyQxb 4heD "
|
||||||
|
$> diff -U 3 user_output_test14 test14.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 15 ==================================================
|
||||||
|
$> ./m7e25fata668as5ysbw8illq " 37stlHq1aS zxRUiqfMpr MNWZElkjaVyob pkeYbFT6y qL2Z4b JlgncsMe E6I9SgHMVLdCa 4u7feL6Tmhi "
|
||||||
|
$> diff -U 3 user_output_test15 test15.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 16 ==================================================
|
||||||
|
$> ./k90xq6xlu5i34i2aq7e187fb " aK39xLvQhY X8vt73 68IMPxEB wc0FmE6XBM jLOtQuEkPc3q UK93C5tlZvLxguaTb S9ltQCeDFbj0kr "
|
||||||
|
$> diff -U 3 user_output_test16 test16.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 17 ==================================================
|
||||||
|
$> ./tpyq0o8rhae98ogwn27rgzsv " ekBVv7OT4twQ MdXFw0AU1nSr 7LgRaoT HPRQ7T2SCt "
|
||||||
|
$> diff -U 3 user_output_test17 test17.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 18 ==================================================
|
||||||
|
$> ./7awagmxf6vg093a2f87p6n3t " NGZ6CvzufQHn BTy67jPlMcmpJEAa1 pxFhkXOW5V axrTE9b6cm PB9OIL2AvnZj HjMJu9gwnkZRXdCc7 "
|
||||||
|
$> diff -U 3 user_output_test18 test18.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 19 ==================================================
|
||||||
|
$> ./8o22tl83r3xi98i88lp03qla " uRFE xs3aHFS5 HLNvrc SW0t8 MbDZ7o82cARqKh joynS etOBART3lE "
|
||||||
|
$> diff -U 3 user_output_test19 test19.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
= Test 20 ==================================================
|
||||||
|
$> ./jv95u2a1ykwsi7intev7i8ey " CNT5UeM2fz 8eBzA40jLMI VqvpWOYK0FGZ wRpmSQ9zUfAJHlF jmUG6wqZ "
|
||||||
|
$> diff -U 3 user_output_test20 test20.output | cat -e
|
||||||
|
|
||||||
|
Diff OK :D
|
||||||
|
Grade: 1
|
||||||
|
|
||||||
|
= Final grade: 1 ===============================================================
|
69
exam-basedir01/traces/4-0_ft_split.trace
Normal file
69
exam-basedir01/traces/4-0_ft_split.trace
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
= Host-specific information ====================================================
|
||||||
|
$> hostname; uname -msr
|
||||||
|
e2r9p19.42.fr
|
||||||
|
Darwin 16.7.0 x86_64
|
||||||
|
$> date
|
||||||
|
Fri Apr 13 12:54:38 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_20180413/tmaze
|
||||||
|
|
||||||
|
= Git history ==================================================================
|
||||||
|
$> git -C /var/folders/mw/8rbqlqyn62j570j_lsm5pvsm0000gq/T/tmpgcMtXU/user log --pretty='%H - %an, %ad : %s'
|
||||||
|
ea9350c4e0805d3a6b89a52b5ffe40109d62358d - Tanguy MAZE, Fri Apr 13 12:54:18 2018 +0200 : ft_split
|
||||||
|
8c23b2844362a999283edf51405d739bb58ef972 - Tanguy MAZE, Fri Apr 13 12:14:36 2018 +0200 : expand_str
|
||||||
|
f04f956d0834716296c1766b0023c33bb352beae - Tanguy MAZE, Fri Apr 13 11:59:11 2018 +0200 : inter
|
||||||
|
2ab798b8f4f6d6877e6ba6a2f5930ee3c12c88ad - Tanguy MAZE, Fri Apr 13 11:44:16 2018 +0200 : ft_swap
|
||||||
|
2d8bf5c9f17b97a9c04b8c0254a84d64278f8821 - Tanguy MAZE, Fri Apr 13 11:40:49 2018 +0200 : aff_z
|
||||||
|
|
||||||
|
= Collected files ==========================================
|
||||||
|
$> ls -lAR /var/folders/mw/8rbqlqyn62j570j_lsm5pvsm0000gq/T/tmpgcMtXU/user
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 1208 Apr 13 12:54 __GIT_HISTORY
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 12:54 aff_z
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 12:54 expand_str
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 12:54 ft_split
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 12:54 ft_swap
|
||||||
|
drwxr-xr-x 3 deepthought deepthought 102 Apr 13 12:54 inter
|
||||||
|
|
||||||
|
/var/folders/mw/8rbqlqyn62j570j_lsm5pvsm0000gq/T/tmpgcMtXU/user/aff_z:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 966 Apr 13 12:54 aff_z.c
|
||||||
|
|
||||||
|
/var/folders/mw/8rbqlqyn62j570j_lsm5pvsm0000gq/T/tmpgcMtXU/user/expand_str:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 1442 Apr 13 12:54 expand_str.c
|
||||||
|
|
||||||
|
/var/folders/mw/8rbqlqyn62j570j_lsm5pvsm0000gq/T/tmpgcMtXU/user/ft_split:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 1993 Apr 13 12:54 ft_split.c
|
||||||
|
|
||||||
|
/var/folders/mw/8rbqlqyn62j570j_lsm5pvsm0000gq/T/tmpgcMtXU/user/ft_swap:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 968 Apr 13 12:54 ft_swap.c
|
||||||
|
|
||||||
|
/var/folders/mw/8rbqlqyn62j570j_lsm5pvsm0000gq/T/tmpgcMtXU/user/inter:
|
||||||
|
total 8
|
||||||
|
-rw-r--r-- 1 deepthought deepthought 1433 Apr 13 12:54 inter.c
|
||||||
|
|
||||||
|
= ft_split =====================================================================
|
||||||
|
$> clang -Wextra -Wall -Werror ft_split.c main.c -o user_exe
|
||||||
|
|
||||||
|
= Test 1 ===================================================
|
||||||
|
$> ./fsdtxclewdd37bdsb17b6146 ""
|
||||||
|
Command './fsdtxclewdd37bdsb17b6146 ""' got killed by a Segmentation fault (Signal -11)
|
||||||
|
Grade: 0
|
||||||
|
|
||||||
|
= Final grade: 0 ===============================================================
|
55
exam-basedir02/docs/GUIDELINES.en.md
Normal file
55
exam-basedir02/docs/GUIDELINES.en.md
Normal 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.
|
54
exam-basedir02/docs/GUIDELINES.fr.md
Normal file
54
exam-basedir02/docs/GUIDELINES.fr.md
Normal 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
|
56
exam-basedir02/docs/GUIDELINES.ro.md
Normal file
56
exam-basedir02/docs/GUIDELINES.ro.md
Normal 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
1
exam-basedir02/rendu
Submodule
Submodule exam-basedir02/rendu added at 4f05818062
20
exam-basedir02/subjects/aff_a/subject.en.txt
Normal file
20
exam-basedir02/subjects/aff_a/subject.en.txt
Normal 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$
|
20
exam-basedir02/subjects/aff_a/subject.fr.txt
Normal file
20
exam-basedir02/subjects/aff_a/subject.fr.txt
Normal 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$
|
20
exam-basedir02/subjects/aff_a/subject.ro.txt
Normal file
20
exam-basedir02/subjects/aff_a/subject.ro.txt
Normal 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$
|
16
exam-basedir02/subjects/fprime/examples.txt
Normal file
16
exam-basedir02/subjects/fprime/examples.txt
Normal 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
|
||||||
|
$
|
33
exam-basedir02/subjects/fprime/subject.en.txt
Normal file
33
exam-basedir02/subjects/fprime/subject.en.txt
Normal 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
|
||||||
|
$
|
35
exam-basedir02/subjects/fprime/subject.fr.txt
Normal file
35
exam-basedir02/subjects/fprime/subject.fr.txt
Normal 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
|
||||||
|
$
|
34
exam-basedir02/subjects/fprime/subject.ro.txt
Normal file
34
exam-basedir02/subjects/fprime/subject.ro.txt
Normal 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
|
||||||
|
$
|
20
exam-basedir02/subjects/ft_atoi_base/subject.en.txt
Normal file
20
exam-basedir02/subjects/ft_atoi_base/subject.en.txt
Normal 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);
|
21
exam-basedir02/subjects/ft_atoi_base/subject.fr.txt
Normal file
21
exam-basedir02/subjects/ft_atoi_base/subject.fr.txt
Normal 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);
|
11
exam-basedir02/subjects/ft_itoa/subject.en.txt
Normal file
11
exam-basedir02/subjects/ft_itoa/subject.en.txt
Normal 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);
|
12
exam-basedir02/subjects/ft_itoa/subject.fr.txt
Normal file
12
exam-basedir02/subjects/ft_itoa/subject.fr.txt
Normal 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);
|
10
exam-basedir02/subjects/ft_itoa/subject.ro.txt
Normal file
10
exam-basedir02/subjects/ft_itoa/subject.ro.txt
Normal 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);
|
20
exam-basedir02/subjects/ft_itoa_base/subject.en.txt
Normal file
20
exam-basedir02/subjects/ft_itoa_base/subject.en.txt
Normal 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);
|
21
exam-basedir02/subjects/ft_itoa_base/subject.fr.txt
Normal file
21
exam-basedir02/subjects/ft_itoa_base/subject.fr.txt
Normal 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);
|
11
exam-basedir02/subjects/last_word/examples.txt
Normal file
11
exam-basedir02/subjects/last_word/examples.txt
Normal 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$
|
||||||
|
$>
|
25
exam-basedir02/subjects/last_word/subject.en.txt
Normal file
25
exam-basedir02/subjects/last_word/subject.en.txt
Normal 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$
|
||||||
|
$>
|
27
exam-basedir02/subjects/last_word/subject.fr.txt
Normal file
27
exam-basedir02/subjects/last_word/subject.fr.txt
Normal 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$
|
||||||
|
$>
|
27
exam-basedir02/subjects/last_word/subject.ro.txt
Normal file
27
exam-basedir02/subjects/last_word/subject.ro.txt
Normal 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$
|
||||||
|
$>
|
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
|
||||||
|
$
|
||||||
|
$>
|
12
exam-basedir02/subjects/rotone/examples.txt
Normal file
12
exam-basedir02/subjects/rotone/examples.txt
Normal 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
|
||||||
|
$
|
||||||
|
$>
|
28
exam-basedir02/subjects/rotone/subject.en.txt
Normal file
28
exam-basedir02/subjects/rotone/subject.en.txt
Normal 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
|
||||||
|
$
|
||||||
|
$>
|
31
exam-basedir02/subjects/rotone/subject.fr.txt
Normal file
31
exam-basedir02/subjects/rotone/subject.fr.txt
Normal 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
|
||||||
|
$
|
||||||
|
$>
|
30
exam-basedir02/subjects/rotone/subject.ro.txt
Normal file
30
exam-basedir02/subjects/rotone/subject.ro.txt
Normal 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
|
||||||
|
$
|
||||||
|
$>
|
72
exam-basedir02/traces/0-0_aff_a.trace
Normal file
72
exam-basedir02/traces/0-0_aff_a.trace
Normal 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 ===============================================================
|
148
exam-basedir02/traces/1-0_rotone.trace
Normal file
148
exam-basedir02/traces/1-0_rotone.trace
Normal 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 ===============================================================
|
154
exam-basedir02/traces/2-0_last_word.trace
Normal file
154
exam-basedir02/traces/2-0_last_word.trace
Normal 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 ===============================================================
|
160
exam-basedir02/traces/3-0_ft_atoi_base.trace
Normal file
160
exam-basedir02/traces/3-0_ft_atoi_base.trace
Normal 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 ===============================================================
|
67
exam-basedir02/traces/4-0_ft_itoa_base.trace
Normal file
67
exam-basedir02/traces/4-0_ft_itoa_base.trace
Normal 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 =============================================================
|
94
exam-basedir02/traces/4-1_ft_itoa.trace
Normal file
94
exam-basedir02/traces/4-1_ft_itoa.trace
Normal 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 ===============================================================
|
71
exam-basedir02/traces/4-2_fprime.trace
Normal file
71
exam-basedir02/traces/4-2_fprime.trace
Normal 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 ===============================================================
|
55
exam-basedir03/docs/GUIDELINES.en.md
Normal file
55
exam-basedir03/docs/GUIDELINES.en.md
Normal 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.
|
54
exam-basedir03/docs/GUIDELINES.fr.md
Normal file
54
exam-basedir03/docs/GUIDELINES.fr.md
Normal 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
|
56
exam-basedir03/docs/GUIDELINES.ro.md
Normal file
56
exam-basedir03/docs/GUIDELINES.ro.md
Normal 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-basedir03/rendu
Submodule
1
exam-basedir03/rendu
Submodule
Submodule exam-basedir03/rendu added at e0802ac7c8
8
exam-basedir03/subjects/aff_z/examples.txt
Normal file
8
exam-basedir03/subjects/aff_z/examples.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
$> ./aff_z "abc" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "dubO a POIL" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "zaz sent le poney" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z | cat -e
|
||||||
|
z$
|
21
exam-basedir03/subjects/aff_z/subject.en.txt
Normal file
21
exam-basedir03/subjects/aff_z/subject.en.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Assignment name : aff_z
|
||||||
|
Expected files : aff_z.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a program that takes a string, and displays the first 'z'
|
||||||
|
character it encounters in it, followed by a newline. If there are no
|
||||||
|
'z' characters in the string, the program writes 'z' followed
|
||||||
|
by a newline. If the number of parameters is not 1, the program displays
|
||||||
|
'z' followed by a newline.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
$> ./aff_z "abc" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "RaInB0w d4Sh!" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "ThE C4k3 Is a L|3" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z | cat -e
|
||||||
|
z$
|
22
exam-basedir03/subjects/aff_z/subject.fr.txt
Normal file
22
exam-basedir03/subjects/aff_z/subject.fr.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Assignment name : aff_z
|
||||||
|
Expected files : aff_z.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire un programme qui prend en paramètre une chaîne de caractères, et qui
|
||||||
|
affiche sur la sortie standard le premier caractère 'z' rencontré dans
|
||||||
|
cette chaîne, suivi de '\n'. Si aucun 'z'
|
||||||
|
n'est rencontré dans la chaîne, le programme affiche 'z' suivi de
|
||||||
|
'\n'. Si le nombre de paramètres est différent de 1, le
|
||||||
|
programme affiche 'z' suivi de '\n'.
|
||||||
|
|
||||||
|
Exemple:
|
||||||
|
|
||||||
|
$> ./aff_z "abc" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "dubO a POIL" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "zaz sent le poney" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z | cat -e
|
||||||
|
z$
|
19
exam-basedir03/subjects/aff_z/subject.ro.txt
Normal file
19
exam-basedir03/subjects/aff_z/subject.ro.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Exercitiu : aff_z
|
||||||
|
Fisiere de iesire : aff_z.c
|
||||||
|
Functii autorizate : write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
Scrieti un program ce ia ca parametru un sir de caractere, si care afiseaza la
|
||||||
|
iesirea standard primul caracter 'z' intalnit in acest sir, urmat de '\n'. Daca
|
||||||
|
nu este intalnit niciun caracter 'z', programul va afisa 'z' urmat de '\n'. Daca
|
||||||
|
numarul de parametri este diferit de 1, programul va afisa 'z' urmat de '\n'.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
$> ./aff_z "abc" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "dubO a POIL" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z "zaz sent le poney" | cat -e
|
||||||
|
z$
|
||||||
|
$> ./aff_z | cat -e
|
||||||
|
z$
|
6
exam-basedir03/subjects/brainfuck/examples.txt
Normal file
6
exam-basedir03/subjects/brainfuck/examples.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
$>./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
|
||||||
|
Hello World!$
|
||||||
|
$>./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
|
||||||
|
Hi$
|
||||||
|
$>./brainfuck | cat -e
|
||||||
|
$
|
32
exam-basedir03/subjects/brainfuck/subject.en.txt
Normal file
32
exam-basedir03/subjects/brainfuck/subject.en.txt
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
Assignment name : brainfuck
|
||||||
|
Expected files : *.c, *.h
|
||||||
|
Allowed functions: write, malloc, free
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a Brainfuck interpreter program.
|
||||||
|
The source code will be given as first parameter.
|
||||||
|
The code will always be valid, with no more than 4096 operations.
|
||||||
|
Brainfuck is a minimalist language. It consists of an array of bytes
|
||||||
|
(in our case, let's say 2048 bytes) initialized to zero,
|
||||||
|
and a pointer to its first byte.
|
||||||
|
|
||||||
|
Every operator consists of a single character :
|
||||||
|
- '>' increment the pointer ;
|
||||||
|
- '<' decrement the pointer ;
|
||||||
|
- '+' increment the pointed byte ;
|
||||||
|
- '-' decrement the pointed byte ;
|
||||||
|
- '.' print the pointed byte on standard output ;
|
||||||
|
- '[' go to the matching ']' if the pointed byte is 0 (while start) ;
|
||||||
|
- ']' go to the matching '[' if the pointed byte is not 0 (while end).
|
||||||
|
|
||||||
|
Any other character is a comment.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$>./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]
|
||||||
|
>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
|
||||||
|
Hello World!$
|
||||||
|
$>./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
|
||||||
|
Hi$
|
||||||
|
$>./brainfuck | cat -e
|
||||||
|
$
|
32
exam-basedir03/subjects/brainfuck/subject.fr.txt
Normal file
32
exam-basedir03/subjects/brainfuck/subject.fr.txt
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
Assignment name : brainfuck
|
||||||
|
Expected files : *.c, *.h
|
||||||
|
Allowed functions: write, malloc, free
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire un programme capable d'interpréter du Brainfuck.
|
||||||
|
Le code source sera passé en premier paramètre.
|
||||||
|
Le code transmis sera toujours valide, et ne comportera pas plus de 4096 opérations.
|
||||||
|
Le Brainfuck est un langage minimaliste constitué d'un tableau d'octets
|
||||||
|
(dans le cadre de cet exercice, 2048 octets) tous initialisés à 0,
|
||||||
|
et d'un pointeur sur son premier octet.
|
||||||
|
|
||||||
|
Voici les différents opérateurs du Brainfuck :
|
||||||
|
- '>' incrémente le pointeur ;
|
||||||
|
- '<' décrémente le pointeur ;
|
||||||
|
- '+' incrémente l'octet pointé ;
|
||||||
|
- '-' décrémente l'octet pointé ;
|
||||||
|
- '.' affiche l'octet pointé sur la sortie standard ;
|
||||||
|
- '[' va au ']' correspondant si l'octet pointé est égal à 0 (début de boucle) ;
|
||||||
|
- ']' va au '[' correspondant si l'octet pointé est différent de 0 (fin de boucle).
|
||||||
|
|
||||||
|
Tout autre caractère est un commentaire.
|
||||||
|
|
||||||
|
Exemples:
|
||||||
|
|
||||||
|
$>./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]
|
||||||
|
>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
|
||||||
|
Hello World!$
|
||||||
|
$>./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
|
||||||
|
Hi$
|
||||||
|
$>./brainfuck | cat -e
|
||||||
|
$
|
32
exam-basedir03/subjects/brainfuck/subject.ro.txt
Normal file
32
exam-basedir03/subjects/brainfuck/subject.ro.txt
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
Exercitiu : brainfuck
|
||||||
|
Fisiere de iesire : *.c, *.h
|
||||||
|
Functii autorizate : write, malloc, free
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Scrieti un interpretor de programe numit Brainfuck.
|
||||||
|
Codul sursa va fi dat ca primul argument.
|
||||||
|
Codul va fi mereu valid, cu cel mult 4096 operatii.
|
||||||
|
Barinfuck este un limbaj minimal. Contine un vector de bytes
|
||||||
|
(pentru acest exercitiu, 2048 bytes) initializati cu zero, si
|
||||||
|
un pointer spre primul byte.
|
||||||
|
|
||||||
|
Fiecare operator consista dintr-un singur caracter:
|
||||||
|
- '>' incrementeaza pointerul ;
|
||||||
|
- '<' decrementeaza pointerul ;
|
||||||
|
- '+' incrementeaza byte-ul la care pointeaza ;
|
||||||
|
- '-' decrementeaza byte-ul la care pointeaza ;
|
||||||
|
- '.' printeaza la iesirea standard byte-ul spre care pointeaza ;
|
||||||
|
- '[' du-te la perechea ']' byte-ul la care pointeaza e 0 (while start) ;
|
||||||
|
- ']' du-te la perechea '[' byte-ul la care pointeaza nu e 0 (while end).
|
||||||
|
|
||||||
|
Orice alt caracter este un comentariu.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$>./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]
|
||||||
|
>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
|
||||||
|
Hello World!$
|
||||||
|
$>./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
|
||||||
|
Hi$
|
||||||
|
$>./brainfuck | cat -e
|
||||||
|
$
|
60
exam-basedir03/subjects/flood_fill/subject.en.txt
Normal file
60
exam-basedir03/subjects/flood_fill/subject.en.txt
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Assignment name : flood_fill
|
||||||
|
Expected files : *.c, *.h
|
||||||
|
Allowed functions: -
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a function that takes a char ** as a 2-dimensional array of char, a
|
||||||
|
t_point as the dimensions of this array and a t_point as the starting point.
|
||||||
|
|
||||||
|
Starting from the given 'begin' t_point, this function 'colors' an entire zone
|
||||||
|
by replacing characters inside by the character 'F'. A zone is an ensemble of
|
||||||
|
the same character delimitated horizontally and vertically by other characters.
|
||||||
|
|
||||||
|
The flood_fill function won't 'color' in diagonal.
|
||||||
|
|
||||||
|
The flood_fill function will be prototyped like this:
|
||||||
|
void flood_fill(char **tab, t_point size, t_point begin);
|
||||||
|
|
||||||
|
The t_point structure is available inside the "t_point.h" file attached to this
|
||||||
|
assignment. We will use our "t_point.h" for graduation.
|
||||||
|
|
||||||
|
Example :
|
||||||
|
|
||||||
|
$> cat test_main.c
|
||||||
|
#include "test_functions.h"
|
||||||
|
#include "flood_fill.h"
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
char **area;
|
||||||
|
t_point size = { 8, 5 };
|
||||||
|
t_point begin = { 2, 2 };
|
||||||
|
char *zone[] = {
|
||||||
|
"11111111",
|
||||||
|
"10001001",
|
||||||
|
"10010001",
|
||||||
|
"10110001",
|
||||||
|
"11100001"
|
||||||
|
};
|
||||||
|
|
||||||
|
area = make_area(zone);
|
||||||
|
print_tab(area);
|
||||||
|
flood_fill(area, size, begin);
|
||||||
|
putc('\n');
|
||||||
|
print_tab(area);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$> gcc flood_fill.c test_main.c test_functions.c -o flood_fill ; ./flood_fill
|
||||||
|
1 1 1 1 1 1 1 1
|
||||||
|
1 0 0 0 1 0 0 1
|
||||||
|
1 0 0 1 0 0 0 1
|
||||||
|
1 0 1 1 0 0 0 1
|
||||||
|
1 1 1 0 0 0 0 1
|
||||||
|
|
||||||
|
1 1 1 1 1 1 1 1
|
||||||
|
1 F F F 1 0 0 1
|
||||||
|
1 F F 1 0 0 0 1
|
||||||
|
1 F 1 1 0 0 0 1
|
||||||
|
1 1 1 0 0 0 0 1
|
||||||
|
$>
|
62
exam-basedir03/subjects/flood_fill/subject.fr.txt
Normal file
62
exam-basedir03/subjects/flood_fill/subject.fr.txt
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
Assignment name : flood_fill
|
||||||
|
Expected files : *.c, *.h
|
||||||
|
Allowed functions: -
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Ecrivez une fonction qui prends en paramètres un char** qui sera une aire à 2
|
||||||
|
dimensions, une structure de type t_point qui donnera la longueur et la largeur
|
||||||
|
de cette aire, et une structure de type t_point symbolisant le point de départ.
|
||||||
|
|
||||||
|
Cette fonction devra 'colorer' une zone de l'aire donnée en argument, en
|
||||||
|
remplaçant les caractères de cette zone par des 'F'. Une zone est un ensemble
|
||||||
|
de mêmes caractères, délimitée horizontalement et verticalement par d'autres
|
||||||
|
caractères.
|
||||||
|
|
||||||
|
La fonction flood_fill ne 'colore' pas en diagonale.
|
||||||
|
|
||||||
|
La fonction flood_fill devra être prototypée comme suit :
|
||||||
|
void flood_fill(char **tab, t_point size, t_point begin);
|
||||||
|
|
||||||
|
La structure t_point est présente dans le fichier "t_point.h" mis en annexe
|
||||||
|
de ce sujet. Nous utiliserons notre "t_point.h" pour le rendu.
|
||||||
|
|
||||||
|
Exemple:
|
||||||
|
|
||||||
|
$>cat test_main.c
|
||||||
|
#include "test_functions.h"
|
||||||
|
#include "t_point.h"
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
char **area;
|
||||||
|
t_point size = { 8, 5 };
|
||||||
|
t_point begin = { 2, 2 };
|
||||||
|
char *zone[] = {
|
||||||
|
"11111111",
|
||||||
|
"10001001",
|
||||||
|
"10010001",
|
||||||
|
"10110001",
|
||||||
|
"11100001"
|
||||||
|
};
|
||||||
|
|
||||||
|
area = make_area(zone);
|
||||||
|
print_tab(area);
|
||||||
|
flood_fill(area, size, begin);
|
||||||
|
putc('\n');
|
||||||
|
print_tab(area);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$> gcc flood_fill.c test_main.c test_functions.c -o flood_fill ; ./flood_fill
|
||||||
|
1 1 1 1 1 1 1 1
|
||||||
|
1 0 0 0 1 0 0 1
|
||||||
|
1 0 0 1 0 0 0 1
|
||||||
|
1 0 1 1 0 0 0 1
|
||||||
|
1 1 1 0 0 0 0 1
|
||||||
|
|
||||||
|
1 1 1 1 1 1 1 1
|
||||||
|
1 F F F 1 0 0 1
|
||||||
|
1 F F 1 0 0 0 1
|
||||||
|
1 F 1 1 0 0 0 1
|
||||||
|
1 1 1 0 0 0 0 1
|
||||||
|
$>
|
10
exam-basedir03/subjects/flood_fill/t_point.h
Normal file
10
exam-basedir03/subjects/flood_fill/t_point.h
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#ifndef T_POINT_FLOOD_FILL
|
||||||
|
# define T_POINT_FLOOD_FILL
|
||||||
|
|
||||||
|
typedef struct s_point {
|
||||||
|
int x; // x : Width | x-axis
|
||||||
|
int y; // y : Height | y-axis
|
||||||
|
} t_point;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
20
exam-basedir03/subjects/ft_atoi_base/subject.en.txt
Normal file
20
exam-basedir03/subjects/ft_atoi_base/subject.en.txt
Normal 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);
|
21
exam-basedir03/subjects/ft_atoi_base/subject.fr.txt
Normal file
21
exam-basedir03/subjects/ft_atoi_base/subject.fr.txt
Normal 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);
|
11
exam-basedir03/subjects/ft_itoa/subject.en.txt
Normal file
11
exam-basedir03/subjects/ft_itoa/subject.en.txt
Normal 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);
|
12
exam-basedir03/subjects/ft_itoa/subject.fr.txt
Normal file
12
exam-basedir03/subjects/ft_itoa/subject.fr.txt
Normal 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);
|
10
exam-basedir03/subjects/ft_itoa/subject.ro.txt
Normal file
10
exam-basedir03/subjects/ft_itoa/subject.ro.txt
Normal 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);
|
13
exam-basedir03/subjects/ft_putstr/subject.en.txt
Normal file
13
exam-basedir03/subjects/ft_putstr/subject.en.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Assignment name : ft_putstr
|
||||||
|
Expected files : ft_putstr.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a function that displays a string on the standard output.
|
||||||
|
|
||||||
|
The pointer passed to the function contains the address of the string's first
|
||||||
|
character.
|
||||||
|
|
||||||
|
Your function must be declared as follows:
|
||||||
|
|
||||||
|
void ft_putstr(char *str);
|
12
exam-basedir03/subjects/ft_putstr/subject.fr.txt
Normal file
12
exam-basedir03/subjects/ft_putstr/subject.fr.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Assignment name : ft_putstr
|
||||||
|
Expected files : ft_putstr.c
|
||||||
|
Allowed functions: write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire une fonction qui affiche une chaîne de caractères sur la sortie standard.
|
||||||
|
|
||||||
|
Le pointeur passé à la fonction est l'adresse du premier caractère de la chaîne.
|
||||||
|
|
||||||
|
Elle devra être prototypée de la façon suivante :
|
||||||
|
|
||||||
|
void ft_putstr(char *str);
|
12
exam-basedir03/subjects/ft_putstr/subject.ro.txt
Normal file
12
exam-basedir03/subjects/ft_putstr/subject.ro.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Exercitiu : ft_putstr
|
||||||
|
Fisiere de iesire : ft_putstr.c
|
||||||
|
Functii autorizate : write
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Scrieti o functie ce afiseaza un sir de caractere la iesirea standard.
|
||||||
|
|
||||||
|
Pointerul catre functie este adresa primului caracter al sirului.
|
||||||
|
|
||||||
|
Ea trebuie sa aiba prototipul urmator:
|
||||||
|
|
||||||
|
void ft_putstr(char *str);
|
19
exam-basedir03/subjects/ft_rrange/subject.en.txt
Normal file
19
exam-basedir03/subjects/ft_rrange/subject.en.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Assignment name : ft_rrange
|
||||||
|
Expected files : ft_rrange.c
|
||||||
|
Allowed functions: malloc
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write the following function:
|
||||||
|
|
||||||
|
int *ft_rrange(int start, int end);
|
||||||
|
|
||||||
|
It must allocate (with malloc()) an array of integers, fill it with consecutive
|
||||||
|
values that begin at end and end at start (Including start and end !), then
|
||||||
|
return a pointer to the first value of the array.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
- With (1, 3) you will return an array containing 3, 2 and 1
|
||||||
|
- With (-1, 2) you will return an array containing 2, 1, 0 and -1.
|
||||||
|
- With (0, 0) you will return an array containing 0.
|
||||||
|
- With (0, -3) you will return an array containing -3, -2, -1 and 0.
|
19
exam-basedir03/subjects/ft_rrange/subject.fr.txt
Normal file
19
exam-basedir03/subjects/ft_rrange/subject.fr.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Assignment name : ft_rrange
|
||||||
|
Expected files : ft_rrange.c
|
||||||
|
Allowed functions: malloc
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire la fonction suivante :
|
||||||
|
|
||||||
|
int *ft_rrange(int start, int end);
|
||||||
|
|
||||||
|
Cette fonction doit allouer avec malloc() un tableau d'ints, le remplir avec
|
||||||
|
les valeurs (consécutives) démarrant à end et finissant à start (start et end
|
||||||
|
inclus !), et renvoyer un pointeur vers la première valeur du tableau.
|
||||||
|
|
||||||
|
Exemples:
|
||||||
|
|
||||||
|
- Avec (1, 3) vous devrez renvoyer un tableau contenant 3, 2 et 1.
|
||||||
|
- Avec (-1, 2) vous devrez renvoyer un tableau contenant 2, 1, 0 et -1.
|
||||||
|
- Avec (0, 0) vous devrez renvoyer un tableau contenant 0.
|
||||||
|
- Avec (0, -3) vous devrez renvoyer un tableau contenant -3, -2, -1 et 0.
|
22
exam-basedir03/subjects/ft_rrange/subject.ro.txt
Normal file
22
exam-basedir03/subjects/ft_rrange/subject.ro.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Exercitiu : ft_rrange
|
||||||
|
Fisier de iesire : ft_rrange.c
|
||||||
|
Functii autorizate : malloc
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
Scrieti functia urmatoare:
|
||||||
|
|
||||||
|
int *ft_rrange(int start, int end);
|
||||||
|
|
||||||
|
Aceasta functie trebuie sa aloce cu ajutorul functiei malloc() un tablou de
|
||||||
|
intregi si sa-l umple valori (consecutive) incepand cu endsi terminand cu start
|
||||||
|
(start si end incluse!), si sa returneze un pointer spre prima valoare a tabloului.
|
||||||
|
|
||||||
|
Exemplu:
|
||||||
|
|
||||||
|
|
||||||
|
Cu parametri (1, 3) trebuie sa returnati un tablou continand valorile 3, 2 si 1.
|
||||||
|
|
||||||
|
Cu parametri (-1, 2) trebuie sa returnati un tablou continand valorile 2, 1, 0 si -1.
|
||||||
|
|
||||||
|
Cu parametri (0, 0) trebuie sa returnati un tablou continand valorile 0.
|
||||||
|
|
||||||
|
Cu parametri (0, -3) trebuie sa returnati un tablou continand valorile -3, -2, -1 si 0.
|
14
exam-basedir03/subjects/ft_split/subject.en.txt
Normal file
14
exam-basedir03/subjects/ft_split/subject.en.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Assignment name : ft_split
|
||||||
|
Expected files : ft_split.c
|
||||||
|
Allowed functions: malloc
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write a function that takes a string, splits it into words, and returns them as
|
||||||
|
a NULL-terminated array of strings.
|
||||||
|
|
||||||
|
A "word" is defined as a part of a string delimited either by spaces/tabs/new
|
||||||
|
lines, or by the start/end of the string.
|
||||||
|
|
||||||
|
Your function must be declared as follows:
|
||||||
|
|
||||||
|
char **ft_split(char *str);
|
16
exam-basedir03/subjects/ft_split/subject.fr.txt
Normal file
16
exam-basedir03/subjects/ft_split/subject.fr.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
Assignment name : ft_split
|
||||||
|
Expected files : ft_split.c
|
||||||
|
Allowed functions: malloc
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire une fonction qui prend en paramètre une chaîne de caractères et la
|
||||||
|
découpe en mots, qui seront retournés sous la forme d'un tableau de chaînes
|
||||||
|
terminé par NULL.
|
||||||
|
|
||||||
|
On appelle "mot" une portion de chaîne de caractères délimitée soit par des
|
||||||
|
espaces, des retours à la ligne et/ou des tabulations, soit par le début / fin
|
||||||
|
de la chaîne.
|
||||||
|
|
||||||
|
Votre fonction devra être prototypée de la façon suivante :
|
||||||
|
|
||||||
|
char **ft_split(char *str);
|
15
exam-basedir03/subjects/ft_split/subject.ro.txt
Normal file
15
exam-basedir03/subjects/ft_split/subject.ro.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Exercitiu : ft_split
|
||||||
|
Fisier de iesire : ft_split.c
|
||||||
|
Functii autorizate : malloc
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Scrieti o functie ce ia ca parametru un sir de caractere si pe care il separa
|
||||||
|
in cuvinte, ce vor fi returnate sub forma unui tablou siruri terminate cu NULL.
|
||||||
|
|
||||||
|
Numim "cuvant" o portiune a a sirului de caractere delimitate de fie de spatii
|
||||||
|
si/sau tabulatoare, fie de inceputul/sfarsitul sirului.
|
||||||
|
|
||||||
|
Functia va trebui sa aiba urmatorul prototip:
|
||||||
|
|
||||||
|
char **ft_split(char *str);
|
||||||
|
|
15
exam-basedir03/subjects/max/subject.en.txt
Normal file
15
exam-basedir03/subjects/max/subject.en.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Assignment name : max
|
||||||
|
Expected files : max.c
|
||||||
|
Allowed functions:
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Write the following function:
|
||||||
|
|
||||||
|
int max(int* tab, unsigned int len);
|
||||||
|
|
||||||
|
The first parameter is an array of int, the second is the number of elements in
|
||||||
|
the array.
|
||||||
|
|
||||||
|
The function returns the largest number found in the array.
|
||||||
|
|
||||||
|
If the array is empty, the function returns 0.
|
15
exam-basedir03/subjects/max/subject.fr.txt
Normal file
15
exam-basedir03/subjects/max/subject.fr.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Assignment name : max
|
||||||
|
Expected files : max.c
|
||||||
|
Allowed functions:
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Écrire la fonction suivante:
|
||||||
|
|
||||||
|
int max(int *tab, unsigned int len);
|
||||||
|
|
||||||
|
Le premier paramètre est un tableau d'int, le deuxième est le nombre d'éléments
|
||||||
|
contenus dans ce tableau.
|
||||||
|
|
||||||
|
La fonction renvoie le plus grand nombre trouvé dans le tableau.
|
||||||
|
|
||||||
|
Si le tableau est vide, la fonction renvoie 0.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user