I think the teacher mixed the property of static and dynamic memory

i think the teacher mixed the property of static and dynamic memory, so can anyone tell me difference in dynamic and static memory like their lifetime in function ??
value assigned or updated will remain as it is or it will initialize again whenever the function is called ??

hi @anujsharmabadboy static variables are initialised only once (when the function is first called) and thereafter every call to the function results in updating of their value. They are not initialized every time.

and tell me about dynamic memory ???

@anujsharmabadboy please see the inbox