> 1.Write a program that receives a file name in the command prompt. The file contains words separated by spaces or In line descent.

...

> ptr = fopen("test.txt", "a+");
How does this meet the very first statement of what the program is to do?



So you don't wander off due to lack of focus, try starting with an empty program with your assignment as comments.
Code:
int main ( ) {
    // 1.Write a program that receives a file name in the command prompt.
    //!! Hint: do a search for argc, argv
    
    // The file contains words separated by spaces or In line descent.
    //!! how many words, how long are the words?
    //!! do you have an idea as to how you would store the words?

    //!! before you go on to step 2, try printing out all the words you read, to make sure it's right.
    //!! no point searching for words if your input is broken.

    
    // 2. The program receives from the user a sequence of letters (uppercase or lowercase) 
    // and prints all the lines that contain the sequence The letters.
    
    // 3. If the number N is entered, the program will print a sequence of 5 characters 
    // starting with N characters from the beginning of each line. 
    
    // To the extent And the number of characters greater than the length of the line 
    // will not print anything. If there are no 5 characters left in the same line they will only be printed
    // The characters to the end of the line.
    
    // 4. The program will continue to receive letters or numbers from the user. 
    // The program will exit when an empty string is received.
}
Let's see if you can get past point 1.