Mercurial > hg > CbC > old > device
view test/cext.c @ 896:d712ee10feb7
local_nptr for locally defined struct
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 06 Apr 2014 19:20:58 +0900 |
parents | a22aabb27786 |
children |
line wrap: on
line source
int printf(const char *format, ...); unsigned int u; static char current_file_dir[1024] ; void f(char *name) { char *s = name; char *q = current_file_dir; printf("#0010:%s and %s\n",s,q); } main() { int i,k; unsigned uk; char c = -3; printf("#0018:char is %ssigned\n", c==256-3? "un":""); for(i=-3;i<4;i++) { k = (char) i; uk = (unsigned char) i; printf("#0023:%d %u\n",k,uk); k = (short) i; uk = (unsigned short) i; printf("#0026:%d %u\n",k,uk); } u = (unsigned) -23432; printf("#0030:%d\n",u/(8048+5)); current_file_dir[0] = 'k'; current_file_dir[1] = 'a'; current_file_dir[2] = 't'; current_file_dir[3] = 'e'; current_file_dir[4] = 0; f("john"); return 0; }