I see! It makes sense now.
Gracias!
Type: Posts; User: SergeP
I see! It makes sense now.
Gracias!
scanf? How is it related to sprintf?
Sorry, I forgot that.
So can you answer me now?
After running the following code 6 times and for different values of number, I get :
number = 908
str = 908.000000
check = 10
number = 98.7
str = 98.699997
check = 9
Does this mean fgets() does not initially include the NULL character?
Wow, thanks.
That does it.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char name[25];
char surname[25];
File* F = fopen("string test.txt","w");
Wow, thanks so much.
I've found a function fprintf(), it actually writes to a file and formats too.
Thanks too for pointing the stuff about binary... I understood this now. ������
Is it...
Thanks ma'am. And is there a way to actually write the text (not the binary representation) i.e an alternative to fwrite?
I am writing a structure to a file. Program compiled and executes successfully. In file, I get strange spaces and some character(not even on keyboard), including the structure.. Meanwhile when I read...