From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aniruddha Bhattacharyya Subject: Re: printf *%f Date: Wed, 12 Jan 2011 15:24:09 +0530 Message-ID: References: Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:cc:content-type:content-transfer-encoding; bh=YJ+T3JTq+SOByfJWdVCwxrL7edjAuUAPIe4aZQzqYvw=; b=ADC/MfEiD+09aWu3lHQSArqxlJ5PVcIFVgCIZFP7lgu5jNXM+U194mIin2uj8VPxOY uvXaKNQetiJCXgvB21A/3KY8k7KgZa+D6I9cW7yedqn3QKTcsEmaR1DJM1PQCbLSkN1P +12Of0Z8c77PAvHaLEw1gquTHFD4rI4A6d/No= In-Reply-To: Sender: linux-c-programming-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: Cc: linux-c-programming@vger.kernel.org Ref: http://www.cplusplus.com/reference/clibrary/cstdio/printf/ On Wed, Jan 12, 2011 at 3:23 PM, Aniruddha Bhattacharyya wrote: > Use "%.*f" for Float =A0 =A0(its ".*" not "*") > and "%*d" for int > > On Wed, Jan 12, 2011 at 3:22 PM, Aniruddha Bhattacharyya > wrote: >> >> >> Use "%.*f" for Float =A0 =A0(its ".*" not "*") >> and "%*d" for int >> >> Ref:=A0http://www.cplusplus.com/reference/clibrary/cstdio/printf/ >> >> On Wed, Jan 12, 2011 at 2:44 PM, ratheesh k = wrote: >>> >>> On Wed, Jan 12, 2011 at 2:32 PM, Bert Wesarg wrote: >>> > On Wed, Jan 12, 2011 at 09:59, Fei Zhao wro= te: >>> >> I mean's that when to use=A0printf("%*.*f" , 4, 2 , x) ; in linu= x kernel or >>> >> our practical use? >>> >>> If you want to control the format dynamically. >>> scanf("%d" , &first); >>> scanf("%d" , %second); >>> printf("%*.*f", first ,second , x); >>> >>> > I don't know when you want to use such calls, how should I? And w= hat >>> > has the linux kernel to do with this, this doesn't came up before= , and >>> > what is '*our* practical use'? >>> > >>> > Bert >>> > -- >>> > To unsubscribe from this list: send the line "unsubscribe linux-c= -programming" in >>> > the body of a message to majordomo@vger.kernel.org >>> > More majordomo info at =A0http://vger.kernel.org/majordomo-info.h= tml >>> > >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-c-p= rogramming" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.htm= l >> > -- To unsubscribe from this list: send the line "unsubscribe linux-c-progr= amming" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html