123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
Program to print the ascii equivalent of all chararters in the entered string.

--------------------------------------------------------------------------------



#include <stdio.h>
#include <conio.h>
#include <ctype.h>
int ascii_value(char c);
void main()
{

int i,a;
char c;
clrscr();
printf("Please enter a string.");
printf("
String will be terminated if you press Ctrl-Z.");
printf("
STRING:- ");
for (i=0;(c=getchar())!=EOF;i++)
{
a=ascii_value(c);
printf("%d%c",a,' ');
}
printf("
are the ascii values of the characters of the entered string");
printf("
respectively.");
printf("




HAVE A NICE DAY! BYE.");
getch();
}

int ascii_value(char c)
{
int a;
a=(int)c;
return(a);
}

 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG