unsigned char lines[64000][64];
int RandomNumberGenerator(const int nMin, const int nMax);
int main(void) {
srand(time(NULL));
for(int i=0; i<64000; i++){
for(int j=0; j<64; j++) {
lines[i][j] = rand();
}
}
TL;DR: My main goal is to cause a random bit flip in a random (row, column) in this 2D array.
I have a 2D array filled with random numbers and my goal is to cause a bit flip on a random (row, column) or element. I understand getting the random row and column but I am not sure how do I should do a bit flip on that address or element. Edit: The way I am treating this, lines[i][j] is 8 bits or a byte. And I want to flip one of the bits in a byte.