daily pastebin goal
71%
SHARE
TWEET

Initializers

a guest Oct 9th, 2011 35 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stdio.h"
  2.  
  3. typedef char fred[4][8];
  4.  
  5. int main(int argc, char **argv) {
  6. fred a = { [0 ... 3]={ [0 ... 7]='x' } };
  7. int i, j;
  8.  
  9.         for (i=0;i<4;i++) {
  10.                 printf("Row %d: ", i);
  11.                 for (j=0;j<8;j++)
  12.                         printf ("<%c>", a[i][j]);
  13.                 printf("\n");
  14.         }
  15.  
  16.         return 0;
  17. }
  18.  
  19.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top