- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to print float type data like this.
-----------------------
#include <stdio.h>
float data=0.123;
printf("%f",data);
----------------------
but, it shows empty in console display. No syntax ,build error before Run.
i tried %e , %g and it also showed same results.
for integer type, it works. so i don't know how to solve.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I executed that on Nios ii SW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May I understand what computer program are you trying to run this code in? Thanks.
-Hazlina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just saw your other post saying that you are trying to run this in Nios tool.
Ignore my question.
I will assign this to Nios engineer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you try printf("%.3f",data);

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page