May 6, 2026
Breaking News
  • What is Structural Analysis? Basics Every Civil Student...
  • Thermodynamics Laws Explained Simply with Real-Life Examples
  • Ohm’s Law, Kirchhoff’s Laws & Circuit Analysis for...
  • Data Structures Explained: Arrays, Linked Lists, Trees &...
Topic Nest Topic Nest
Nav
Nav
Topic Nest

Explore.Learn.Share

Basics of Structural Analysis in Civil Engineering
Civil Engineering April 7, 2026

What is Structural Analysis? Basics Every

thermodynamics laws explained simply
Mechanical Engineering April 3, 2026

Thermodynamics Laws Explained Simply with Real-Life

Ohm's Law Kirchhoff's Laws circuit analysis
Electronics & Electrical April 2, 2026

Ohm’s Law, Kirchhoff’s Laws & Circuit

Data Structures
C and C++ Data Structures April 2, 2026

Data Structures Explained: Arrays, Linked Lists,

  • Blog
  • Checkout
  • Home
  1. Home
  2. C and C++
  3. Write a program to open a file using fopen()
C and C++

Write a program to open a file using fopen()

  • BY Team Topic Nest
  • March 24, 2023
  • 0 Comments
  • 71 Views
#include<stdio.h>

 void main()
{
fopen()
file *fp;
fp=fopen(“student.DAT”, “r”);
if(fp==NULL)
{
printf(“The file could not be open”);
exit(0);
}
Previous

program to find the largest of n numbers and its location in an array

Next

Write a C program to read name and marks of n number of students from user and store them in a file. If the file previously exits, add the information of n students

You may also like

C and C++

C program that creates a child process to read commands from the standard input

  • Team Topic Nest
  • October 11, 2019
C and C++

C program that accepts a valid directory names as a command line argument and lists all the files in the given directory as well as all the subsequent sub directories

  • Team Topic Nest
  • October 11, 2019

Search

Categories

C and C++(271)
Civil Engineering(1)
Cloud Computing(25)
Compiler Design(8)
Computer Graphics(166)
Computer Security(2)
Creative(1)
Data Structures(90)
Education(3)
Electronics & Electrical(1)
Essay(1)
Food(2)
Health(2)
Kannada(1)
Mechanical Engineering(1)
Meditation & Mindfulness(1)
Natural Remedies(1)
OS(282)
Php(26)
Physics(1)
Preventive Care(1)
Shell Script(3)
Study Abroad(3)
Uncategorized(1)

Blog Posts

Basics of Structural Analysis in Civil Engineering
Civil Engineering April 7, 2026

What is Structural Analysis? Basics Every Civil Student Must Know

thermodynamics laws explained simply
Mechanical Engineering April 3, 2026

Thermodynamics Laws Explained Simply with Real-Life Examples

Ohm's Law Kirchhoff's Laws circuit analysis
Electronics & Electrical April 2, 2026

Ohm’s Law, Kirchhoff’s Laws & Circuit Analysis for Beginners

Data Structures
C and C++ Data Structures April 2, 2026

Data Structures Explained: Arrays, Linked Lists, Trees & Graphs

© 2025 Topic Nest | All Rights Reserved