c program to read string and print it code example Example 1: declare string in c char string[20]; Example 2: read string c char name[20]; scanf("%s", name);