Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the purpose of the 'restrict' keyword in C?
Answer: The 'restrict' keyword informs the compiler that a pointer is the only means to access a particular area of memory, helping in optimization.

Example:

void foo(int *restrict ptr);
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook