mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Added missing information about scanf
This commit is contained in:
parent
2ed44955b5
commit
44e15f8004
@ -101,6 +101,12 @@ int main (int argc, char** argv)
|
||||
// %d is an integer, \n is a newline
|
||||
printf("%d\n", 0); // => Prints 0
|
||||
|
||||
// take input using scanf
|
||||
// '&' is used to define the location
|
||||
// where we want to store the input value
|
||||
int input;
|
||||
scanf("%d", &input);
|
||||
|
||||
///////////////////////////////////////
|
||||
// Types
|
||||
///////////////////////////////////////
|
||||
@ -901,10 +907,11 @@ Node createLinkedList(int *vals, int len);
|
||||
#endif /* End of the if precompiler directive. */
|
||||
|
||||
```
|
||||
|
||||
## Further Reading
|
||||
|
||||
Best to find yourself a copy of [K&R, aka "The C Programming Language"](https://en.wikipedia.org/wiki/The_C_Programming_Language)
|
||||
It is *the* book about C, written by Dennis Ritchie, the creator of C, and Brian Kernighan. Be careful, though - it's ancient and it contains some
|
||||
It is _the_ book about C, written by Dennis Ritchie, the creator of C, and Brian Kernighan. Be careful, though - it's ancient and it contains some
|
||||
inaccuracies (well, ideas that are not considered good anymore) or now-changed practices.
|
||||
|
||||
Another good resource is [Learn C The Hard Way](http://learncodethehardway.org/c/) (not free).
|
||||
|
Loading…
Reference in New Issue
Block a user