Skip to content

Imran-2022/CD_lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Write a C/C++ program that reads text from a file and prints on the terminal each input line, preceded by the line number. The output will look like -

  • 1  This is the first trial line in the file,
  • 2  and this is the second line.

2. Write a C/C++ program that reads text from a file, then count and prints the number of line exist in the inputted text file.

3. Write a C/C++ program that reads text from a file, then delete the existing comment and save the output text file (without comment). Also count and print the number of deletion.

4. Write a C/C++ program to identify whether a given input line is a comment or not.

5. Write a C/C++ program that reads text from a file, then delete the existing tabs (spaces) and new line and save the output text file. Also count and print the number of deletion.

6. Write a C/C++ program to test whether a given identifier is valid or not.

7. Write a C/C++ program that reads text from a file and prints on the terminal each input line, preceded by the line number. The output will look like -

  • 1  This is the first trial line in the file,
  • 2  and this is the second line.

8. Write a C/C++ program that reads text from a file, then count and prints the number of character exist in the inputted text file.

Releases

No releases published

Packages

No packages published

Languages