Skip to content

mendes-jv/piscine-reloaded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Piscine Reloaded: C exercises to prepare you for the next 42 projects.

42 São Paulo License Code size in bytes Top language Last commit

Index:

Grade:

jovicto2's 42 Basecamp-Reloaded Score

Description:

Review the basics with a set of cherry-picked assignments from the selection Piscine.

The Project:

Exercises Task
Ex00 ls -l in folder should display specific things.
Ex01 Create a file which show Z when displayed with cat command.
Ex02 Find a command line that will search from current directory and any sub-directories files ending with ~ or beginning by #. It will show and delete these. Only one command allowed, no ";" or "&&"
Ex03 Find a command line that will search from current directory and any sub-directories files ending by ".sh", displaying only their name without ".sh"
Ex04 Write a command line that displays MAC adresses from your machine.
Ex05 Create a file containing ONLY "42", named "?$*'KwaMe'*$?".
Ex06 void ft_print_alphabet(void); Show the alphabet in lowercase a > z.
Ex07 void ft_print_numbers(void); Write all numbers on the same line 1 > 9.
Ex08 void ft_is_negative(int n); Return N when n is negative or P when it is positive (0 is positive).
Ex09 void ft_ft(int *nbr); Give the *nbr pointer the value 42.
Ex10 void ft_swap(int *a, int *b); Swap integers values using their adresses.
Ex11 void ft_div_mod(int a, int b, int *div, int *mod); Divide a by b and store at *div, store the rest at *mod.
Ex12 int ft_iterative_factorial(int nb); Iterative function that returns a number, result of factorial from nb.
Ex13 int ft_recursive_factorial(int nb); Returns the factorial of nb, recursively.
Ex14 int ft_sqrt(int nb); Returns square root of nb if it exist, else returns 0.
Ex15 void ft_putstr(char *str); Display a string.
Ex16 int ft_strlen(char *str); Reproduces strlen behavior.
Ex17 int ft_strcmp(char *s1, char *s2); Reproduces strcmp behavior.
Ex18 Write a program that displays arguments passed in command line.
Ex19 Write a program that display arguments passed in command line, ordered by ASCII.
Ex20 char *ft_strdup(char *src); Reproduces strdup behavior.
Ex21 int *ft_range(int min, int max); Returns an int array containing all integers between min and max.
Ex22 Write a macro ABS that replaces it's parameter by an absolute value.
Ex23 Write an ft_point.h that will compile the ft_point.c
Ex24 Makefile. Fetches src in /src, headers in /includes, require clean/fclean/re/all rules.
Ex25 void ft_foreach(int *tab, int length, void(*f)(int)); Apply a function on all elements of an array.
Ex26 int ft_count_if(char **tab, int(*f)(char*)); Returns number of elements in the array that returns 1.
Ex27 Write a program called ft_display_file that displays content of file passed in argument on STDOUT. Makefile with all/clean/fclean. Malloc FORBIDDEN. Errors display on STDERR.