Luna/apps/app.c

26 lines
467 B
C
Raw Normal View History

#include <stdio.h>
#include <stdlib.h>
2023-01-06 23:21:08 +00:00
#include <time.h>
void bye()
{
2023-01-07 00:49:26 +00:00
printf("byeee!\n");
}
int main()
{
atexit(bye);
printf("Welcome to %s from userspace!\n", "Luna");
char* address = (char*)malloc(1);
printf("address: %p\n", address);
printf("memory at address: %c\n", *address);
*address = 'e';
printf("memory at address: %c\n", *address);
free(address);
time_t now = time(NULL);
printf("date: %s", ctime(&now));
}