what is difference between array and structure?
Answers were Sorted based on User's Feedback
Answer / guest
array is a collection of similar data types.a structure is
a collection of different data types
| Is This Answer Correct ? | 27 Yes | 1 No |
Answer / aaa
structure uses keyword struct while declaring,
whereas array doest use any keyword for declaration.
| Is This Answer Correct ? | 25 Yes | 5 No |
Answer / chinmayee
array is a homogenous data types.
structure is a user defined data types...
| Is This Answer Correct ? | 26 Yes | 9 No |
Answer / sruthi
structure is user defined!
c program for printing employee details using union ??
| Is This Answer Correct ? | 48 Yes | 34 No |
Answer / priya
Array is used to store large set of data with same data
type.But structure allows you to wrap one or more variables
with different data type.
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / preet batth
array
1.there is no keyword
2.it has decleration only
structure
1.the keywod struct is used
2.it as decelration and definition
| Is This Answer Correct ? | 12 Yes | 2 No |
Answer / uttam kumar das
array= array is collection of similar data items
structure= structure is a collection of dissimilar data
items
| Is This Answer Correct ? | 18 Yes | 9 No |
Answer / sajid ali khan
ARRAYS: -
An array may contain a number of items all of the SAME TYPE,
including user-defined types such as structures (see above).
Structure: -
In the C programming language, a structure may contain
MULTIPLE DATA TYPES, also including arrays of those types,
and the structure becomes a USER-DEFINED type.
| Is This Answer Correct ? | 14 Yes | 7 No |
Answer / kunal
array is scope of variable
structure is a scope of data type
| Is This Answer Correct ? | 12 Yes | 6 No |
Answer / srinidhi
array means homogenious it can hold only its or char ,float
stucture means heterogenious it can contain 1 int,i floatso
it is contains mixed data
| Is This Answer Correct ? | 6 Yes | 0 No |
Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
int x=5; printf("%d%d%d",x,x<<2,x>>2);
What is the benefit of using #define to declare a constant?
Write a program in c to input a 5 digit number and print it in words.
The __________ attribute is used to announce variables based on definitions of columns in a table?
Where define directive used?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
What are the primitive data types in c?
Is it better to use a macro or a function?
macros and function are related in what aspect? a)recursion b)varying no of arguments c)hypochecking d)type declaration
12 Answers HCL, Infosys, Microsoft,
write a c program to find the roots of a quadratic equation ax2 + bx + c = 0
11 Answers CSC, St Marys, TATA,