You are here:

C/out put data of C programme to be printed in destination file

Advertisement


Question
the continuos data which is measured from given input to the device converts the digital output with a interval of 10microseconds. this data of C programme to be printed in destination file so that that can be analysed latter

Answer
If you want to do this inside a program, do this:
1. Open the o/p file in read/append mode.
2. use fprintf() instead of printf() while writing the o/p.
3. Close the o/p file before exiting.

If you want to do this in a shell, do this:
a.out > output.txt

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Narendra

Expertise

I can answer questions in C related to programming, data structures, pointers and file manipulation. I use Solaris for doing C code and if you have questions related to C programming on Solaris, I will be able to help better.

Experience

6.5

Organizations belong to
Sun Microsystems

Awards and Honors
Brain Bench Certified Expert C programmer.
Advanced System Software Certified

©2012 About.com, a part of The New York Times Company. All rights reserved.