He desarrollado algunos programas en C:

C01, C02, C04, Libft y Get Next Line

Programas básicos

Parte 1 (C01).

  • ex00 (ft_ft) -> Takes a pointer to an integer as a parameter.
  • ex01 (ft_ultimate_ft) -> Takes a pointer to a pointer to a pointer... to an integer.
  • ex02 (ft_swap) -> Takes two integer pointers as parameters and swaps the values they point to.
  • ex03 (ft_div_mod) -> Takes two integers a and b, calculates their division and remainder, and stores the results in the provided memory locations pointed to by div and mod.
  • ex04 (ft_ultimate_div_mod) -> Takes two integer pointers a and b, calculates their division and remainder, and updates the values they point to with the quotient and remainder, respectively.
  • ex05 (ft_putstr) -> Takes a pointer to a character (char *str) and prints the string it points to.
  • ex06 (ft_strlen) -> Calculate the length of the string.
  • ex07 (ft_rev_int_tab) -> Takes an array of integers (int *tab) and its size (int size). It reverses the order of the elements in the array by swapping elements from the beginning to the end.
  • ex08 (ft_sort_int_tab) -> Implements the insertion sort algorithm.

 

Parte 2 (C02).

  • ex00 (ft_strcpy) -> Copies the content from one string to another.
  • ex01 (ft_strncpy) -> Copies the content from one string to another, given the number of characters to copy.
  • ex02 (ft_str_is_alpha) -> Checks if the string is alphanumeric.
  • ex03 (ft_str_is_numeric) -> Checks if the string is numeric.
  • ex04 (ft_str_is_lowercase) -> Verifies that the string is lowercase.
  • ex05 (ft_str_is_uppercase) -> Verifies that the string is uppercase.
  • ex06 (ft_str_is_printable) -> Checks if the string is printable.
  • ex07 (ft_strupcase) -> Converts a string to uppercase.
  • ex08 (ft_strlowcase) -> Converts a string to lowercase.
  • ex09 (ft_strcapitalize) -> Capitalizes the first letter of each word.
  • ex10 (ft_strlcpy) -> Performs a secure copy from the source string (src) to the destination string (dest) with a size limit (size).
  • ex11 (ft_putstr_non_printable) -> Prints characters to the console. If the character is not printable, it is written in the corresponding hexadecimal value of the byte.
  • ex12 (ft_print_memory) -> Prints a visual representation of memory in hexadecimal and ASCII format. Each line displays the start address, the hexadecimal values of 16 bytes, and their ASCII representation.

 

Parte 3 (C04).

  • ex00 (ft_strlen) -> Calculates the length of a string.
  • ex01 (ft_putstr) -> Prints each character of the string to the standard output.
  • ex02 (ft_putnbr) -> Prints an integer to the standard output.
  • ex03 (ft_atoi) -> Basic implementation of the atoi function that converts a character string to an integer.
  • ex04 (ft_putnbr_base) -> Converts an integer to a string in a given base and prints it to the standard output.
  • ex05 (ft_atoi_base) -> Converts a character string representing a number in a specific base to an integer in base 10.

 

Libft

 Haz clic aquí para ir al proyecto.

Librería de C que simula algunas de las funciones de la Libft. Esta librería incluye implementaciones de funciones comunes utilizadas en programación en C, como la manipulación de cadenas y el manejo de memoria.

Makefile incluido.

Funciones incluidas:

  • ft_isalnum.c
  • ft_isprint.c
  • ft_lstclear.c
  • ft_lstmap.c
  • ft_memcmp.c
  • ft_putchar_fd.c
  • ft_split.c
  • ft_strjoin.c
  • ft_strmapi.c
  • ft_strrchr.c
  • ft_toupper.c
  • ft_atoi.c
  • ft_isalpha.c
  • ft_itoa.c
  • ft_lstdelone.c
  • ft_lstnew.c
  • ft_memcpy.c
  • ft_putendl_fd.c
  • ft_strchr.c
  • ft_strlcat.c
  • ft_strncmp.c
  • ft_strtrim.c
  • ft_bzero.c
  • ft_isascii.c
  • ft_lstadd_back.c
  • ft_lstiter.c
  • ft_lstsize.c
  • ft_memmove.c
  • ft_putnbr_fd.c
  • ft_strdup.c
  • ft_strlcpy.c
  • ft_substr.c
  • ft_calloc.c
  • ft_isdigit.c
  • ft_lstadd_front.c
  • ft_lstlast.c
  • ft_memchr.c
  • ft_memset.c
  • ft_putstr_fd.c
  • ft_striteri.c
  • ft_strlen.c
  • ft_strnstr.c
  • ft_tolower.c

 

Get Next Line

Haz clic aquí para ir al proyecto.

Función en C que permite leer una línea que termina con un carácter de nueva línea ('\n') desde un descriptor de archivo.

Con cada llamada a la función get_next_line, lee una línea del descriptor de archivo especificado.