Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!ulysses!allegra!mit-eddie!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.UUCP Newsgroups: comp.lang.c Subject: Re: Question about type casting Message-ID: <7041@brl-smoke.ARPA> Date: 11 Jan 88 23:39:51 GMT References: <5080009@hpfcdc.HP.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 Posted: Mon Jan 11 18:39:51 1988 In article <5080009@hpfcdc.HP.COM> boemker@hpfcdc.HP.COM (Tim Boemker) writes: -What's wrong with this program? -main() -{ - int *i; - ((int [1]) i) [0] = 1; -} How can you turn a pointer into an array? It makes no sense. Just use i[0] = 1; which is the same as *i = 1;.