-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstsize.c
30 lines (26 loc) · 1.06 KB
/
ft_lstsize.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstsize.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: duzun <davut@uzun.ist> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/20 03:48:41 by duzun #+# #+# */
/* Updated: 2023/04/12 20:19:55 by duzun ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
* bagli listedeki eleman sayisini bulur.
*/
int ft_lstsize(t_list *lst)
{
int cont;
cont = 0;
while (lst != NULL)
{
cont++;
lst = lst->next;
}
return (cont);
}