I want to look for letters of a string and then look-up in the alphabet and then write the index number of alphabet array's index . Like;
A=0
B=1 etc.
c=2
z=25
#
#include "stdafx.h"
#
#include "time.h"
#
#include "stdio.h"
#
#include "string.h"
#
#include "stdlib.h"
#
#
#define MAX 80
#
int _tmain(int argc, _TCHAR* argv[])
#
{
#
#
char a[] ="abcdefghijklmnopqrstuvwxyz";
#
char string[MAX];
#
int code[MAX];
#
int len, i, j,
#
printf ("Write your string: ");
#
gets_s(string);
#
len = strlen(string);
#
printf("%s \n", string);
#
#
#
for(int i=0;i<len;i++)
#
for(int j=0;j<25;j++)
#
if(string[i]==a[j])
#
code[i]=j;
#
#
}
#
#
#
#
}
#
#
return 0;
#
}