Program to convert an char array to decimal array


#include<stdio.h>
#include<conio.h>
void main()
{
char a1[50];
int a2[50];
printf("enter the characters :");
gets(a1);
for(int i=0;a1[i]!='\0';i++)
a2[i]=(int)a1[i];     // TYPE CASTING
for(i=0;a1[i]!='\0';i++)
printf("%d",a2[i]);
getch();
}

Comments

Popular posts from this blog

Customize User's Profile in ASP.NET Identity System

Migrating database from ASP.NET Identity to ASP.NET Core Identity