[ create a new paste ] login | about

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

C, pasted on May 9:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>

int main()
{
   int i = 1, j =2; 
   float k = 3.0;

   i = (j = 4, k = 9.87);

   printf( "%d %d %f\n", i, j, k );
   printf( "Imprimimos i como float: %f\nComo puedes ver es un error imprimir i como float por que no lo es, es un int.", i );
   return 0;
}


Output:
1
2
3
9 4 9.870000
Imprimimos i como float: 0.000000
Como puedes ver es un error imprimir i como float por que no lo es, es un int.


Create a new paste based on this one


Comments: