Skip to content

Instantly share code, notes, and snippets.

@cosydney
Created September 9, 2016 06:20
Show Gist options
  • Save cosydney/483b571a45e13758cd027888452014ed to your computer and use it in GitHub Desktop.
Save cosydney/483b571a45e13758cd027888452014ed to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <stdio.h>
#include "./ex00/ft_strdup.c"
#include "./ex01/ft_range.c"
int main(void)
{
int i;
int *tab;
printf("#-EX00- FT_RANGE_#\n");
char coucou[9] = "coucou";
printf("%p\n", &coucou);
printf("%s\n", ft_strdup(coucou));
printf("%p\n\n", ft_strdup(coucou));
printf("#-EX01- FT_RANGE_#\n");
i = 0;
tab = ft_range(8, 200);
while (i < (200 - 8))
{
printf("%d ", tab[i++]);
}
/*
printf("#-EX00- FT_RANGE_#\n");
printf("\n\n");
printf("#-EX00- FT_RANGE_#\n");
printf("\n\n");
printf("#-EX00- FT_RANGE_#\n");
printf("\n\n");
printf("#-EX00- FT_RANGE_#\n");
printf("\n\n");
printf("#-EX00- FT_RANGE_#\n");
printf("\n\n");
*/
return (0);
}
//////////// MAIN 02
#include <stdio.h>
int ft_ultimate_range(int **range, int min, int max);
int main()
{
int s;
int i = 0;
int *tab[78];
s = ft_ultimate_range(tab, 5000, 5030);
printf("%d", s);
return (0);
}
//////////////// main 03
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main03.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sycohen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/09/07 18:39:19 by sycohen #+# #+# */
/* Updated: 2016/09/08 13:58:32 by sycohen ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
#include "./ex03/ft_concat_params.c"
int main(int argc, char **argv)
{
printf("%s \n", ft_concat_params(argc, argv));
return (0);
}
////////////////////main 04
#include "./ex04/ft_split_whitespaces.c"
#include <stdio.h>
#include <stdio.h>
int main(void)
{
char **tab = ft_split_whitespaces("Hello this is me ");
printf("%s", tab[0]);
printf("%s", tab[1]);
printf("%s", tab[2]);
printf("%s", tab[3]);
printf("%s", tab[4]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment