C

No description

fork
loading
Files
  • main.c
  • main.s
main.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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char *my_itoa(int num, char *str)
{
        if(str == NULL)
        {
                return NULL;
        }
        sprintf(str, "%d", num);
        return str;
}

bool prompt (char s[]) {
	printf("%s", s);
	printf("\n");
	
	fgets(name);
}

int main () {
	char a[30] = "Allocating phrase 'yeet' with ";
	int b = sizeof("yeet");
	char c[b];
	my_itoa(b, c);
	char d[19] = " bytes of memory...";
	//concatenate(a, c, d);
	int e = sizeof(a) + sizeof(b) + sizeof(d);
	char f[e];
	snprintf(f, e, "%s%s%s", a, c, d);
	printf("%s", f);
	printf("\nLemme see yo titties bitch");
}