Question: The following code compiles without problems:

```
int main() {
    printf("Hi" "Bye");
}

```

However, this does not compile:

```
int main() {
    int test = 0;
    printf("Hi" (test ? "Bye" : "Goodbye"));
}

```

What is the reason for that?

Answer: 
According to the C Standard (5.1.1.2 Translation phases)

> 
> 1 The precedence among the syntax rules of translation is specified by
>  the following phases.6)
> 
> 
> 6. Adjacent string literal tokens are concatenated.
> 
> 
> 

And only after that

> 
> 7. White-space characters separating tokens are no longer significant. Each 
>  preprocessing token is converted into a token. **The resulting
>  tokens are syntactically and semantically analyzed and translated as a
>  translation unit**.
> 
> 
> 

In this construction

```
"Hi" (test ? "Bye" : "Goodbye")

```

there are no adjacent string literal tokens. So this construction is invalid.
If you really want to have both branches produce compile-time string constants to be chosen at runtime, you'll need a macro.

```
#include <stdio.h>
#define ccat(s, t, a, b) ((t)?(s a):(s b))

int
main ( int argc, char **argv){
  printf("%s\n", ccat("hello ", argc > 2 , "y'all", "you"));
  return 0;
}

```