A string is an array of characters. : String Introduction « String « C Tutorial






#include <stdio.h>

int main(){
   char myname[] = "Dan";
  
   printf("%s \n",myname);
}
Dan








3.1.String Introduction
3.1.1.Strings
3.1.2.A string is an array of characters.
3.1.3.Write string in a more traditional array style
3.1.4.Strings always end with the NULL character
3.1.5.String constants consist of text enclosed in double quotes
3.1.6.Useful string function