Luna/apps/app.c

26 lines
452 B
C

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void bye()
{
printf("byeee!\n");
}
int main()
{
atexit(bye);
printf("Welcome to %s!\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));
}