P
Pan
#include <stdio.h>
#define MYSTR "World"
void foo(char *p)
{
puts(p);
}
int main()
{
foo("Hello" MYSTR);
}
Is this guaranteed to print HelloWorld - it does so on my system,
but just wanted to check.
Basically I wanted to know how to pass a concat of 2 strings, one
of which is in a macro into a function.
#define MYSTR "World"
void foo(char *p)
{
puts(p);
}
int main()
{
foo("Hello" MYSTR);
}
Is this guaranteed to print HelloWorld - it does so on my system,
but just wanted to check.
Basically I wanted to know how to pass a concat of 2 strings, one
of which is in a macro into a function.