What is the difference between array and structure in c?



What is the difference between array and structure in c?..

Answer / Rahul Pal

An array in C is a collection of elements of the same data type, while a structure can hold variables of different data types. Arrays have a fixed size at compile-time, whereas structures can be used to create custom composite data types with dynamic member names and data types.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What does void main return?

1 Answers  


using only #include <stdio.h> and #include <stdlib.h> Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

1 Answers  


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

1 Answers  


write a program to display & create a rational number

1 Answers   HCL, TCS,


Explain bitwise shift operators?

1 Answers  


Why c is called free form language?

1 Answers  


write a c program to find the roots of a quadratic equation ax2 + bx + c = 0

11 Answers   CSC, St Marys, TATA,


Explain the priority queues?

1 Answers  


Why c is called top down?

1 Answers  


Hi Every one......... Please Any body give me the answer for my question. Is it possible to print the word "PRINT F", without using printf() statement in C-Language.

4 Answers  


write a program to print largest number of each row of a 2D array

1 Answers  


What is the purpose of macro in C language?

1 Answers   Fidelity,


Categories