Dodajesz do kompilatora (dla gcc) przełączniki:
-Wall -Wextra -pedantic
minus Wu All minus Wu extra mius pedantic
.. i kompilujesz program. Kompilator wyświetla co następuje:
#1 with x86-64 gcc 8.2
<source>: In function 'main':
<source>:10:13: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int (*)[255]' [-Wformat=]
scanf("%s",&ciag);
~^ ~~~~~
<source>:15:17: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int *' [-Wformat=]
printf("%g %s %d",srednia,ciag,suma);
~^ ~~~~
%ls
<source>:16:5: warning: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
getch();
^~~~~
getc
Teraz (jeśli masz kłopoty ze zrozumieniem) wrzucasz to do translacji google.. a ona tłumaczy na:
# 1 z x86-64 gcc 8.2
<source>: W funkcji "main":
<source>: 10: 13: warning: format '% s' oczekuje argumentu typu 'char *', ale argument 2 ma typ 'int (*) [255]' [-Wformat =]
scanf ("% s", & ciag);
~ ^ ~~~~~
<source>: 15: 17: warning: format '% s' oczekuje argumentu typu 'char *', ale argument 3 ma typ 'int *' [-Wformat =]
printf ("% g% s% d", srednia, ciag, suma);
~ ^ ~~~~
% ls
<źródło>: 16: 5: ostrzeżenie: domniemana deklaracja funkcji "getch"; miałeś na myśli "getc"? [-Wimplicit-function-declaration]
getch ();
^ ~~~~
getc
Gratuluję! Już zrozumiałeś :)