hi
i am answer this question ,
but i didnt know what the errore with cast
represent uppercase letters,
lowercase letters and a considerable variety of special symbols. C++ uses small integers internally to represent each different character.
The set of characters a computer uses and the corresponding integer representations for those characters is called that computer’s
character set. You can print a character by simply enclosing that character in single quotes as with
'A';
You can print the integer equivalent of a character using static_cast as follows:
static_cast< int >( 'A' );
This is called a cast operation. When the preceding statement executes, it prints the
value 65 (on systems that use the ASCII character set). Write a program that prints the integer equivalents of some uppercase letters,
lowercase letters, digits and special symbols.At a minimum, determine the integer equivalents of the following: A B C a b
c 0 1 2 $ * + / and the blank character.
/**
import java.util.Scanner;
public class letter {
public static void main(String[] args) {
Scanner.input=new Scanner(System.in);
char symbol;
System.out.println("Enter a character:");
symbol=input.nextInt();
System.out.println("Enter a character:");
System.out.println(symbol);
printf("%d , equal to %d ", symbol, static_cast< int > ( symbol ))
}
}