-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_strdel.c
34 lines (30 loc) · 1.07 KB
/
ft_strdel.c
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
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* strdel_main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jony <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/28 10:11:12 by mhasan #+# #+# */
/* Updated: 2019/11/04 21:29:44 by jony ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_strdel(char **as)
{
if (as && *as)
{
free(*as);
*as = NULL;
}
}
int main(void)
{
int *p;
char *c;
c = "hello";
p = &c;
printf("%p", p);
ft_strdel(p);
return (0);
}