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: Yong Huang <yong321_at_yahoo.com>
Date: 15 Oct 2004 07:36:40 -0700
Message-ID: <b3cb12d6.0410150636.2a51dd28@posting.google.com>


Kareem Nutt <methodmano_at_gmail.com> wrote in message news:<WOqdnTK_P-APi_LcRVn-3Q_at_comcast.com>...
> 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?

Maybe change %s to %21s?

Yong Huang Received on Fri Oct 15 2004 - 09:36:40 CDT

Original text of this message

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