How C prints strings

How C prints strings

Use %s to specify the string format

/*
print a string in C language
*/

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main()
{
  // declare and initialize a string
  char str[] = "lautturi";

  // print the string
  printf("%s", str);
  return 0;
}
Source‮w:‬ww.lautturi.com
Created Time:2017-08-29 05:39:21  Author:lautturi