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


    Search the Q&A Archives


q- Does mentioning the array name gives the base...

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

Question by erika
Submitted on 2/20/2004
Related FAQ: comp.lang.c Answers to Frequently Asked Questions (FAQ List)
Rating: Not yet rated Rate this question: Vote
q-      Does mentioning the array name gives the base address in all the contexts?

q-   Explain one method to process an entire string as one unit?

q-   What is the similarity between a Structure, Union and enumeration?

q-   Can a Structure contain a Pointer to itself?

q-   How can we check whether the contents of two structure variables are same or not?

q-   How are Structure passing and returning implemented by the complier?

q-   What is near, far and huge pointers? How many bytes are occupied by them?

q-   How would you obtain segment and offset addresses from a far address of a memory location




Answer by harish
Submitted on 4/7/2004
Rating:  Rate this answer: Vote
ans 2:  there is no way to process an entire string.it has to be done char by char

ans 3.all are different.structure contains members of different data types.all the members in a structure will be at different offset. union is similar to a structure with all the members having offset 0.union can hold a single member at any Given time.enumeration is a list of integer constants.

ans 4: yes a structure can contain a pointer to itself and is called as self referential structures.

 

Answer by ambuj
Submitted on 5/27/2004
Rating:  Rate this answer: Vote
q5:
simply check
if(var1==var2)

 

Answer by vsriharsha
Submitted on 6/15/2004
Rating:  Rate this answer: Vote
Q1: Yes, any reference to an array name would yeild its base address in all situations.

Q.: Near Far and Huge Pointers:
Though not complete, this is what serves as an introduction. Firstly, there is no near, far and huge pointer concept in Linux-based (32-bit and 64-bit computing) computers. Earlier, a program was allocated one page of memory for use and any pointers you normally used were capable of addressing any address within that page. This is Near Pointer. If you wanted to address memory outside your page but within the 640k conventional memory, you use Far Pointers and if you want to go beyond the conventional memory, you use huge pointers.

 

Answer by Guest
Submitted on 10/18/2004
Rating: Not yet rated Rate this answer: Vote
Q5:
You cant compare two structures in C. You have to do it individually. However you can do an assignment.

 

Answer by Narasimhas
Submitted on 12/13/2004
Rating: Not yet rated Rate this answer: Vote
36.   What is the similarity between a Structure, Union and enumeration?

All represent a user-defined type and allow accessing data associated with it in a user friendly way.

 

Answer by Bai
Submitted on 3/28/2005
Rating: Not yet rated Rate this answer: Vote
What is the similarity between a Structure, Union and enumeration?
--All defined before main function.
--All create a new type
--All data members need to have a unique name
--All use semicolon to terminate their definition

 

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 to Frequently Asked Questions (FAQ List)


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

© 2008 FAQS.ORG. All rights reserved.