Skip to content

PedroZappa/42_ExamPrep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exam Tips 

  • 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

Setting up the Exam Dev Environment 💻

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

Logging into Examshell 🐚

  • You can only log into examshell right on the starting time of the exam.

  • Use your 42 student login and password 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.


Submitting to the Vogsphere 🌐

  • 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 alias ga .) 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 alias gst) 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

Exam Exercises 🧪

Exam Rank 2

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.


Level 1 Level 2 Level 3 Level 4
first_word alpha_mirror add_prime_sum flood_fill
fizzbuzz camel_to_snake epur_str fprime
ft_putstr do_op expand_str ft_itoa
ft_strcpy ft_atoi ft_atoi_base ft_list_foreach
ft_strlen ft_strcmp ft_list_size ft_list_remove_if
ft_swap ft_strcspn ft_range ft_split
repeat_alpha ft_strdup ft_rrange rev_wstr
rev_print ft_strpbrk hidenp rostring
rot_13 ft_strrev lcm sort_int_tab
rotone ft_strspn paramsum sort_list
search_and_replace inter pgdc
ulstr is_power_of_2 print_hex
last_word rstr_capitalizer
max str_capitalizer
print_bits tab_mult
reverse_bits
snake_to_camel
swap_bits
union
wdmatch

Exam Rank 3

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!

License ©️

This work is published under the terms of 42 Unlicense.

(get to top)