The following question assume the file test contains comma-delimited digits on separate
lines as follows:
Thus each line contains a list of single digits separated by comma.
Write a program that validates a sequence of digits in the CSV format (given above) i.e. each
line of the input text of the program contains comma-separated list of digits. The output value
1 indicates that the input text file is valid and the output value 0 indicates that the input text
file is invalid. You must use C programming language and the corresponding source code
must be in the file p1.c.
For example:
$p1 < test