How do you redirect a standard stream?
Answer / Anurag Singh Gautam
In C, you can redirect standard streams (like stdout or stderr) by assigning a pointer to a different output stream. For example, to redirect stdout to a file called 'output.txt', you would use: <pre>nfreopen("output.txt", "w", stdout);n</pre> This code opens the file in write mode and sets it as the new destination for stdout.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the basic structure of c?
identify the in correct expression a.a=b=3=4; b.a=b=c=d=0; float a=int b=3.5; d.int a; float b; a=b=3.5;
How many types of operator or there in c?
What is pointer in c?
What is that continue statement??
what is a constant pointer in C
what is bit rate & baud rate? plz give wave forms
How do we print only part of a string in c?
What will the preprocessor do for a program?
int main() { int x = (2,3,4); int y = 9,10,11; printf("%d %d",x,y); } what would be the output?
differnce between do and do while
Tell me when is a void pointer used?