How do you declare a pointer to an integer in C?
- int ptr;
- int* ptr;
- int_pointer ptr;
- pointer(int) p;
To declare a pointer to an integer in C, you use the format int* ptr;. This declares a pointer variable named ptr that can store the address of an integer.
Loading...
Related Quiz
- How does the 'switch' statement compare to a series of 'if-else' statements in terms of efficiency?
- In a project involving real-time systems, you notice that different modules use different naming conventions for the same data type. What feature of C can help maintain consistency across modules?
- How does the compiler determine the size of a structure containing bit fields?
- How does C++ resolve calls to overloaded functions?
- The memory consumed by an array declared as float arr[10][20]; is ________.