Ah I figured it out, I will post the complete code after my assignment is handed in and marked just to prevent everyoen on my course copying me :D
Type: Posts; User: vars19
Ah I figured it out, I will post the complete code after my assignment is handed in and marked just to prevent everyoen on my course copying me :D
#include<stdio.h>
#include<string.h>
int main(){
char word[100], temp[] = {'temp'};
int i=0, k=0, count=1;
printf("Enter string: ");
yeah, sorry. I have a program which takes a string from the user. I have this string counted and a total char given.
What i am stuck on is getting a number for each char. so
a : 1
b : 2
c : 1...
I am trying to create part of a larger program however in this section i wish to count the individual chars from a string.
I have tried for days and hours to come up with a solution however...