File Handling / Hands On Session VII

1.File Copy

Write a  program to copy from one file to another.

Input and Output Format:
Refer sample input and output for formatting specifications.
All text in bold corresponds to input and the rest corresponds to output.

Sample Input and Output:
Enter the input file name
testInput.txt
Enter the output file name
testOutput.txt



code: 







2.File : Count Character                                                                                                                          

Write a program to count the number of times a character appears in the File. (Case insensitive... 'a' and 'A' are considered to be the same)

Input and Output Format:
Refer sample input and output for formatting specifications.
All text in bold corresponds to input and the rest corresponds to output.

Sample Input and Output:
Enter the file name
test.txt
Enter the character to be counted
r

File 'test.txt' has 99 instances of letter 'r'.



code:




thankyou ....

1 comment:

  1. bro its not working properly final printf statement is not working dono y

    ReplyDelete