Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int is_in_f(char *s, char c) {
- while(*s) {
- if(*s==c) return 1;
- else s++;
- }
- return 0;
- }
- int main() {
- char *name = "paria llls";
- char string1[] = "a";
- if(is_in_f(*name, string1)){
- printf("found");
- }
- return 0;
- }
- E2.c: In function ‘main’:
- E2.c:14:19: warning: passing argument 2 of ‘is_in_f’ makes integer from pointer without a cast [-Wint-conversion]
- if(is_in_f(name, string1)){
- ^~~~~~~
- E2.c:3:5: note: expected ‘char’ but argument is of type ‘char *’
- int is_in_f(char *s, char c) {
Add Comment
Please, Sign In to add comment