mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-06 06:47:54 +02:00
Added missing information about scanf
This commit is contained in:
@@ -101,6 +101,12 @@ int main (int argc, char** argv)
|
|||||||
// %d is an integer, \n is a newline
|
// %d is an integer, \n is a newline
|
||||||
printf("%d\n", 0); // => Prints 0
|
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
|
// Types
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
@@ -901,10 +907,11 @@ Node createLinkedList(int *vals, int len);
|
|||||||
#endif /* End of the if precompiler directive. */
|
#endif /* End of the if precompiler directive. */
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Further Reading
|
## 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)
|
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.
|
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).
|
Another good resource is [Learn C The Hard Way](http://learncodethehardway.org/c/) (not free).
|
||||||
|
Reference in New Issue
Block a user