1
Min Profile Cycles  [215914]
Max Profile Cycles  [934625]
Max Profile         [23]
Max Profile Count   [4]

How to print all these console output into some .txt file in c so that whenever i will call that function it will print in txt file instead of printing in console.

3

2 Answers 2

3

as your tag is C, you can fopen() in append-mode a file and instead of using printf() you use fprintf() (and fwrite() and similar) with this filehandle.

1
  • Basically in my case prinf is disabled due to memory constraint in that case how to print the valyes.
    – sam
    Jun 18, 2015 at 14:38
1

One easy way would be to write something like this in your shell :

$./a.out > hello.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.