Q:

C program to print a stringTo input a string, we can use scanf and gets functions

0

C program to print a stringTo input a string, we can use scanf and gets functions.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <stdio.h>
int main()
{
    char array[100];
   
    printf("Enter a string\n");
    scanf("%s", array);

    printf("Your string: %s\n", array);
    return 0;
}
Output:
Enter a string
We love C.
Your string: We

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now