Which of the following correctly declares a pointer to an integer in C?
int *ptr;
int ptr;
int &ptr;
pointer int ptr;
[ Option A ]
int *ptr; declares a pointer to an integer.
char *ptr; declares a pointer to a character.
float *ptr; declare a pointer to a float.
int **ptr; declares pointer to a int * and so on.
What is the size of a pointer on a 64-bit system?
2 Bytes
8 Bytes
4 Bytes
Depends on data type it points to
[ Option B ]
On a 64-bit system, pointers are typically 8 bytes, regardless of the data type they point to.