What is a CSV file
CSV is the acronym for comma-separated values (comma separated values), which is usually separated by commas and not limited to commas, and we call him csv.
Look at the following example:
China, Shanghai, Pudong, Zhang San, 200000, 1234567
BMW; GER; 300000; RMB; i530
As can be seen from the above two examples, different separators can be used to separate the data, the data can be of different types, and the length is arbitrary.
A file consisting of multiple lines of CSV Records is called a CSV file (a comma-separated value file). Of course, they must use the same delimiter, the data corresponding to each column should have the same meaning, otherwise the file is meaningless.
CSV files can be opened directly from Excel in Microsoft Office and do not discuss actions under Windows.
C Language programming CSV file processing
Usually the CSV file contains a lot of useful information, and sometimes a large amount of data, a data file will reach the size of 1G, is usually a log and other important information.
There are many ways to deal with CSV files, and it is common to use the scripting languages of Bash, Python, and Perl to work with regular expressions. Here is a way to process a CSV file in the C language.
C language method of processing CSV file (i)