Re: Constant declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I guess they are not same.
1) const char *p="hello"; // non constant pointer, constant data
2) char const *p="hello"; // constant pointer, non constant data

What say ?

-Gaurav

On 10/12/05, Fawad Lateef <fawadlateef@xxxxxxxxx> wrote:
> On 10/12/05, gaurav sharma <togsharma@xxxxxxxxx> wrote:
> > Is there any difference in
> > const char *p="hello";
> > and
> > char const *p="hello";
> >
> > are they both same ?I doubt.
> >
>
> Yes they are same .....
>
> --
> Fawad Lateef
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux