Icaraeus Icaraeus - 3 months ago 8
C Question

Need Help Compiling C Source Code

#include <stdio.h>

int main(void)
{
char *s = "Jordan";
printf("hello, %s\n, s");
}


Does anyone know a way that I can get this native C source code to work? I'm having trouble getting it to compile and run.

Answer

Your second quote is in the wrong place. Try:

printf("hello, %s\n", s);
Comments