Question: Is there any C program which I can run on a Linux box, and will create a csv file of given dimensions(rows x columns) and store it on hard disk?

Answer: 
If you're looking for an existing utility you're probably on the wrong site, but something like this would print an empty CSV file with double-quoted cells and no header row:

```
for (int i = 0; i < rows; ++i) {
    for (int j = 0; j < cols-1; ++j) {
        printf("\"\",");
    }
    printf("\"\"\n");
}

```

Taking some arbitrary data and turning it into a CSV file is harder. First, what's the input data format? Second, escape the data correctly.
Well I did a search and came up with:
<http://sourceforge.net/projects/libcsv/>

So this is but one example of a "library" for csv handling. It might be worth a look into glib and maybe apr and see if they do have something in there libraries also. Or you can do it "by hand" as suggested here.