C/strlen: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Lethern (dyskusja | edycje)
m Wycofano edycje użytkownika 83.175.158.16 (dyskusja). Autor przywróconej wersji to Pavroo.
Lethern (dyskusja | edycje)
Linia 12:
 
=== Przykład zastosowania ===
<source lang="c">
#include <stdio.h>
#include <string.h>
 
int main()
#include <stdio.h>
{
#include <string.h>
const int max_n= 20;
int main()
char imie[max_n+1];
{
char tab[80]int dl;
 
int dl;
printf("Podaj swoje imie: (max %d znakow)", max_n);
printf scanf("Podaj swoje%s", imie: ");
scanf("%s", tab);
dl= strlen(tabimie);
printf("Twoje imie sklada sie z %d znakow\n", dl);
return 0;
}
</source>