void __cdecl PrintHello(char* name)
{
   char buf[10];
   strcpy(buf, "hello ");
   strcat(buf, name);
   puts(buf);
}

Example 1: Allocating a buffer on the stack and formatting a string based on the parameter passed to the function.

Back to Article