A few other things you need to learn before you can make that piece of code work properly.
Every time you are about to allocate dynamic memory (like with malloc), you need to keep in mind two things. First, you need to check that the setting apart of that memory was successful.
char *linep = malloc(sizeof(char) * 1000);
if ( linep == NULL) {
/* if you got here, memory was not successfully allocated */
/* you need to handle the error in a proper way, but you can't */
/* count with that memory */
}
And second. You need to free that memory when you are finished, using it.
These two things are a must, every time you make use of dynamic memory.
As a bonus. I can let you know about a third concept that you need to be aware.
If you reassign a pointer from dynamic memory like
linep = line; (that would have been the correct way of doing
linep = (char *)&line; ), that memory previously allocated is lost for you to use. You don't have a way of getting to it, and it will stay allocated to the program until the program is closed, if the operating system is smart to release it, afterward.
As you can see, if you put that in a loop, you could waste a lot of memory pretty easily.
inputFilePtr = fopen("bubble.txt", "r");
When you want to open a file to work on it or read from it, you need to check that it was successful in doing so. Kind of the same that with malloc(). You computer can not work with that file if it could not open it, can't it?