IndiaBIX
IndiaBIX
Start typing & press "Enter" or "ESC" to close
  • Home
  • Jobs
  • Results
  • Current Affairs
  • GK
  • Online Test
  • HR Interview
  • BLOG

What is the purpose of "rb" in fopen() function used below in the code? FILE *fp; fp = fopen("source.txt", "rb");

  • Home
  • Computer Science & Engineering
  • C Programming Questions and Answers
  • Input / Output
  • Discuss - 728
1. 

What is the purpose of "rb" in fopen() function used below in the code?

FILE *fp;
fp = fopen("source.txt", "rb");
[A]. open "source.txt" in binary mode for reading
[B]. open "source.txt" in binary mode for reading and writing
[C]. Create a new file "source.txt" for reading and writing
[D]. None of above

Answer: Option A

Explanation:

The file source.txt will be opened in the binary mode.

Workspace Report
Leave a Comment

Computer Science & Engineering :: C Programming Questions and Answers : More Exercises

  • Declarations and Initializations
  • Expressions
  • Functions
  • Pointers
  • Strings
  • Input / Output
  • Bitwise Operators
  • Const
  • Variable Number of Arguments
  • Library Functions
  • Control Instructions
  • Floating Point Issues
  • C Preprocessor
  • Arrays
  • Structures, Unions, Enums
  • Command Line Arguments
  • Typedef
  • Memory Allocation
  • Complicated Declarations

Questions & Answers

Aptitude Chemical Engineering Civil Engineering Computer Science & Engineering Current Affairs Data Interpretation Electrical & Electronics Engineering Electronics & Communication Engineering General Knowledge Logical Reasoning Mechanical Engineering Non Verbal Reasoning Verbal Ability Verbal Reasoning

Interviews

HR Interview

Jobs

Sarkari Jobs

Results

Rojgar ResultSarkari Result

Admission

Admission 2023

Admit Card

Admit Card 2023

Answer Key

Answer Key 2023
copyright
Privacy Policy
© 2026 IndiaBIX. All Rights Reserved.

Report