Honey Well C Questions

1.what is the difference b/w pointer and pointer++
2.what is difference b/w pointer &array
3.what is the difference b/w class& structure

  
Showing Answers 1 - 6 of 6 Answers

Kulminder Singh

  • Nov 14th, 2007
 

(1) Pointer will hold the address of memory location ,whereas the pointer++ will hold the address of next memory location of that type.

(2) As such there is just a single difference between class and structure. By default the members in the structure is public and in class the members by default are of private type.

  Was this answer useful?  Yes

harpreet sran

  • Nov 15th, 2007
 

3. structures and classes both are used in c++ but classes are private by default and structures are public by default. structures are also used in c but not classes.

  Was this answer useful?  Yes

krischan

  • Nov 23rd, 2010
 

Pointer: holds address of a variable
pointer++: now it depends on datatype. if pointer is int then +2 locations,if float +4,if char +1, if any other then +its size


pointer : points to a location
array : name of array points to base address. index gives value. both has the target as heap


class: c++,methods allowed,by default private
structure: c++,c, methods are not allowed,by default public

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions