Skip to content

Instantly share code, notes, and snippets.

We couldn’t find that file to show.
@yclim95
yclim95 / README.md
Last active May 25, 2022 03:36
ft_strlcpy() in c
#include <stdio.h>

size_t	ft_strlen(const char *s)
{
	size_t	counter;

	counter = 0;
	while(s[counter] != '\0')
 counter++;
@yclim95
yclim95 / README.md
Created May 25, 2022 01:52
strrchr() in c
#include <stdio.h>

size_t	ft_strlen(const char *s)
{
	size_t	counter;

	counter = 0;
	while(s[counter] != '\0')
 counter++;
@yclim95
yclim95 / README.md
Created May 24, 2022 07:44
memmove() in c

memmove() in c - Explanation

#include <stdio.h>
#include <string.h>
int main()
{
    char str[100] = "Learningisfun";
    char *first, *second;
    first = str;
@yclim95
yclim95 / README.md
Last active April 29, 2022 03:53
42 Practice Test - Level 3

1. Level 3 - 1

Assignment name  : add_prime_sum
Expected files   : add_prime_sum.c
Allowed functions: write, exit
--------------------------------------------------------------------------------

Write a program that takes a positive integer as argument and displays the sum
of all prime numbers inferior or equal to it followed by a newline.
@yclim95
yclim95 / README.md
Created April 28, 2022 02:49
42 Shell00

Ex00

mkdir ex00
cd ex00
vim z
enter "Z"

Ex01

@yclim95
yclim95 / README.md
Created April 22, 2022 12:33
To square(root) or not to square(root)

To square(root) or not to square(root)

Write a method, that will get an integer array as parameter and will process every number from this array.

Return a new array with processing every number of the input-array like this:

If the number has an integer square root, take this, otherwise square the number.

Example
@yclim95
yclim95 / README.md
Last active April 28, 2022 00:06
42 Practice Test - Level2

1. Level 2 - 1

Assignment name  : alpha_mirror
Expected files   : alpha_mirror.c
Allowed functions: write
--------------------------------------------------------------------------------

Write a program called alpha_mirror that takes a string and displays this string
after replacing each alphabetical character by the opposite alphabetical
@yclim95
yclim95 / README.md
Last active April 24, 2022 04:16
C08

Ex00

main.c

/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   main.c                                             :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
@yclim95
yclim95 / level1.md
Last active April 22, 2022 00:52
42 Practice Test - Level1

1. Level 1-1

Assignment name  : first_word
Expected files   : first_word.c
Allowed functions: write
--------------------------------------------------------------------------------

Write a program that takes a string and displays its first word, followed by a
newline.