Untitled
unknown
plain_text
3 years ago
334 B
9
Indexable
//bad code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int my_strlen(char *str) {
int count = 0;
int i = 0;
while (*str+i != '/0') {
i++;
count++;
}
printf("%d", count);
}
void equality_check(const char *str)
{
(void) str;
}
int main(void)
{
char *ptr;
scanf("%c", ptr);
my_strlen(ptr);
return 0;
}
Editor is loading...