7.3 ASCII Code

7.3 ASCII Code

  1. [3] Print the Character Variable as a Character and ASCII Code Value.

  2. [4] Print all the Digits with their ASCII Code Value separated by a space, and each digit in a separate line.

  3. [5] Print all the Uppercase Letters with their ASCII Code Values separated by a space, and each letter in a separate line.

  4. [6] Print all the Lowercase Letters with their ASCII Code Values separated by a space, and each letter in a separate line.

  5. [7] Print all the ASCII Characters with their ASCII Code Values.

  6. [8] Input a Character and Print that character and its ASCII Code.

সমাধান

[3] Print the Character Variable as a Character and ASCII Code Value.

#include<stdio.h>
int main(){
    char ch = 'A';
    
    printf("Character: %c\n", ch);
    printf("ASCII Code: %d\n", ch);
    
    return 0;
}

[4] Print all the Digits with their ASCII Code Value separated by a space, and each digit in a separate line.

[5] Print all the Uppercase Letters with their ASCII Code Values separated by a space, and each letter in a separate line.

[6] Print all the Lowercase Letters with their ASCII Code Values separated by a space, and each letter in a separate line.

[7] Print all the ASCII Characters with their ASCII Code Values.

[8] Input a Character and Print its ASCII Code.

Last updated