Вопрос

When I run this program in the Nios 2 simulator I get the expected output (1.000000).

#include <stdio.h>
int main ()
{
  float  n=0; 
  printf("%f\n", ++n);
  return 0;
}

But when I run the program on the board it doesn't output anything at all in the IDE console. Where does output go? Isn't output supposed to display in the IDE console?

Это было полезно?

Решение

Declare n as

float  n=0.0f;  

it will work.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top