reading string with spaces in c

Solutions on MaxInterview for reading string with spaces in c by the best coders in the world

showing results for - "reading string with spaces in c"
Paola
21 Feb 2016
1scanf ("%[^\n]%*c", name);
2
Valentina
18 Nov 2020
1char name[30];
2char temp;
3
4printf("Enter age: ");
5scanf("%d", &age);
6printf("Enter name: ");
7scanf("%c", &temp); // temp statement to clear buffer
8scanf("%[^\n]", name); // read until newline
queries leading to this page
reading string with spaces in ctake string with spaces in chow to read string with space as input in cscanning string with spaces in cread string with spaces chow to get string input with spaces in chow to print n spaces in chow to read a string with spaces in chow to read space in string in chow to read string with spaces in ctake string with space in chow to take string input in c with spacesstring with spaces input cprinting a string with spaces in cc print string with spacesc read string with spaces from fileprinting strings with spaces ibn cread string with spaces in chow to read a string in c with spacehow to read string with space in chow to take string with space in cread string with space chow to scan string with spaces in c geekshow to inout string with space in cstring with space in chow to scan a string in c with spacesread string with space in cstrcat a space in cread string with space character in cstring with spaces c programmingread string by whitespace creading words from string with spaces in chow to read a line consisting of strings and spaces in chow to get a string with spaces in chow to input string with spaces in chow take string with space in cc read a string with spacesc read string with spacestake space from string creading a string with spaces in cscan string with space in chow to read a string with spaces from keyboard in cprint string with spaces in cc get string with spaceshow to print string with spaces in chow to read a string with a space in chow to read a line with spaces in chow to scan string with spaces in cget string with spaces in chow to get string with space in cc read string whitespaceread spaces in cstring with space in c in arrayhow to input a string with spaces in cc best way to read string with spacesread a string with spaces in center a string with spaces in chow to get a string with space in chow to read space in creading string with spaces in c