I want to know what will be the output for the following statement. whether it is correct or not. If it is wrong what would be the correct code.
Code:struct name *h={10,"aa"};
I want to know what will be the output for the following statement. whether it is correct or not. If it is wrong what would be the correct code.
Code:struct name *h={10,"aa"};
It depends on what you want to get. There are a lot of correct codes there. You do not expect me to write all the infinite possibilities here?what would be the correct code.
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
tell me any one possibility to give a values for structure pointer.
struct name *h = NULL;
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
i dont want to give null value. i need to give some values.
for eg:-
can i give like this.Code:struct name { char nam[10]; }; struct acc { int accno; struct name *n; }; void acc(struct acc *f) { struct acc *f={11,"aa"); } void disp(struct acc *f) { printf("acc no=%d",f->accno); printf("name=%s",f->n->nam); }
then how could i give values
Learn C perhaps?
Here's some good material for pointers, at least:
http://cpwiki.sourceforge.net/A_pointer_on_pointers
Among others.