Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Please help me with this in C.....
I'm trying to write random integers to another file ..
I just don't get it work....
I'm new at this....
So what's wrong here......."maybee everything"..?
I'd be very grateful for help.
int i = 0;
int t = 0;
pts = &numbers;
for ( t = 0; t < 100; t++)
numbers[t] = rand() % 255;
if ((fp=fopen("c:\test.txt", "w+")) == NULL)
fprintf(stderr, "can't open file....!
for (i = 0 ; i < 100; i++);
fprintf(fp, "%d", numbers[t]);
0 · ·