what is pointers
Answers were Sorted based on User's Feedback
Answer / ramya
pointer is a memory variable that stores the address of the
another variabe
Is This Answer Correct ? | 55 Yes | 0 No |
Answer / arun
A pointer is a programming language data type whose value
refers directly to (or "points to") another value stored
elsewhere in the computer memory using its address.A pointer
references a location in memory, and obtaining the value at
the location a pointer refers to is known as dereferencing
the pointer.
Is This Answer Correct ? | 21 Yes | 5 No |
Answer / umashankar mishra
pointer is a variable which is used to store the adress of
another variable
syntax:
int *ptr
* symbole is used to defined the pointer
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / p.madhupriya
pointer is a variable that points to address of another variable
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / durgesh jaiswal
pointer is a memory variable which holds the address of another variable.........
syntax-*ptr
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / backiya
pointer is a memory variable...
it's stored address in another new variable
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ramesh bhumarapu
Pointer is a Reference Variable...
which contains address of another variables
Is This Answer Correct ? | 0 Yes | 0 No |
What is the default size allocated for array in the statement if size not specified " int a[] "
features of OOPS
22 Answers Ness Technologies, Satyam,
why constructor cannt be declar virtually? why destructor cannt be overloaded?
write a program to find 2^n+1 ?
what is the definition of incapsulation
What are properties in oop?
what is overloading
Can a destructor be called directly?
What is the highest level of cohesion?
What is constructor in oop?
Question In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation
explain sub-type and sub class? atleast u have differ it into 4 points?