Explain what is output redirection?



Explain what is output redirection?..

Answer / Ravindra Kumar Tiwari

Output redirection in C refers to the process of redirecting the standard output (usually printed on the console) to a file instead of the terminal. This can be achieved using the function freopen(filename, mode, stream_pointer), where the 'mode' parameter specifies the type of output ('w' for write or 'a' for append).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is Bitwise Operator and how it works?

1 Answers  


write a pgm to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1

3 Answers  


Is the following code legal? struct a { int x; struct a b; }

4 Answers  


Can you define which header file to include at compile time?

1 Answers   Aspire, Infogain,


How can I pad a string to a known length?

1 Answers  


read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the vlaue after executing this code? a.200 b.1 c.-1 d.50

4 Answers   TCS,


what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel

1 Answers   V2 Solutions,


study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)++; printf("a=%dn(*p)=%dn",a,*p); } What is printed? A)100,101 B)100,100 C)101,101 D)None of the above

15 Answers   Accenture, TCS,


Why c is a mother language?

1 Answers  


WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?

6 Answers   Finite Infotech, Lovely Professional University, Wipro,


Why ca not I do something like this?

1 Answers  


What are file streams?

1 Answers  


Categories