C Program To Print A Full String Input By Keyboard using string

#include <stdio.h>
#include <conio.h>
int main(){
    char inputString[100];
    printf("Enter a string\n");
    /* Read string from user using scanf and
    store it in inputString char array */
    scanf("%s", inputString);
    /* Print string stored in inputString using printf */
    printf("%s\n", inputString);
    getch();
    return 0;
}

Output:

Enter a string
Chasetolearn
chasetolearncourse
Enter a string
Chase to Learn
Chase to Learn Course
Sharing Is Caring

Leave a Comment