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


Please Help Members By Posting Answers For Below Questions

Is javascript written in c?

567


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

1479


#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }

704


What is restrict keyword in c?

631


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

4824






Can you tell me how to check whether a linked list is circular?

753


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

740


Is exit(status) truly equivalent to returning the same status from main?

576


Write a program to swap two numbers without using the third variable?

587


Why does the call char scanf work?

607


What is meant by 'bit masking'?

870


With the help of using classes, write a program to add two numbers.

609


List a few unconditional control statement in c.

548


What does 4d mean in c?

928


How does free() know explain how much memory to release?

607