Συντονιστής: konnn
(gdb) print dummy->name
$2 = "George", '\000' <repeats 114 times>
(gdb) print list->name
$3 = "\370\203\004\b\020ii\r\000\000\000\000u\203\004\b\356\203\004\b\021ii\r\000\000\000\000u\203\004\b\343\203\004\b\323\257k\005\000\000\000\000\321\202\004\b\333\203\004\bP&y\v\000\000\000\000X\203\004\b", '\000' <repeats 32 times>, "x\321\375\267\365u\256\003", '\000' <repeats 16 times>
Σκοπός αυτού του forum δεν είναι να λύσουμε ασκήσεις. Δεν είναι σωστό να ζητάς "μασημένη" τροφή.
Μπορείς να μας πεις μέχρι που έχεις φτάσει και που έχεις κολλήσει, έτσι ώστε να σε βοηθήσουν αυτοί που γνωρίζουν ώστε να συνεχίσεις.Μπορείς επίσης να δεις τα ασύγχρονα μαθήματα του φόρουμ και να μάθεις κάτι που μπορεί να σου ξεφεύγει.
char *die(char n) {
switch (n) {
case 1:
return " ---\n"
"| |\n"
"| * |\n"
"| |\n"
" \"\"\" ";
case 2:
return " ---\n"
"| *|\n"
"| |\n"
"|* |\n"
" \"\"\" ";
case 3:
return " ---\n"
"| *|\n"
"| * |\n"
"|* |\n"
" \"\"\" ";
case 4:
return " ---\n"
"|* *|\n"
"| |\n"
"|* *|\n"
" \"\"\" ";
case 5:
return " ---\n"
"|* *|\n"
"| * |\n"
"|* *|\n"
" \"\"\" ";
case 6:
return " ---\n"
"|* *|\n"
"|* *|\n"
"|* *|\n"
" \"\"\" ";
}
}
light44 έγραψε:char *die(char n) {
switch (n) {
case 1:
return " ---\n"
"| |\n"
"| * |\n"
"| |\n"
" \"\"\" ";
const char* dice_result1 = " ---\n"
"| |\n"
"| * |\n"
"| |\n"
" \"\"\" ";
printf(dice_result1);
╔═══╗
#include <time.h>
#define NZARIA 2
#define MAX_TIMHZARIOY 6
int main( void )
{
char *die(char n) {
switch (n) {
case 1:
return " ---\n"
"| |\n"
"| * |\n"
"| |\n"
" \"\"\" ";
case 2:
return " ---\n"
"| *|\n"
"| |\n"
"|* |\n"
" \"\"\" ";
case 3:
return " ---\n"
"| *|\n"
"| * |\n"
"|* |\n"
" \"\"\" ";
case 4:
return " ---\n"
"|* *|\n"
"| |\n"
"|* *|\n"
" \"\"\" ";
case 5:
return " ---\n"
"|* *|\n"
"| * |\n"
"|* *|\n"
" \"\"\" ";
case 6:
return " ---\n"
"|* *|\n"
"|* *|\n"
"|* *|\n"
" \"\"\" ";
}
}
const int nzaria = (NZARIA < 1 ? 1 : NZARIA);
int result, zaria[ nzaria ];
srand( time(NULL) );
result =( zaria, nzaria , MAX_TIMHZARIOY);
printf("Ζαριά: %d\n", result);
( zaria, nzaria );
return 0;
void typwse_ksexwrista( const int *zaria, const int nzaria )
{
int i;
for (i=0; i < nzaria; i++)
printf("\tζάρι#%d: %d\n", i+1, zaria[i]);
putchar('\n');
return;
}
int rikse_zaria( int *zaria, const int nzaria, const int maxtimh)
{
int i, sum=0;
for (i=0; i < nzaria; i++) {
zaria[i] = rand() % maxtimh + 1;
sum += zaria[i];
}
return sum;
}
}
light44 έγραψε:
int main( void )
{
char *die(char n) {
switch (n) {