strlen-c/cpp/_rvmain.cpp

28 lines
299 B
C++

#include <stdint.h>
char * ptr1 = " Dominik P";
int strlen(char *s)
{
char *p = s;
while (*p != '\0')
p++;
return p - s;
}
void strcpy(char *s, char *t)
{
while (*s++ = *t++);
}
int main() {
uint8_t wynik =0;
wynik = strlen (ptr1);
asm("nop");
}