-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
32 lines (29 loc) · 1.19 KB
/
main.c
File metadata and controls
32 lines (29 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sid-bell <sid-bell@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/06/16 09:24:27 by sid-bell #+# #+# */
/* Updated: 2020/08/31 23:59:00 by sid-bell ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_malloc.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
//#include <stdlib.h>
int main(void)
{
char *str;
char *test;
test = "abcdefghij";
str = ft_malloc(10);
strcpy(str, test);
printf("%p\n", str);
assert(!strcmp(str, test));
str = ft_realloc(str, 5);
printf("%p\n", str);
return (0);
}