Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Pro*C Question - printing varchar

Re: Pro*C Question - printing varchar

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Fri, 15 Oct 2004 08:15:25 -0400
Message-ID: <pan.2004.10.15.12.15.24.123360@sbcglobal.net>


On Thu, 14 Oct 2004 20:11:30 -0400, Kareem Nutt wrote:

> I have the following:
>
> varchar name[21];
> ... select statement puts value into name ...
> ....
> name.arr[name.len] = '\0';
> printf ("name is %s.\n", name.arr);
>
> Example of what I get when I do this I get:
> "name is bob."
>
> What I want is to have all the extra spaces printed out as well:
> "name is bob."
>
> Anyone know how to do this?

/* Are you sure that this is an appropriate forum for the basic C language questions? */

printf("name is %+50s",name.arr);

-- 
Artificial Intelligence is no match for natural stupidity.
Received on Fri Oct 15 2004 - 07:15:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US