what is difference between array and structure?
Answer Posted / ira
Are you sure that Structure is object oriented, because
structs came from C, and C wasn't an object-oriented
program, and C++ was using it at the beginning where now
they use class for the same function which is better
Array is a collection of a fixed number of components all of
the same type: it is a homogeneous data structure.
structs (records) - we use them to group items of different
types; a collection of a fixed number of components in which
the components are accessed by name. The components as
mention can be of different types. A struct is typically
heterogeneous.
Is This Answer Correct ? | 82 Yes | 20 No |
Post New Answer View All Answers
Ow can I insert or delete a line (or record) in the middle of a file?
Can a pointer be null?
How pointers are declared?
What do you mean by c?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
Are local variables initialized to zero by default in c?
what do you mean by enumeration constant?
What are # preprocessor operator in c?
Do you have any idea how to compare array with pointer in c?
What is indirection?
praagnovation
What is the purpose of the statement: strcat (S2, S1)?
What does the error message "DGROUP exceeds 64K" mean?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
What does %2f mean in c?