scanf
String reading issue using scanf
Now i read somehwere: The scanf() conversion %[\\n] will match a newline character, while %[^\\n] will match all characters up to[详细]
2023-02-25 02:08 分类:问答Problem with scanf loading struct -> char[]
I\'m dealing with this issue: I\'ve been creating linked list (using a structure) and I want to load input from use开发者_如何学Cr.[详细]
2023-02-24 16:36 分类:问答how does scanf() check if the input is an integer or character?
I am wondering how does the standard C library function scanf() check if the input is an integer or a character when we call scanf(\"%d\",&var) when a character itself is just a number?[详细]
2023-02-24 03:32 分类:问答reading a file and saving in an array
I want a simple C program, which will read a file and saves the content of e开发者_StackOverflowach line to an array element. The file contains all the integer value. Only one integer value is present[详细]
2023-02-22 17:33 分类:问答Using scanf and fgets in the same program?
I need to do something like the following: int main(void) { char a,b,cstring; printf(\"please enter something\");[详细]
2023-02-22 15:42 分类:问答sscanf reads string in ( )
this question bothers me this few days. I want to read a string for example, input = (-0.001999,-0.919191,-0.777777,999999.999999)[详细]
2023-02-22 10:29 分类:问答Reading C character arrays into doubles
This is a very elementary question, but my C is very very rusty and I need a refresher.I have a string which is always in exactly the same format: di ###.# ###.# ###.[详细]
2023-02-21 02:45 分类:问答C fscanf discarding extra characters if there is any
I\'m working on this project for one of my classes and it states, \"Discard everything after the three digit characters up to and including the next newline or EOF\".[详细]
2023-02-20 13:55 分类:问答Scanning Multiple inputs from one line using scanf
I\'m trying to scan in a single line input and storing it in a struct. I\'m not sure if I am storing it wrong or I am printing it wrong. I\'m not sure on how to use scanf with for loops since I never[详细]
2023-02-20 08:45 分类:问答Detecting change in value read by scanf
For an assignment we are supposed to read in a list of dates and associated values (temperatures) from a text document. Values in each line are separated by commas.[详细]
2023-02-20 08:10 分类:问答