18.08.2013 Views

Fondamenti di Informatica - Linguaggio C Le funzioni - Robotica

Fondamenti di Informatica - Linguaggio C Le funzioni - Robotica

Fondamenti di Informatica - Linguaggio C Le funzioni - Robotica

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introduzione Dichiarazione e definizione I parametri Funzione main Car. avanzate<br />

Passaggio per riferimento<br />

Passaggio <strong>di</strong> stringhe<br />

anche per le stringhe, in quanto vettori <strong>di</strong> char, viene passato il<br />

puntatore<br />

int func(char *st);<br />

/* ... */<br />

int stringa[50];<br />

/* ... */<br />

func(stringa);<br />

non è in<strong>di</strong>spensabile la <strong>di</strong>mensione, poiché il numero <strong>di</strong><br />

caratteri significativi è terminato da ’\0’<br />

se però si tratta <strong>di</strong> un vettore <strong>di</strong> char che non contiene una<br />

stringa, allora la <strong>di</strong>mensione è necessaria<br />

Tullio Facchinetti <strong>Fondamenti</strong> <strong>di</strong> <strong>Informatica</strong> - <strong>Linguaggio</strong> C <strong>Le</strong> f

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!