can a pointer be volatile ? Explain.



can a pointer be volatile ? Explain...

Answer / Pawan Kumar Paswan

Yes, a pointer can be declared as 'volatile' in C++. The volatile keyword indicates that the value of the variable it points to may be modified by means outside the program's control (e.g., hardware registers or interrupts). By declaring a pointer as volatile, the compiler is forced to refrain from optimizations that assume the variable's value remains unchanged.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Embedded Systems AllOther Interview Questions

Discuss the concept of yagni.

1 Answers  


Explain what is size of character, integer, integer pointer, character pointer?

1 Answers  


Tell me how to create a child process in linux?

1 Answers  


What is a 'volatile' variable?

1 Answers  


What is the difference between asynchrony and concurrency?

1 Answers  


How does the interrupts handle by using the threads?

1 Answers  


Explain the significance of watchdog timer in embedded systems?

1 Answers  


Tell me why is java mostly used in embedded systems?

1 Answers  


You've just been assigned to a project in a new technology how would you get started?

1 Answers  


Tell me is count down_to_zero loop better than count_up_loops?

1 Answers  


How are variables mapped across to the various memories by the c compiler?

1 Answers  


Explain the concept of separation of concerns?

1 Answers  


Categories