mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-03-14 23:10:03 +01:00
[SPCA] Fix more typos
This commit is contained in:
@@ -83,8 +83,6 @@ in that they are passed by value and not by reference.
|
||||
You can of course pass it also by reference (like any other data type) by setting the argument to type \texttt{struct mystruct * name} and then calling the function using
|
||||
\texttt{func(\&test)} assuming \texttt{test} is the name of your struct
|
||||
|
||||
\newpage
|
||||
|
||||
\content{Typedef} To define a custom type using \texttt{typedef <type it represents> <name of the new type>}.
|
||||
|
||||
You may also use \texttt{typedef} on structs using \texttt{typedef struct <struct tag> <name of the new alias>},
|
||||
|
||||
@@ -11,7 +11,7 @@ and it can also be used to do a sort-of assertion that we have an arithmetic typ
|
||||
which will cause a compiler error if \texttt{x} is for example a pointer.
|
||||
Of course, the lower precedence \verb|+| and \verb|-| is addition and subtraction, respectively.
|
||||
|
||||
Very low precedence belongs to boolean operators \verb|&&| and \texttt{||}, as well as the ternary operator and assignment operators
|
||||
Very low precedence belongs to boolean operators \verb|&&| and \texttt{||}, as well as the ternary operator and assignment operators.
|
||||
\begin{table}[h!]
|
||||
\begin{tables}{ll}{Operator & Associativity}
|
||||
\texttt{() [] -> .} & Left-to-right \\
|
||||
@@ -33,8 +33,8 @@ Very low precedence belongs to boolean operators \verb|&&| and \texttt{||}, as w
|
||||
\caption{\lC\ operators ordered in descending order by precedence}
|
||||
\label{tab:c-operators}
|
||||
\end{table}
|
||||
In an expression like this
|
||||
\mint{c}|(expr1, expr2)|
|
||||
|
||||
In an expression like \texttt{x = (expr1, expr2)}
|
||||
the first expression is evaluated, its result is discarded, the second expression is executed and its result is returned.
|
||||
It is also possible to chain them, i.e. to use multiple without parenthesis, the last expression's value is ultimately returned.
|
||||
Of note is that the expressions have to be encased in parenthesis.
|
||||
|
||||
Reference in New Issue
Block a user