Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void main()
- {
- char str[100]; /* Declares a string of size 100 */
- int i= 0;
- printf("\n\nSeparate the individual characters from a string :\n");
- printf("------------------------------------------------------\n");
- printf("Input the string : ");
- fgets(str, sizeof str, stdin);
- printf("The characters of the string are : \n");
- while(str[i]!='\0')
- {
- printf("%c ", str[i]);
- i++;
- }
- printf("\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment