Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

c code to get a line as input

Piragadeesh Kanujan answered on February 10, 2023 Popularity 7/10 Helpfulness 1/10

Contents


More Related Answers

  • taking input in single line c#
  • how to get user input in c
  • line counter in c
  • read enter in c
  • input in c
  • c read input
  • input value from terminal to c
  • Input output for c programming
  • enter to continue c
  • getline() in c
  • Syntax To Take Input In C
  • read string input in c
  • read from command line c
  • how to get input in c
  • getline() in c
  • getline function in C
  • how to input till end of line in c
  • how to take input in C
  • getline() in c
  • getline() in c
  • how to use getline in c programming
  • how to take inputs in one line in c
  • how to input a para in c
  • readline in c
  • explain code line by line explanation in c
  • read file line by line c

  • c code to get a line as input

    0

    #include<stdio.h>

    int main()

    {

    char str[20];

    scanf("%[^\n]%*c", str);

    printf("%s", str);

    return 0;

    Popularity 7/10 Helpfulness 1/10 Language c
    Source: Grepper
    Tags: c get input line
    Link to this answer
    Share Copy Link
    Contributed on Feb 10 2023
    Piragadeesh Kanujan
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.