Question about PC Desktops

1 Answer

I want to align printf()'s text in center. - PC Desktops

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points


    An expert who has answered 20 questions.


    An expert that hasĀ over 10 points.


    An expert whose answer gotĀ voted for 2 times.

  • Expert
  • 55 Answers

Printf("Color %s, number1 %d, number2 %05d, hex %x, float %5.2f, unsigned value %u.\n",
"red", 123456, 89, 255, 3.14, 250);
will print the following line (including new-line character, \n):
Color red, number1 123456, number2 00089, hex ff, float 3.14, unsigned value 250.

The printf function returns the number of characters printed, or a negative value if an output error occurs.

for further inf u can see.

Posted on Nov 26, 2008

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

Solve for the factorial of a given number. The factorial of n is 1*2*3

If you're a programmer and you wanted to solve this for any number N, I'd do it recursively.Maybe something like this (in C):


int factorial(int n){
if(n == 1){
return 1;
} else if(n == 0){
return 0;
} else {
return n * factorial(n-1);

int main(int argc, char** argv) {

int n = 0;

printf("Enter a number:\n");
scanf("%d", &n);

int fact_Of_N = factorial(n);

printf("\n%d factorial = %d\n", n, fact_Of_N);

return (EXIT_SUCCESS);

Jul 28, 2011 | PC Desktops


Rotating Text in Cells

In Excel, text of cells can be rotated to any direction or to a certain angle. It is called the orientation of the text. By default, orientation of text is horizontal.
To change the orientation of text, follow these steps.
  • Select cell or range of cells that contains data you want to rotate.
  • Select ”Cells” command from “Format” menu OR Press Ctrl+1, Format Cells dialog box appears.
  • Click Alignment tab of dialog box.
  • Specify angle in ”Degrees” spin box of orientation section.
  • Click “OK” button of dialog box.

on Jan 29, 2010 | PC Desktops

1 Answer

On my PCR-T2000 I am trying to setup the Business name on the receipt but I can't seem to center it. How do I center text on the receipt?

Hi. You just add spaces in front of the text on that line
If anyone needs a Casio PCR-T2000 manual, c-tech collective has an operating and programming manual here:

Sep 21, 2010 | Casio Parts Cash Register PC Desktop

2 Answers

I want to attach my name and a small animation in my Yahoo email. I cannot seem to be able to do this. Thanks.

Open yahoo>go to the top right side of yahoo mail>click on options>select mail options and then go to the left side and select Signature.

Mar 27, 2009 | PC Desktops

2 Answers

Web Page Alignment is on Left Margin, no pictures displayed download this macromeadia flash player and install that would solve your problem. rate me if it works for you

Jan 02, 2009 | Dell Dimension 5100 (D51L1) PC Desktop

1 Answer

Only the photographs and color text are giving me problems all of a sudden. The colors are shadowing each other and are not precisely aligned.

It would be useful to know what you are looking at??  We know that you know but we don't.
Little stuff like what kind of machine? Brand? Model? Are you looking at:
A printout? Use the maintenance utility for aligning new cartridges or printhead 
A monitor? If it's a CRT monitor, move your speakers away from it. 

Dec 16, 2008 | HP PC Desktops

1 Answer

How can we write 2 or 3 lines in one cell in ms-excel

select cell then click Format > Cells > Alignment then check Wrap Text

Nov 26, 2008 | PC Desktops

Not finding what you are looking for?
PC Desktops Logo

Related Topics:

79 people viewed this question

Ask a Question

Usually answered in minutes!

Top PC Desktops Experts


Level 3 Expert

5660 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Are you a PC Desktop Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides