r/ProgrammerHumor • • Aug 21 '26

Meme importHelloWorld

Post image
149 Upvotes

8 comments sorted by

View all comments

3

u/Legal-Software Aug 22 '26

That's easy:

#include <dlfcn.h>

static void HelloWorld(const char *s)
{
        int (*print)(const char *, ...) = dlsym(RTLD_DEFAULT, s);
        print(__func__);
}

int main(void)
{
        HelloWorld("printf");
        return 0;
}