mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
typo
some type mistakes. It is: syntaxtically It should be: syntactically It is: iLoveC Better: ILoveC It is: passed to ≈the function It should be: passed to the function It is: error It should be: Error
This commit is contained in:
parent
1169c46b84
commit
7560ea8199
@ -239,7 +239,7 @@ int main (int argc, char** argv)
|
|||||||
z = (e > f) ? e : f; // => 10 "if e > f return e, else return f."
|
z = (e > f) ? e : f; // => 10 "if e > f return e, else return f."
|
||||||
|
|
||||||
// Increment and decrement operators:
|
// Increment and decrement operators:
|
||||||
char *s = "iLoveC";
|
char *s = "ILoveC";
|
||||||
int j = 0;
|
int j = 0;
|
||||||
s[j++]; // => "i". Returns the j-th item of s THEN increments value of j.
|
s[j++]; // => "i". Returns the j-th item of s THEN increments value of j.
|
||||||
j = 0;
|
j = 0;
|
||||||
@ -321,7 +321,7 @@ int main (int argc, char** argv)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// if `some_integral_expression` didn't match any of the labels
|
// if `some_integral_expression` didn't match any of the labels
|
||||||
fputs("error!\n", stderr);
|
fputs("Error!\n", stderr);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -497,7 +497,7 @@ int add_two_ints(int x1, int x2)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Functions are call by value. When a function is called, the arguments passed to
|
Functions are call by value. When a function is called, the arguments passed to
|
||||||
≈the function are copies of the original arguments (except arrays). Anything you
|
the function are copies of the original arguments (except arrays). Anything you
|
||||||
do to the arguments in the function do not change the value of the original
|
do to the arguments in the function do not change the value of the original
|
||||||
argument where the function was called.
|
argument where the function was called.
|
||||||
|
|
||||||
@ -726,7 +726,7 @@ Header files are an important part of c as they allow for the connection of c
|
|||||||
source files and can simplify code and definitions by seperating them into
|
source files and can simplify code and definitions by seperating them into
|
||||||
seperate files.
|
seperate files.
|
||||||
|
|
||||||
Header files are syntaxtically similar to c source files but reside in ".h"
|
Header files are syntactically similar to c source files but reside in ".h"
|
||||||
files. They can be included in your c source file by using the precompiler
|
files. They can be included in your c source file by using the precompiler
|
||||||
command #include "example.h", given that example.h exists in the same directory
|
command #include "example.h", given that example.h exists in the same directory
|
||||||
as the c file.
|
as the c file.
|
||||||
|
Loading…
Reference in New Issue
Block a user