- Κώδικας: Επιλογή όλων
#include <stdio.h>
#include <string.h>
#define MAX_SLEN 100+1
int main( void )
{
char s[MAX_SLEN] = "";
char t[MAX_SLEN] = "";
char yn[MAX_SLEN] = "";
strcpy(s, "12345");
strcpy(t, "678");
printf("s = %s\nt = %s\n\n", s, t);
printf(
"To trexon mhkos toy s=%s einai %d, enw toy t=%s einai %d\n",
s, strlen(s),
t, strlen(t)
);
printf(
"To megisto mhkos toy s=%s einai %d, enw toy t=%s einai %d\n\n",
s, sizeof(s),
t, sizeof(t)
);
if ( strcmp(s,t) < 0 )
strcpy(yn, "Nai");
else
strcpy(yn, "Oxi");
printf("Einai to s=%s mikrotero toy t=%s ? %s\n\n", s, t, yn);
printf("strcat(s,t) = %s\n\n", strcat(s,t) );
printf("s = %s\n\n", s);
printf("pathste ENTER gia termatismo...");
fflush(stdin); getchar();
return 0;
}
Στο τέλος τι σημαίνει αυτό το fflush;
Επίσης ξέρει κανείς καμιά onlne reference για C;


