declare an array of structure where the members of the
structure are integer variable float variable integer array
char variable access all elements of the structure using dot
operator and this pointer operator
Answer / Mudit Kumar Gupta
In C++, you can declare a structure array as follows:n```nstruct MyStruct {n int a;n float b;n int c[10];n char d[20];n};nMyStruct myArray[5]; // Declare an array of 5 structuresnn// Access elements using dot operator:nmyArray[0].a = 10;n// ...nn// Access elements using pointer operator:nMyStruct *p = &myArray[0];np->c[0] = 20;np->d[0] = 'A';
| Is This Answer Correct ? | 0 Yes | 0 No |
Is c++ a high level language?
sir there is some problem with nokia5130c-2,when we are trying to upload movies from net then there is a error occurred"FORMAT NOT SUPPORTED" bt its all ready in 3gp format.please tell me what i do now?
Give an example of run-time polymorphism/virtual functions.
Is there any problem with the following: char *a=NULL; char& p = *a;?
What is a modifier in c++?
What is a c++ class?
Explain the use of this pointer?
Explain stack unwinding.
Is there any difference between int [] a and int a [] in c++?
Explain "const" reference arguments in function?
What is the type of 'this' pointer? When does it get created?
What do you mean by abstraction in C++?