Most voted "volatile" questions
3 questions
Sort by count of
-
13
votes2
answers7627
viewsWhat is the C/C++ volatile modifier for?
I’ve seen in some codes on C/C++ statements like this: volatile int i = 0; I would like to know what the modifier is for volatile and in which cases should I use it.…
-
2
votes1
answer67
viewsIs there a race condition problem in my code?
Is there any problem of race condition in the code below? Private Shared Sub TestRandomNumberGeneration(ByVal random As Random) Dim failed As Boolean = False Parallel.For(0, 100000, Sub(i, state)…
-
2
votes2
answers62
viewsVolatile and optimization
I’m studying about the type qualifier volatile in C language, and I took a test. In the attached image we have the comparison of two programs written in C. The one on the left has a variable without…