From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15832 invoked by alias); 8 Aug 2008 06:55:46 -0000 Received: (qmail 15824 invoked by uid 22791); 8 Aug 2008 06:55:45 -0000 X-Spam-Check-By: sourceware.org Received: from gamma.dmkhost.com (HELO gamma.dmkhost.com) (67.19.42.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Aug 2008 06:54:54 +0000 Received: from [195.24.248.244] (port=53271 helo=[192.168.1.100]) by gamma.dmkhost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1KRLrr-0001PK-S5; Fri, 08 Aug 2008 08:54:32 +0200 Message-ID: <489BEDB7.2020905@loskot.net> Date: Fri, 08 Aug 2008 07:07:00 -0000 From: Mateusz Loskot User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Rohit Arul Raj CC: gcc-help Subject: Re: odd behavior with Character Arrays References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00068.txt.bz2 Rohit Arul Raj wrote: > 2. Can i get more details as to why if the size of the array is not > provided the compiler does not insert an string terminator at the end > of the array. How could that be? It is an array but not a string literal, so compiler does not append \0 or any other extra elements to it. Best regards -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org