Hello guys, i have this code:
#include <stdio.h>
int main()
{
int numberPosition=8;
char senha[1000]="01000hello";
printf("%i\n", numberPosition);
senha[numberPosition]="";
printf("\n%s\n", senha);
return 0;
}
When I executes my code my return is: 01000heo.
However if I delete the line "printf("%d\n", numberPosition);" my return is: 01000helo
Why printf deletes an element from my array?