daily pastebin goal
10%
SHARE
TWEET

naruto_strings_1.c

a guest Apr 21st, 2016 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * @file naruto_strings_1.c
  3.  * @brief the program scan a word to a string and printf al letters in others lines
  4.  *
  5.  *
  6.  *
  7.  * Version log
  8.  * ------------
  9.  * Version 1 by Naruto, 20.04.2016
  10. */
  11. #include <stdio.h>
  12.  
  13. int main()
  14. {
  15.   char word[] = {0, 0, 0};
  16.   char letter = 0;
  17.  
  18.   printf("enter a word: ");
  19.   scanf("%s", word);
  20.  
  21.   for (letter = 0; letter <= word[letter]; letter++) {
  22.     printf("%c\n", word[letter]);
  23.   }
  24.  
  25.   return 0;
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top