Pointers

Gapfill exercise

  
Enter your answers in the gaps. When you have entered all the answers, click on the "Check" button.
Define void pointer in C?
Till now, we have studied that the assigned to a pointer should be of the same type as specified in the declaration. For example, if we declare the int , then this int cannot point to the float or some other of variable, i.e., it can point to only int type variable. To overcome this problem, we use a pointer to void. A pointer to void means a generic pointer that can point to any type. We can assign the of any data type to the pointer, and a void pointer can be assigned to any type of the pointer without performing any explicit .

Why we use void pointers?
We use pointers because of its reusability. Void can store the object of any type, and we can the object of any type by using the indirection with proper .

Why we use dereferencing pointer?
a pointer is used because of the following reasons:
It can be used to access or manipulate the stored at the location, which is pointed by the pointer.
Any applied to the pointer will directly affect the value of the that it points to.

What do you mean by Command Line Arguments in C?
The passed from command line are called command arguments. These arguments are handled by () function.
To support line argument, you need to change the of main() function as given below.
int main(int argc, char *argv[] )
Here, counts the number of arguments. It counts the file name as the first argument.
The argv[] contains the total number of arguments. The first is the file name always