Q.Write a java program to display ASCII values of the characters from a file.[15 M]
import java.io.*;
class ASCIIFile
{
public static void main(String args[]) throws IOException
{
FileReader fr = new FileReader("input.txt");
int ch;
System.out.println("Character\tASCII Value");
while((ch = fr.read()) != -1)
{
char c = (char) ch;
System.out.println(c + "\t\t" + ch);
}
fr.close();
}
}
