ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2253)
 C++ interview questions  C++ Interview Questions (1111)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (646)
Question
what is difference between array and structure?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is difference between array and structure?
Answer
# 1
array -same data type
structure -diff datatype
 
Is This Answer Correct ?    505 Yes 45 No
Rajesh
 
  Re: what is difference between array and structure?
Answer
# 2
Array:Static memory allocation.
It uses the subscript to access the array elements.

Structure:Dynamic memory allocation.
It uses the dot(.)operator to access the structure
members.
 
Is This Answer Correct ?    383 Yes 37 No
Rajkumars
 
 
 
  Re: what is difference between array and structure?
Answer
# 3
Array is a base pointer..
** it points to a particular memory location..

Structure is not a pointer..
 
Is This Answer Correct ?    172 Yes 42 No
Shruti
 
  Re: what is difference between array and structure?
Answer
# 4
chaining and open addressing in hash table ? 
Is This Answer Correct ?    53 Yes 75 No
Rajprasadmaity
 
  Re: what is difference between array and structure?
Answer
# 5
Array -
* Memory (array size) is fixed
* Accessing an element in array takes constant time. E.g. -
5th element in an array can be accessed as array[4] i.e.
searching/accessing an element in array takes comparatively
less time than in structures.
* Adding/deleting an element in the array is comparatively
difficult since the data already present in the array needs
to be moved
Structure -
* Memory (structure size) can be changed dynamically
* Accessing an element in a list takes more time
comparatively since we need to traverse thro the list
* Adding/deleting takes less time than in arrays
 
Is This Answer Correct ?    172 Yes 18 No
Vinay
 
  Re: what is difference between array and structure?
Answer
# 6
collection is similar data type array
array always start from 0
array size fixed
 
Is This Answer Correct ?    89 Yes 30 No
Rajprasadmaity
 
  Re: what is difference between array and structure?
Answer
# 7
array has indexed data type.
data type of structure is object type.
 
Is This Answer Correct ?    70 Yes 23 No
Kalyani Joshi
 
  Re: what is difference between array and structure?
Answer
# 8
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 ?    67 Yes 14 No
Ira
 
  Re: what is difference between array and structure?
Answer
# 9
ARRAY:- An array can't have bit fields.

STRUCTURE:- Structure can contain bit fields.
 
Is This Answer Correct ?    61 Yes 14 No
Reema
 
  Re: what is difference between array and structure?
Answer
# 10
structure is user defined!


c program for printing employee details using union ??
 
Is This Answer Correct ?    48 Yes 34 No
Sruthi
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
How to calculate sum   2
will the program compile? int i; scanf(%d,i); printf(%d,i);   3
What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort Accenture 3
What is the difference b/w main() in C language and main() in C++.   7
write a program to check whether a number is Peterson or not.   2
is it possible to change the default calling convention in c ? Aptech 1
Find errors (1) m = ++a*5; (2) a = b ++ -c*2; (3)y = sqrt (1000);   5
write a program to count the no of repaeted words in a line?   1
Why can't we initialise member variable of a strucutre   1
What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?   2
given the piece of code int a[50]; int *pa; pa=a; to access the 6th element of the array which of the following is incorrect? a.*(a+5) b.a[5] c.pa[5] d.*(*pa + 5) TCS 6
Write an algorithm for a program that receives an integer as input and outputs the product of of its digits. E.g. 1234 = 24, 705 = 0   4
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com