>inline function
the generated machine code will not contain a "call" or equivalent instruction to a memory address containing the function code and will instead contain the actual function code in-place
the "inline" keyword is merely a suggestion; the compiler might decide not to inline the function at all
>constructor return value
no
>pointer
an integer containing a memory address
>boxing and un-boxing
an absolutely retarded thing that only exists in java where you construct a fat managed object (allocated on the heap, referred to with a pointer) for holding a primitive value
>repeat char
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <assert.h>
bool fn(char *x)
{
char ch = '\0';
int len = strlen(x);
if (len < 3)
return false;
for (int i = 0; i != len - 2; ++i) {
if (x[i] == x[i+1] && x[i] == x[i+2])
return true;
}
return false;
}
int main()
{
bool res1 = fn("asdxxx");
bool res2 = fn("xxx");
bool res3 = fn("asdxx");
bool res4 = fn("xx");
assert(res1 && res2 && !res3 && !res4);
puts("ok");
return 0;
}