String Printing Program in C



Implementation

Now, we shall see the actual implementation of the program −

#include <stdio.h>

int main() {
   char str[] = "Hello World";

   printf("%s\n", str);

   return 0;
}

Output

Output of this program should be −

Hello World
string_programs_in_c.htm
Advertisements