answersLogoWhite

0

files are just streams of bytes. So IO functions are the way to go. If you want to read an integer from a file, you have to first read it as a string of characters and then convert it. If you are saving data to a file, it might help to use a character as a delimiter. For example, use the comma and the file might look like:

123,45,6,7,23,2456

Then read each character, separating the integers by finding all the commas as you go.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Q2 Differentiate between formatted and unformatted you input and output functions?

Formatted I/P functions: These functions allow us to supply the input in a fixed format and let us obtain the output in the specified form. Formatted output converts the internal binary representation of the data to ASCII characters which are written to the output file. Formatted input reads characters from the input file and converts them to internal form. Format specifications Data type Integer short signed short unsigned long signed long unsigned unsigned hexadecimal unsigned octal %d or %l %u %ld %lu %x %o Real float double %f %lf Character signed character unsigned character %c %c String %s Unformatted I/O functions: There are several standard library functions available under this category-those that can deal with a string of characters. Unformatted Input/Output is the most basic form of input/output. Unformatted input/output transfers the internal binary representation of the data directly between memory and the file


What as an integers?

Integers are whole numbers without fractions or decimals


What is the definion of integers?

Integers are whole numbers without decimals or fractions.


How do you figure integers?

Integers are whole numbers without decimals or fractions.


What is a table formatted without lines called?

A table formatted without lines is called a borderless table. It does not have visible borders separating rows and columns, providing a cleaner and more modern design aesthetic.


What called integers?

Whole numbers without decimals or fractions are called integers.


What is integers inmath?

Integers are whole numbers without decimals or fractions attached to them


Is integers whole numbers and their opposites?

Integers are whole numbers without decimals or fractions.


How do you format the Nokia mobile without password?

How i can formatted nokia x201 phone


How is adding integers similar to adding whole numbers?

Integers include 0, the negative numbers without fractional parts, and the positive numbers without fractional parts. The "without fractional parts" part of the description implies that all of the integers are whole numbers. Therefore, if you are adding integers, you are adding whole numbers.


Differentiate between formatted and informatted function in c with example?

In C, formatted functions (like printf and scanf) are used for input and output with specific formatting options, allowing you to control how data is displayed or read. For example, printf("%d", num); prints an integer with no additional formatting, while scanf("%d", &num); reads an integer from user input. In contrast, informatted functions (like puts and gets) handle strings without special formatting, directly outputting or reading data. For example, puts("Hello, World!"); simply prints the string without formatting options.


Why is integers useful?

Integers are whole numbers without decimals or fractions which are useful because calculations are easier to work out.