What does the characters “r” and “w” mean when writing programs that will make use of files?



What does the characters “r” and “w” mean when writing programs that will ma..

Answer / Ravit Kumar

In C, 'r' stands for read mode, which allows a program to open a file only for reading. 'w' stands for write mode, which allows a program to open a file only for writing. If a file with the same name already exists in write mode, its content will be erased.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?

4 Answers  


What are the advantages of using linked list for tree construction?

1 Answers  


How do you write a program which produces its own source code as output?

1 Answers  


What is the difference between %d and %*d in C

3 Answers  


Consider a language that does not have arrays but does have stacks as a data type.and PUSH POP..are all defined .Show how a one dimensional array can be implemented by using two stacks.

3 Answers   Google,


How to create struct variables?

1 Answers  


write a program in c language that uses function to locate and return the smallest and largest integers in an array,number and their position in the array. it should also find and return the range of the numbers , that is , the difference between the largest number and the smallest.

1 Answers  


Why functions are used in c?

1 Answers  


Explain how can you restore a redirected standard stream?

1 Answers  


What is the output of following program ? int main() { int x = 5; printf("%d %d %d\n", x, x << 2, x >> 2); }

5 Answers   Amazon, Qualcomm,


Write a program to reverse a given number in c language?

1 Answers  


#include<stdio.h> void main() { int a,b,c; a=b=c=1; c=++a || ++b && ++c; printf("%d\t%d\t%d",a,b,c); }

3 Answers  


Categories