Reading and printing a string

·

1 min read

#include<stdio.h>

void main(){

char s[100];

printf(“Enter a string “);

scanf(“%s“,s);

printf(“The string is %s”,s);

}