/*AN IMPLEMENTAION TO SHOW PASSING POINTER OF STRUCTURE OR POINTER AS ARGUMENT...HOW IT IS CATHCHED IN DEFINATION OF FUNCTION...& ATTENTION WHILE USING PASS BY POINTER*/
#include<stdio.h>
#include<stdlib.h>
//void delete(struct nod*);
struct nod
{
int a;
int c;
};
int main()
{
struct nod *new;
new=(struct nod*)malloc(sizeof(struct nod));
delete(new);
return 0;
}
void delete(struct nod* fnew)//fnew in which address of new which is pointer variable of struct nod is of (struct nod*) type/////ADDRESS OF THIS POINTER IS Same AS THAT OF IN MAIN....
{
int a;
printf("base add. of structure fnew=%p",fnew);
*fnew=a;//will assign some value or address to pointer will not change the address of pointer
fnew=&a;//will change the address of pointer ..so do not change it ....to take care ..do not use this type of assignment while using pass by pointer