\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Elmaco7} \pdfinfo{ /Title (linguaggio-c.pdf) /Creator (Cheatography) /Author (Elmaco7) /Subject (Linguaggio C Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{DB0000} \definecolor{LightBackground}{HTML}{FCEFEF} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Linguaggio C Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Elmaco7} via \textcolor{DarkBackground}{\uline{cheatography.com/189285/cs/39484/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Elmaco7 \\ \uline{cheatography.com/elmaco7} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 7th July, 2023.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{1.14471 cm} x{3.83229 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Tipi di dati}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Int}} & interi \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Float}} & virgola mobile \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{Double}} & virgola mobile a precisione doppia \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} {\bf{Char}} & singolo carattere \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} {\bf{Void}} & indefinito \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Errori di sintassi}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Errori che si verificano durante la creazione di un programma.} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.53367 cm} p{1.44333 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Incremento e decremento}} \tn % Row 0 \SetRowColor{LightBackground} Incremento & `++` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Decremento & `-` \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Parole chiave}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Parole che fanno parte della libreria del linguaggio C standard} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Esempio}}: `void, return int`} \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Dangling Pointer}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Puntatore {\emph{penzolante}}: puntatore che punta a un indirizzo di memoria di qualsiasi variabile, ma dopo un po' la variabile è stata cancellata dalla posizione di memoria mantenendo il puntatore che punta a quella posizione} \tn % Row Count 5 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Funzione static}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Mi permette di creare variabili persistenti in una funzione. Le variabili interne delle funzioni sono variabili locali. Una volta terminata l'esecuzione della funzione, il loro valore si perde. L'istruzione static mantiene in memoria il valore di una variabile interna della funzione dopo ogni chiamata} \tn % Row Count 7 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Funzioni abs() e fabs()}} \tn % Row 0 \SetRowColor{LightBackground} `abs()` & valore assoluto di interi \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \seqsplit{`fabs()`} & valore assoluto di floating point \tn % Row Count 3 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Wild Pointer}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Puntatori non inizializzati} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Puntatore}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Variabile che contiene l'indirizzo di memoria di un'altra variabile} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Per definire un puntatore è necessario anteporre al nome della variabile un asterisco, che viene chiamato operatore di indirezione o deferenziazione} \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Esempio}}: `int a = 5, *x=\&a, **y=\&x;`. Qui `**y` restituisce il valore della variabile a.} \tn % Row Count 7 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.54747 cm} x{4.42953 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{++a e a++}} \tn % Row 0 \SetRowColor{LightBackground} `++a` & incremento avviene per primo su una variabile \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `a++` & incremento avviene dopo il valore di una variabile \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Caratteristiche C}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Portabilità}} & è un linguaggio indipendente dalla piattaforma \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Modularità}} & possibilità di suddividere grandi programmi in piccoli moduli \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{Flessibilità}} & possibilità di controllare il linguaggio \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} {\bf{Velocità}} & C viene fornito con il supporto per la programmazione di sistema \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} {\bf{Estensibilità}} & possibilità di aggiungere nuove funzionalità \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.44333 cm} x{3.53367 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Differenza tra virgolette " e parentesi \textless{}\textgreater{}}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{`\#include"path"`} & il preprocessore cerca i file di inclusione nel seguente ordine: \{\{nl\}\} 1. nella directory del file \{\{nl\}\} 2. nelle directory "padre" del file \{\{nl\}\} 3. lungo il percorso specificato da ogni opzione del compilatore \{\{nl\}\} 4. lungo i percorsi specificati dalla `include` \tn % Row Count 10 (+ 10) % Row 1 \SetRowColor{white} `\#include\textless{}path\textgreater{}` & il preprocessore cerca i file di inclusione nel seguente ordine: \{\{nl\}\} 1. lungo il percorso specificato da ogni opzione del compilatore \{\{nl\}\} 2. lungo i percorsi specificati dalla `include` \tn % Row Count 17 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.34379 cm} x{3.63321 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Commenti}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Spiegazione}} & isolano una parte del codice affinchè non influisca durante il debug \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} `//` & commento su una sola riga \tn % Row Count 4 (+ 1) % Row 2 \SetRowColor{LightBackground} `/*-{}-{}-{}-*/` & commento su più righe \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Istruzione `Break`}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Termina l'esecuzione dell'istruzione contenuto in un loop o nello switch} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.59264 cm} x{3.38436 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Funzione in C}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Definizione}} & contiene 4 sezioni principali \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Tipo di ritorno}} & tipo di dati del valore di ritorno della funzione \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Nome funzione}} & nome che si sceglie \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{Parametri}} & valori di input per la funzione \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{Body}} & il corpo, la raccolta di istruzioni che deve eseguire la funzione \tn % Row Count 11 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Ciclo annidato}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Ciclo che viene eseguito all'interno di un altro ciclo. Il primo loop è chiamato {\bf{outer loop}} e il loop interno è detto {\bf{inner loop}}. Quest'ultimo viene eseguito il numero di volte definito in un ciclo esterno.} \tn % Row Count 5 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.44333 cm} x{3.53367 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Tipi di ciclo}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Cosa sono}} & istruzioni che consentono l'esecuzione di istruzioni o gruppi di istruzioni in modo ripetuto \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} `for` & crea un ciclo iterativo \tn % Row Count 5 (+ 1) % Row 2 \SetRowColor{LightBackground} `while` & mentre avviene l'istruzione continua il programma \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} `do-while` & viene eseguito il corpo dell'istruzione e poi viene valutata \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} {\emph{ciclo annidato}} & ciclo in un altro ciclo \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{File di intestazione}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{File contenente le definizioni e i prototipi delle funzioni utilizzate. Noto anche come {\bf{file di libreria}}.} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Contiene comandi come `printf` e `scanf` e proviene dal file di libreria {\emph{stdio.h}}.} \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Natura ciclica tipi di dati}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Se viene assegnato un valore oltre l'intervallo del tipo di dati, non ci sarà alcun errore del compilatore e il valore cambia secondo un ordine ciclico. Questo vale per i tipi di dati: {\bf{char}}, {\bf{int}}, {\bf{long}}.} \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Non vale per {\bf{float}}, {\bf{double}}, {\bf{long double}}} \tn % Row Count 7 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Funzione prototipo}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Dichiarazione di una funzione con le seguenti informazioni: nome funzione, tipo restituito della funzione, elenco parametri della funzione.} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Esempio}}: `int Sum(int, int);`} \tn % Row Count 4 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.69678 cm} x{4.28022 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Simboli = e ==}} \tn % Row 0 \SetRowColor{LightBackground} `==` & operatore di confronto \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `=` & operatore di assegnazione \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Programmazione modulare}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Basata su più files di codice sorgente, ognuno dei quali dedicato alla risoluzione di un determinato problema.} \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{`Int`}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Il tipo di dati {\bf{int}} è in grado di memorizzare solo valori compresi tra -32768 e 32767.} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.74655 cm} x{4.23045 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Sequenza di escape}} \tn % Row 0 \SetRowColor{LightBackground} `\textbackslash{}n` & nuova riga \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `\textbackslash{}b` & backspace \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `\textbackslash{}t` & tabulazione orizzontale \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Comando `rand()`}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Serve a generare numeri casuali.} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{File ad accesso sequenziale}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{I dati vengono salvati in uno schema sequenziale. Quando si recuperano i dati da tali file, ogni dato viene letto uno alla volta finchè non vengono trovate le informazioni richieste.} \tn % Row Count 4 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Stack}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Struttura dati lineare che funge da raccolta di elementi con 3 operazioni principali: \{\{nl\}\} 1. {\emph{Push}} operazione, che aggiunge un elemento allo stack \{\{nl\}\} 2. {\emph{Pop}} operazione, che rimuove l'elemento aggiunto più di recente che non è stato ancora rimosso \{\{nl\}\} 3. {\emph{Peek}} operazione, che restituisce l'elemento superiore senza modificare lo stack. \{\{nl\}\} Il {\emph{push}} e il {\emph{pop}} avvengono solo ad un'estremità della struttura, denominata {\emph{top}} della stack. L'ordine in cui gli elementi escono da una stack dà origine al suo nome alternativo, {\bf{LIFO}} ( Last-In, First-Out).} \tn % Row Count 12 (+ 12) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Algoritmo}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Successione di istruzioni o passi che definiscono le operazioni da eseguire sui dati per ottenere i risultati.} \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Funzione `Toupper()`}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Viene utilizzata per convertire il valore in maiuscolo quando viene utilizzato con i caratteri.} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Modificatore}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Un prefisso al tipo di dati di base che viene utilizzato per indicare la modifica per l'allocazione dello spazio di archiviazione. \{\{nl\}\} {\bf{Esempio}}: In un processore a 32 bit, lo spazio di archiviazione per il tipo di dati `int` è 4. Quando usiamo il modificatore cambia lo spazio come segue: \{\{nl\}\} {\bf{`Long int`}}: lo spazio di archiviazione è di 8 bit \{\{nl\}\} {\bf{`Short int`}}: lo spazio di archiviazione è di 2 bit} \tn % Row Count 9 (+ 9) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}