[ create a new paste ] login | about

Link: http://codepad.org/c2bbLyd2    [ raw code | output | fork ]

C++, pasted on Nov 21:
1
2
3
4
5
6
7
8
9
10
11
12
void bla( char *text )
{
  printf( "%s", text );
}

int main()
{
  char text[4];
  float f = 1.2;
  sprintf( text, "%.1f", f );
  bla( text );
}


Output:
1
1.2


Create a new paste based on this one


Comments: