L
Lalatendu Das
Hi ,
Any way i have problem related to pointer
let's say i have a double pointer like
node_t **headptr =NULL ; //global one
// let's say this is the defination of node_t
typedef struct list {
int a;
int b;
} node_t ;
Say i declare a variable like
node_t *head;
head =*headptr ;
Is this going to show any error or segment fault . what i assume that
once i declare headptr a adress will be associated with it . and i can
say it to point to nothing by assigning NULL and the same i am
assigning to head pointer now .
Is this alowed to use pointer like this . is this implimentable in both
user program and programs running in kernel land like Device drivers .
i checked in implimenting this in a user applcation it is working fine
without any warning also
OS - MP-RAS ( a unix variant) . using cc
Any way i have problem related to pointer
let's say i have a double pointer like
node_t **headptr =NULL ; //global one
// let's say this is the defination of node_t
typedef struct list {
int a;
int b;
} node_t ;
Say i declare a variable like
node_t *head;
head =*headptr ;
Is this going to show any error or segment fault . what i assume that
once i declare headptr a adress will be associated with it . and i can
say it to point to nothing by assigning NULL and the same i am
assigning to head pointer now .
Is this alowed to use pointer like this . is this implimentable in both
user program and programs running in kernel land like Device drivers .
i checked in implimenting this in a user applcation it is working fine
without any warning also
OS - MP-RAS ( a unix variant) . using cc