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"};
This is a discussion on structure variables within the C Programming forums, part of the General Programming Boards category; I want to know what will be the output for the following statement. whether it is correct or not. If ...
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.
If I have eight hours for cutting wood, I spend six sharpening my axe.
tell me any one possibility to give a values for structure pointer.
struct name *h = NULL;
If I have eight hours for cutting wood, I spend six sharpening my axe.
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.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^