I have a question about register keyword of C

Asked 1 years ago, Updated 1 years ago, 67 views

What does the register keyword do? I know it's related to optimization, but there's nothing that says exactly what function it does.

c memory keyword

2022-09-22 14:40

1 Answers

The register keyword is a keyword that asks the compiler to "manage this variable in the cpu register because it is a variable that will be used very often."

But the compiler often ignores this I'm not sure if this will be managed by the real register or not

Also, variables that use the register keyword cannot write addresses.


2022-09-22 14:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.