#include <stdio.h>
#include<stdlib.h>
#include<time.h>
#include <string.h>
char* cloneStr(const char* s)
{
    int n = strlen(s);
    char* out = (char*)malloc((n+1)*sizeof(char));
    for (int i =0; i<=n; i++){
        out[i] = s[i];
    }
    return out;
}
int main() {
    char* t = cloneStr("Bonjour");
    printf("%s",t);
    free(t);
    int pile[5] = {0,0,0,0,2};
    int * tas = (int*)calloc(5,sizeof(int));
    tas[4] = 2;
    for (int i =0;i<5;i++){
        pile[i] = tas[i];
    }
    free(tas);




    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: