473,414 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

how can i cheak if the file empty or not in c language (i have function(FILE* fopenOr

1
how can i cheak if the file empty or not in c language
(i have function(FILE* fopenOrDie(char* name);))
Jun 28 '12 #1
1 2235
weaknessforcats
9,208 Expert Mod 8TB
Seek to the end of the file. If the tell returns zero, your file is empty.

There's no such thing as a "c language file". The file only contains data which you can read only if you know how the file was written in the first place.
Jun 28 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: James | last post by:
Hi, I have a dos program that creates data files which are used in another program that is written by the same company. I am trying to figure out how I can read the data from the data files. ...
3
by: brett | last post by:
I need to pass a hard coded value to a JS file: <script language="JavaScript" src="Tracking.js" type="text/javascript"></script> Neither of these methods work: <script language="JavaScript"...
1
by: Tim Marshall | last post by:
I'm putting together my first help file (using Easy Help, http://www.easyhelp.com/). So far, so good. I'm able to use the Help File and Help Context ID to have things from my help file pop up...
1
by: John Mason | last post by:
Hi, Could someone please help?! I am declaring a global variable in an ascx file... <%@ Control Language="VB" runat="server" %> <%@ import Namespace="System.Data" %> <%@ import...
21
by: Sender | last post by:
I have two questions: (1) I just want to check whether a .txt file is empty or not (without opening it). Like I click on a command button then it should give message EMPTY if is empty and show...
9
by: paczkow | last post by:
Dear Python Community, I am an engineering and I am experiencing some trouble. Having output data from other software I want to use it. To achieve this I decided to use Python since this...
5
by: srikanth | last post by:
is it possible not to decrement the top variable after we remove(or retreive) a file from a stack >MY IDEA is:> if top is not decremented the stack is like it has some files existing in it with...
1
by: nelly12 | last post by:
how do i save my C program output in a file for example for (i = 0; i < number_of_tasks; i++) { INFO2("Sending \"%s\" to \"%s\"", todo->name, ...
13
pradeepjain
by: pradeepjain | last post by:
I have a form .i need this form field labels to be displayed in 3-4 languages . i have the corresponding labels in different languages in a .xml file . i dono how to do the conversions. form is in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.