Thanks for all the help guys. I've come up with this:
Code:
#include<stdio.h>
int main(void)
{
char abc[] = {"Mmy Nname Iis Mmonk"};
int i = 0;
for(i = 0; abc[i] != '\0'; i++) {
if(abc[i] >= 'a' && abc[i] <= 'z') {
printf("%c: %d ", abc[i], abc[i]);
}
else if(abc[i] == ' ') {
printf("\n");
}
}
printf("\n");
return 0;
}
O/P:
m: 109 y: 121
n: 110 a: 97 m: 109 e: 101
i: 105 s: 115
m: 109 o: 111 n: 110 k: 107
Thought I'd learn some subnetting today and then go to college. But ended up doing this program