Mastering Development

withoutwith volatile global variable in for loop

I’m new to C, just a question on volatile variables. We know that using volatile,we force the compiler to issue instructions that read variables from main memory instead of reading from cache/registers, below is the c code volatile int count = 0; void foo(int count) { int i; for (i = 0; i < count; […]