wtire a program to declare initialize and print the ! using appropriate data type
Answers
Answer:
General syntax of pointer declaration is,
datatype *pointer_name;
Data type of a pointer must be same as the data type of the variable to which the pointer variable is pointing. void type pointer works with all data types, but is not often used.
Here are a few examples:
int *ip // pointer to integer variable float *fp; // pointer to float variable double *dp; // pointer to double variable char *cp; // pointer to char variable
Initialization of Pointer variable
Pointer Initialization is the process of assigning address of a variable to a pointervariable. Pointer variable can only contain address of a variable of the same data type. In C language address operator & is used to determine the address of a variable. The &(immediately preceding a variable name) returns the address of the variable associated with it.