In article <2h************@uni-berlin.de>,
"Vijay Kumar R Zanvar" <vi*****@globaledgesoft.com> wrote:
Hello,
I have a question: when do we use volatile
qualified function parameters?
When we want to confuse the reader.
Seriously, if you intend to modify a function parameter or any other
local variable of a function between a call to setjmp and a
corresponding call to longjmp then you must make that function parameter
or local variable volatile in order to avoid undefined behavior. You
shouldn't use volatile qualification in the function declaration because
it is just plain pointless and only confusing (qualifiers like volatile
or const are just ignored at that point), but only in the implementation
of the function.
And if you use this as an answer to your homework, then everyone will
know that you didn't write it yourself :-)