So what am i doing wrong here?

so what am i doing wrong here?
#include
#include

int main()
{
const char* c = "this is a long string that has a bunch of stuff inside of it";
char* e;
int len;
int i;

len = strlen(c);

for (e = (char*)c; i < len; e++) {
printf("%s", e);
i++;
}

return 0;
}

Attached: wealreadytried.png (265x315, 203K)

What the hell are you trying to do

print out each char in c variable. it works but it prints out way too much shit.

'i' is uninitialised. Also, you're weirdly mixing two different ways of iterating over a string.
You don't need i at all.

Read a book, are you trying to print the string one character forward untill the string runs out?
Hello
ello
llo
lo
o

e is a pointer.
try dereferencing it

no. i want to print each char in the string.

Print with "%c" not "%s" for a start in that case

instead of "%s", use "%c".

You need to null terminate your string. This piece of shit grandpa language requires it otherwise you get undefined behaviour. Also make a string wrapper struct that has string length built in. Fuck it is sad people still make these mistakes but I guess C is C.