you can't design a program which doesn't take memory. even if you write
#include<stdio.h> void main() { }
it will take some memory in stack for main functions. as main is a functions being called by startup code so when ever u call a function some information is stored in stack such as base pointer startup code address etc.