print a string in c code example
Example 1: how to print in c
printf("");
Example 2: how to create a string in c
char greeting[6] = {'H', 'e', 'l', 'l', 'o', '\0'};
char greeting[] = "Hello";
Example 3: printing out 2 strings in c
// Use of Getstring
#include<stdio.h>
int main(){
char name[100];
int age;
printf("Enter your name\n");
gets(name);
printf("your name is %s", name);
}
//In the terminal your name is (name input)