Re: A interesting problem of C programming

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

 



On Wed, Jun 18, 2008 at 05:52:20PM +0800, Wang Yu wrote:
> Hi, all
> I have the following code:
>     char *p = 0;
>     printf("%s", p);

Using a NULL pointer with %s format isn't portable nor defined. Don't do
that...

-- 
Luciano Rocha <luciano@xxxxxxxxxxx>
Eurotux Informática, S.A. <http://www.eurotux.com/>

Attachment: pgpkznwwJdCRv.pgp
Description: PGP signature


[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