int file = open("test.txt", "r"); // Open in read mode int n = countln(file); // Get the number of lines for(int i=0; i