Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #43171

Re: coding dynamic allocation question

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c
Subject Re: coding dynamic allocation question
Date Sun, 20 Apr 2014 23:24:06 +1200
Lines 21
Message-ID <brhp2mF43uvU5@mid.individual.net> (permalink)
References <lismqq$dbh$1@dont-email.me> <87mwfhcthd.fsf@gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net fN7sIskeUZ4Y3C21+sHSAAHbBsgp6lM7+4NZ6/q4UJUzmsIzDe
Cancel-Lock sha1:cggmHT4H4XYwOLlXKd8uPZiOJUQ=
User-Agent Mozilla/5.0 (X11; SunOS i86pc; rv:17.0) Gecko/17.0 Thunderbird/17.0
In-Reply-To <87mwfhcthd.fsf@gmail.com>
Xref csiph.com comp.lang.c:43171

Show key headers only | View raw


Richard wrote:
> "Bill Cunningham" <nospam@nspam.invalid> writes:
>
>>      I guess these two statements are not the same. Why not? I guess I
>> haven't learned this I haven't used it much.
>>
>> int *p;
>> p=malloc(sizeof (int)); //seems to be in error
>> p=malloc(sizeof (int *)); //is the correct coding
>>
>>      What exactly is the difference?
>>
>> Bill
>>
>
> 8/10

That's over generous, I'd only go to a 7.

-- 
Ian Collins

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-18 22:25 -0400
  Re: coding dynamic allocation question Malcolm McLean <malcolm.mclean5@btinternet.com> - 2014-04-19 04:06 -0700
    Re: coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-19 19:04 -0400
      Re: coding dynamic allocation question Barry Schwarz <schwarzb@dqel.com> - 2014-04-19 16:52 -0700
      Re: coding dynamic allocation question Keith Thompson <kst-u@mib.org> - 2014-04-19 17:36 -0700
        Re: coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-19 20:47 -0400
          Re: coding dynamic allocation question Keith Thompson <kst-u@mib.org> - 2014-04-19 18:55 -0700
            Re: coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-19 21:59 -0400
              Re: coding dynamic allocation question Keith Thompson <kst-u@mib.org> - 2014-04-19 19:19 -0700
                Re: coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-19 22:47 -0400
                Re: coding dynamic allocation question Keith Thompson <kst-u@mib.org> - 2014-04-19 20:18 -0700
              Re: coding dynamic allocation question Richard <rgrdev_@gmail.com> - 2014-04-20 11:00 +0100
      Re: coding dynamic allocation question rescattered@gmail.com - 2014-04-20 05:25 -0700
        Re: coding dynamic allocation question rescattered@gmail.com - 2014-04-20 05:42 -0700
  Re: coding dynamic allocation question Richard <rgrdev_@gmail.com> - 2014-04-19 14:57 +0100
    Re: coding dynamic allocation question Ian Collins <ian-news@hotmail.com> - 2014-04-20 23:24 +1200
  Re: coding dynamic allocation question Michael Angelo Ravera <maravera@prodigy.net> - 2014-04-19 16:19 -0700

csiph-web