20.5k views
3 votes
What line of code makes the character pointer studentPointer point to the character variable userStudent?char userStudent = 'S';char* studentPointer;

User Hendry
by
5.2k points

1 Answer

7 votes

Answer:

char* studentPointer = &userStudent;

Step-by-step explanation:

Pointers in C are variables used to point to the location of another variable. To declare pointer, the data type must be specified (same as the variable it is pointing to), followed by an asterisk and then the name of the pointer. The reference of the target variable is also assigned to the pointer to allow direct changes from the pointer variable.

User Cryp
by
5.8k points