c - Save word as string -


need save word , type letter letter.

i know pretty easy work loop. problem don't know how word long need make function count letters first. wonder if there easier way this.

current progress

#include <stdio.h>  int main()  {   char word[30];  int i;   printf("enter word ");  scanf("%s", word);  while(word[i] != '\0') i++;  printf("%c,", word[i]);   // word backward !  // have no idea  } 


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -