answersLogoWhite

0

The pointer is non-NULL.

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

What is far and near pointer and how are they used?

It is a matter of the memory model you are using. On old or embedded systems, some memory was outside of the range of a normal pointer. If you have 4 megs of ram you need at least a 22bit pointer to see all of it. But let's say you only have a 16 bit pointer. This means you can only access the first 65K of ram. Odd as it may sound, this was a problem on old computers, and is sometimes an issue on embedded devices with limited processing power. The near and far classifications were a solution. Pointers are near by default. In my example above, the 65K of ram would be accessed with a near pointer. To get past that 16 bit limit, you need a far pointer. Thus: memory within the pointer's range is near. Memory outside of the range is far. Near pointer: char near * ptr; Far pointer: char far * ptr;A far pointer uses both the segment and the offset address to point to a location in memory. A near pointer in contrast uses only the offset address and the default segment. The far pointer can point to any location in memory, whereas the near pointer can only point to a nearby local address.Something that was important 20 years ago. Now you can forget it.


Implement a queue using a singly linked list l the operations insert and delete should still take o1time?

Suppose we have a Queue as follows: E -> D -> C -> B We maintain a head pointer to E and a tail pointer to B. To add an element, we make a new queue item (say A), we set B->next = A, and set tail = A. To delete an element, we let a temp pointer to the head (say tempHead = head), set head = E->next and deallocate tempHead.


When destructor can be virtual in c plus plus?

A class constructor initialises object member variables, ensuring the object is in a valid state from the point of instantiation. The destructor resets those same variables when the object falls from scope. Typically, the destructor is only required to release any memory allocated to any internal class pointers.


What is the algorithm to delete a child node in binary tree?

as far as i know u have 4 cases for the node u wanna delete1.It's a leaf (has no children)2.It has only left child3.it has only right child4.it has both children ,left and rightnow, let's work on it :>set a pointer node to the rootwhile the element to be deleted doesnt equal the pointerif it's smaller, move the pointer to the left subtreeif it's large , move the pointer to the right subtreeif pointer reached the end of the tree , null, break the loop (unluckly that means u didnt find the element that should be removed)end while //(now u must have found the target, the while condition is breaked normally)// this is case 4if both children don't equal nullget the most left node in the subtree of the pointer nodeassign its value to the pointer node.remove it (set that most left thing to equal null)//...case 2if pointer node.right only equals nullpointer node = pointer node.left//...case3if pointer node.left only equals nullpointer node = pointer node.right//... case 1if pointer node.left and .right equals nullpointer node.data = nullmaybe it doesnt look like any algorithm style ,sorry for that, that's as far as i knw, i doubt case 4 anyways..


Circular queue in linear data structure?

The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. A circular queue is similar to the normal queue with the difference that queue is circular queue ; that is pointer rear can point to beginning of the queue when it reaches at the end of the queue. Advantage of this type of queue is that empty location let due to deletion of elements using front pointer can again be filled using rear pointer.

Related Questions

Why does is used as a pointers in c language?

Let's suppose, you wanted to ask:Why thisis used as a pointer in C++ language? Because it is a pointer to the 'current object'.


How could you use linger in a sentence?

Let us linger on that thought for just a moment.


What is it called when you let the mouse pointer pause over an item for a moment or two?

In HTML4, the event is called onmouseover.


What is the meaning of linger?

linger means to hang around. like in the song "linger" by the cranberries (amazing song), they say "do you have to let it linger?" meaning, "do you have to let it stay?" if you are lingering, you're staying around, etc. etc. :D


How do you kiss a guys face and neck in a way he'll love?

Linger over him for a few minutes and let him know that you're in a sexual mood. That'll turn him on real fast.


What is the word that matches this definition Built to let air flow over object smoothly?

aerodynamic...


What format is used to show output of a pointer?

Let's suppose you want to know how to print a pointer's value: printf ("ptr=%p\n", ptr);


Your neighbors complain over smell of curries - how can you get them interested in eating curries?

Maybe you can bring them some and let them taste. To most westerners the smell is overpowering and it does tend to linger long after the meal is gone. But it does taste good! :)


How do you randomly get a girl to kiss you?

It's easy you just do the 3 pointer.1st-compliment her outfit,2nd do the yawn,arm over shoulder trick.Now lastly, let her go for you,don't go for her. :)


How do you use linger in sentence?

I lingered around the hospital.The smell of the skunk lingered for hours.Why do you still linger here, after I told you to leave?I'm going to linger around just a bit longer.I like to linger outside the front doors of the school and watch for my friends.Everyone else had left already, but I chose to linger and take a last look around the place.After being rudely denied the opportunity to date his requited love, the young boy decided it would be much better to leave rather than to linger and potentially embarrass himself further.You shouldn't linger on the street corner so long. The cops might mistake you for a drug dealeri lingered in the hall for a second.I had an appointment across town, and I could not linger.He let his gaze linger once more on the serene lake as he drove away.---"Linger" means that you're sort of hanging around - So you could use it like this: The harried mother told her child that he couldn't linger in the candy shop today.this moring i lingered beacus i was so tired .


Is it safe for cats to play with a laser pointer?

Yes, it is generally safe for cats to play with a laser pointer as long as precautions are taken to avoid shining the laser directly into their eyes. It is important to use the laser pointer responsibly and not let the cat become overly fixated on chasing the light.


What ia the value of a Charles Daly Auto pointer 12 gauge shotgun?

350.00 bucks don't let them cheat you.