Find the first non-repeated character in a string c
Answers
Answered by
0
Answer:
First non-repeating character using one traversal of string. Set 2. Given a string, find the first non-repeating character in it. For example, if the input string is “GeeksforGeeks”, then output should be 'f' and if input string is “GeeksQuiz”, then output should be 'G'.
Answered by
0
Program to find the first non-repeating character in a string
- /* C program to find first non-repeating character */
- #include<stdlib.h>
- #include<stdio.h>
- #define NO_OF_CHARS 256.
- int *get_char_count(char *str)
- {
- int *count = (int *)calloc(sizeof(int), NO_OF_CHARS);
Similar questions