Accept the String From the User and Print the Same - Learn Engineering

All the news and updates relevant to Engineering. You can also Write a post here

Breaking

Wednesday, July 8, 2020

Accept the String From the User and Print the Same

Learn C programming

Question

Accept the String From the User and Print the Same

Input Format

1<=StringLength<=100

Sample TestCase Expected Output

1. WorldofTech WorldofTech

2. 'C' the Change 'C' the Change

Answer

#include <stdio.h>

int main()
{
    char str[100];
    scanf("%[^\n]s",str);
    printf("%s",str);
    return 0;
}


Comment What problem Do you Need...

Follow Us For More...

1 comment: