What is meaning of nonportable pointer conversion in c?

Answer: 
When you will assign any value to a pointer variable then compiler will automatically convert  given value in address  of pointer type such automatic type conversion is known as non-portable pointer conversion. Non-portable pointer conversion is not cause of any compilation error but it is bad coding style. Hence compiler will send one warning message. 

 For example:

#include<stdio.h>
void main(){
    int a =10;
    int *p;
    int **q;
    p=a;  //Nonportable pointer conversion
    q=a; //Nonportable pointer conversion
    printf("%d  %d",*p,**q);
}

1 comment:

prasanna said...

Give a detailed example using function