linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Milind A Choudhary <milindchoudhary.lkml@gmail.com>
To: Glynn Clements <glynn@gclements.plus.com>
Cc: kumar11 <ravikumar.chakram@gmail.com>,
	linux-c-programming@vger.kernel.org
Subject: Re: Function pointers
Date: Sat, 23 Jan 2010 17:27:38 -0500	[thread overview]
Message-ID: <70016fb31001231427n225eb4f6i5c78da6f9223cf01@mail.gmail.com> (raw)
In-Reply-To: <19288.9425.111644.585101@cerise.gclements.plus.com>

On Thu, Jan 21, 2010 at 4:56 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:
>
> kumar11 wrote:
>
>> Could you please explain the meaning of below declaration statement.
>>
>> char (*pa())[4];
>
> "pa" is a function returning a pointer to an array of four characters.
>

You already have got the required answer from others.
C and function pointers can always be confusing. At times you think
you have understood it throughly and but still not be able to decode some
more complex declarations. (cdec can come to help but not always..at least not
in a technical interview ) The best approach that I have come across is
the `Clockwise Spiral` rule. (link :
http://www.c-faq.com/decl/spiral.anderson.html )

Hope this helps..

Thanks & Regards
Milind A Choudhary
http://www.csl.mtu.edu/~machoudh/

-- 
Milind  Arun Choudhary

  reply	other threads:[~2010-01-23 22:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21  6:33 Function pointers kumar11
2010-01-21  6:57 ` saravanaraj v
2010-01-21  9:56 ` Glynn Clements
2010-01-23 22:27   ` Milind A Choudhary [this message]
     [not found]     ` <201001241003091879376@gmail.com>
2010-01-24  7:59       ` Re: " Glynn Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70016fb31001231427n225eb4f6i5c78da6f9223cf01@mail.gmail.com \
    --to=milindchoudhary.lkml@gmail.com \
    --cc=glynn@gclements.plus.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=ravikumar.chakram@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).