Mercurial > hg > CbC > old > device
view test/strinit.c @ 482:8370ba6e8557
*** empty log message ***
author | kono |
---|---|
date | Sun, 11 Dec 2005 23:23:18 +0900 |
parents | 32737bad7489 |
children | a379da780856 |
line wrap: on
line source
#include <stdio.h> int b[3] = {1,2,3}; struct temp { int a; int b; int c; int d; int e; } temp1 = { // 101, // 102, // 103, // 104, // 105, .e = 5, .a = 3 }; struct temp temp3 = { .c = (int)&b, .d = -10, .a = (int)b }; main() { struct temp temp2 = { .c = 5, .e=99 }; printf("#0023:1: %d\n",temp1.a); printf("#0024:1: %d\n",temp1.e); printf("#0025:1: %d\n",temp1.b); printf("#0026:2: %d\n",temp2.c); printf("#0027:2: %d\n",temp2.e); printf("#0028:2: %d\n",temp2.b); printf("#0028:2: %d\n",(void*)temp3.c==b); printf("#0028:2: %d\n",temp3.c==(int)b); printf("#0028:2: %d\n",temp3.a==(int)&b); return 0; }