[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


...difference between integer arrays and character...

<< Back to: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)

Question by paw
Submitted on 8/6/2003
Related FAQ: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
Rating: Not yet rated Rate this question: Vote
What is the difference between integer arrays and character arrays?


Answer by Raveen
Submitted on 8/8/2003
Rating:  Rate this answer: Vote
When you access an integer array with out any index specification you will get the address of first cell in the array where as in case of string array you will get whole string displayed.

 

Answer by Chava
Submitted on 8/11/2003
Rating:  Rate this answer: Vote
Obviously, the length of the items in it....
Chars are 8 bit in length while integer are 16 bit.

 

Answer by Kishore reddy
Submitted on 2/10/2004
Rating:  Rate this answer: Vote
In integer array each element ocqupies 2 bytes. but in character array each character ocquipes only one byte.

the main difference is intorms of memory

 

Answer by chiru-k
Submitted on 6/10/2004
Rating:  Rate this answer: Vote
integer array takes 2 bytes for each cell whereas char takes 1 byte

 

Answer by pummi
Submitted on 6/18/2004
Rating: Not yet rated Rate this answer: Vote
character array could be printed using printf statement but we cannot do that to a integer array!

 

Answer by ilias mohd
Submitted on 12/13/2004
Rating: Not yet rated Rate this answer: Vote
Inter array ends with "don't the character",but character array ends in "/0".

 

Answer by l.gnanasekar
Submitted on 5/20/2005
Rating: Not yet rated Rate this answer: Vote
Hi viewers,
+------------------------------------------+
|   Integer array     | Character array    |
+------------------------------------------+
|1. int a[10];        | char a[10];        |
|  it allocates 20    | but it allocates   |
|   bytes.            | only 10 bytes      |
|---------------------|-------------------|
| 2. It points two    | But it points only |
|  address.           |   one adddress.    |
|---------------------|--------------------|
| 3. At the not have  | But at the END it  |
| NULL value assign   | Must use NULL char |
|                     | Then only it       |
|                     | terminate the str  |
|---------------------|--------------------|
| 4. we can use index | Use of index is for|
| for a single value  | access single char |
+------------------------------------------+

 

Answer by ramya
Submitted on 5/25/2005
Rating: Not yet rated Rate this answer: Vote
Strings r terminated with  NULL(\0) character and array 's r not

 

Answer by shadowman
Submitted on 10/6/2005
Rating: Not yet rated Rate this answer: Vote
main difference is the NULL character as character arrays are considered as strings

 

Answer by Aftab Alam
Submitted on 2/13/2006
Rating: Not yet rated Rate this answer: Vote
Arrays:We can access randomly any individual element of an array, but
Strings:We have to process the string sequentially i.e. character by character from start to end.

 

Answer by abhinavballu
Submitted on 12/10/2006
Rating: Not yet rated Rate this answer: Vote
The all above answer are given by the student is wrong aur yeh bhosdi k chutiya hain.

 

Answer by figa
Submitted on 6/13/2007
Rating: Not yet rated Rate this answer: Vote
Du musst ein Fachmann sein - wirklich guter Aufstellungsort, den du hast! http://www.obiettiv4i64.info/figa

 

Answer by sesso con cavalli
Submitted on 6/21/2007
Rating: Not yet rated Rate this answer: Vote
pagine piuttosto informative, piacevoli =) http://www.obiettiv4i64.info/sesso-con-cavalli

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.