C Program To Convert Character To Ascii And To Find The Sum Of Digits Of Ascii Value

  • Uploaded by: Saiyasodharan
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View C Program To Convert Character To Ascii And To Find The Sum Of Digits Of Ascii Value as PDF for free.

More details

  • Words: 79
  • Pages: 1
CONVERSION OF CHARACTER TO ASCII AND SUM OF INDIVIDUAL DIGITS OF THE ASCII VALUE Program: #include<stdio.h> #include #include void main() { char ch; int asc; int sum = 0; clrscr(); printf("Enter a character : "); scanf("%c", &ch); asc = toascii(ch); printf("\nThe ASCII value of %c is %d", ch, asc); while (asc > 0) { sum = sum + (asc % 10); asc = asc / 10; } printf("\nThe sum is %d", sum); getch(); } More useful programs @ http://www.gethugames.in/blog/

Related Documents


More Documents from ""