- Arrive early to the cluster for exams (15/20 minutes) to have time to setup your exam dev environment.
From the moment you are assigned a computer you can login right away with the credentials provided. Expect something like:
login : exam
password : exam
Point a terminal to your ~/
directory and add the following lines to your .zshrc
, .gdbinit
and .vimrc
files.
If any of these files does not exist, create it. This should be the case for both .vimrc
and .gdbinit
.
.zshrc
Add convenient aliases:
# Compile with warnings & debug symbols
alias ccw='cc -Wall -Wextra -Werror -g'
# Git
alias ga='git add'
alias gst='git status'
alias gc='git commit -m'
.gdbinit
This line allows GDB to load a .gdbinit
file from any working directory in the system.
Note
Check out my get_next_line repo for more info on using .gdbinit
.
set auto-load safe-path /
.vimrc
A basic vim configuration, edit this to your liking.
runtime! defaults.vim
syntax on
set mouse=a " Enable mouse
set noswapfile " Disable swap files
set ruler
set number
set relativenumber
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
runtime! ftplugin/man.vim " Open man pages in Vim
-
You can only log into examshell right on the starting time of the exam.
-
Use your 42 student
login
andpassword
credentials to get access to examshell. -
You will be assigned an exercise randomly at each level.
-
You can only progress to Level 2 after you have completed Level 1, and so on.
Note
You do NOT need to conform to Norminette
's syntax rules while solving the exam.
- This is where the git aliases we defined in
.zshrc
come in. To validate each exercise, first you need to upload it to the vogsphere using git commands.
Tip
Never use
git add .
(or the aliasga .
) to avoid staging files that are not required by the subject. Always specify the name of the file/files you want to stage.Use and abuse
git status
(or the aliasgst
) to make sure you only commit files required by the subject.If you want to be extra cautious, setup a
.gitignore
at the root of the exam's submission directory, with contents similar to the following:.gitignore */a.out */main.c */gdb.txt */.gdbinit
The Rank 2 Exam has four levels, comprised of several exercises each.
Tip
ft_isspace
is a particularly helpful function when solving a lot of the exercises through every level of the exam.
Here follow the solutions to all exam exercises (as of January 2024), including all test code and .gdbinit
files developed to test and study each exercise.
For Rank 3 Exam you will have to solve a "mini" ft_printf
or get_next_line
exercise.
ft_print |
get_next_line |
---|---|
ft_printf | get_next_line |
Warning
I'll be updating this repo with more tips and resources as I progress through the Common Core.
Good luck with the exams!
This work is published under the terms of 42 Unlicense.