All pastes #743615 Raw Edit

Someone

public c v1 · immutable
·published 2007-10-20 16:30 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>struct algo{  int a;  int b;  char c;};struct algo test[5];voiddebug_algo (void){  int i = 0;  for (; i < (sizeof test / sizeof (struct algo)); i++)    {      printf ("algo[%i].a: %i\n", i, test[i].a);      printf ("algo[%i].b: %i\n", i, test[i].b);      printf ("algo[%i].c: '%c'\n", i, test[i].c);    }}int main (){  memset (&test, 0, sizeof (struct algo) * 10);  printf ("sizeof (struct algo): %i\n", sizeof (struct algo));  printf ("sizeof (test): %i\n", sizeof (test));  test[0].a = 1;  test[1].b = 2;  debug_algo ();  return 0;}