C Programming
- Print integer
- Add & subtract
- Odd & even
- Multiply & divide
- Check vowels
- Letter grade program
- Leap year program
- Sum of digits
- Prime numbers
- Sum of numbers
- Find factorial
- Fibonacci series
- Fibonacci triangle
- Number triangle
- Alphabet triangle
- Armstrong numbers
- Palindrome numbers
- Swap number
- Reverse number
- Decimal to binary
- Assembly code in C
- Matrix multiplication
- HCF & LCM
- nCr & nPr
- Print pattern
- Floyd’s triangle
- Pascal triangle
- Count digits
- Strong numbers
- Perfect numbers
- Sum of natural number
- Binary to decimal
- Decimal to octal
- Octal to decimal
- Binary to octal
- Octal to binary
- Add using pointer
- Bubble sort
- Insertion sort
- Selection sort
- Quick sort
- Binary search
- Linear search
- Largest element of array
- Smallest element of array
- Reverse Array
- Variable size & limit
- ASCII value of character
- Sum of array elements
- Number of element in array
- Merge two array
- Insert element in array
- Delete element from array
- Add two matrix
- Transpose matrix
- Print string
- Reverse string
- Delete vowels
- Sort string
- Remove spaces
- Swap string
- Random numbers
- Print date & time
- Print IP address
- Shut down computer
Find ASCII value of a character in C
In this C programming guide we will write some program to find ASCII value of a character. At first we will take the character from user then print the ASCII value as like as given in the figure bellow.

We can find the ASCII value by a very simple program. We can also use pointer to find the value. Let’s see the program bellow;
C program to find ASCII value of character
// c program to find ASCII value of character
#include <stdio.h>
int main(){
char given_ch;
printf("Enter a character to find ASCII value here : ");
scanf("%c", &given_ch);
printf("\nASCII value of given '%c' is = %d\n", given_ch, given_ch);
// %d will print the ASCII value of given character here
return 0;
}
Output of ASCII value program:

Find ASCII value of character using pointer in C
// c program to find ASCII value using pointer
#include <stdio.h>
int main(){
char *ch_ptr, given_char;
printf("Enter a character for ASCII value here : ");
scanf("%c", &given_char);
ch_ptr = &given_char;
printf("\nASCII value of given character '%c' is = %d\n", given_char, *ch_ptr);
// %d will print the integer value of pointer ch_ptr
return 0;
}
Program output will be as follows :
Enter a character for ASCII value here : k
ASCII value of given character 'k' is = 107
Previous page: Variable size and limit
Next page: Sum of array