GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 155 of 185    Print  
What is the difference between far pointer and near pointer?

  
Total Answers and Comments: 1 Last Update: November 21, 2007     Asked by: satyagmk 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Mahendra Kathe
 
In 16 bit development environment like DOS or WIN 3.0 memory management is done in terms of segment:offset addressing style. so in this environment we have segment registers like CS,DS.SS,ES if we declare a near pointer we will be able to access the pointer within the segment i.e with 64 kb boundary on the contrary if we declare it as far pointer we can access the pointer across segment boundary i.e pointer declared in one segment can be accessed from other segments also. In 32 bit environment we have linear addressing scheme no segments and offsets so all pointers are treated as far only, no differentiation as near or far.

Above answer was rated as good by the following members:
SmitaHegde
November 20, 2007 08:23:02   #1  
Mahendra Kathe        

What is the difference between far pointer and nea...
In 16 bit development environment like DOS or WIN 3.0 memory management is done in terms of segment:offset addressing style. so in this environment we have segment registers like CS,DS.SS,ES if we declare a near pointer we will be able to access the pointer within the segment i.e with 64 kb boundary on the contrary if we declare it as far pointer we can access the pointer across segment boundary i.e pointer declared in one segment can be accessed from other segments also.
In 32 bit environment we have linear addressing scheme no segments and offsets so all pointers are treated as far only, no differentiation as near or far.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

 Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. 
Latest Answer : Similar to difference in default access specifier, default inheritance too is different in Class Vs Structures. ...

 A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually 
Latest Answer :    A virtual function allows derived classes to replace the implementation provided by the base class. ...

 Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.  Ø      A Class 
Latest Answer : Class is a combination of data member & member function where object is used for calling function In class we declare In object we call ...

The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, 
Latest Answer : free() - releases the memory of the pointer passed as parameter, to the OS/application consumption. Using the pointer after free() will result in undefinded resultsrealloc() - used to resize the memory held by the pointer to the number of bytes specificed. ...

Templates allow to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until certain point they fulfill 
Latest Answer : template is used for creating generic functions as well as data members. ...

Runtime type identification (RTTI) lets you find the dynamic type of an object when you have only a pointer or a reference to the base type. RTTI is the official way in standard C++ to discover the type 
Latest Answer : We can only assign a derived object to a base object pointer and a base class member to a derived class member pointer. ...

Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching 
Latest Answer : Virtual constructor is not build-in C++ feature but it doesn't mean its not used by devs in code and in conversations. There are many other things that doesn't exist in particular language yet, people find ways around to solve it (SingleTon, Virtual Constructor, ...

There is only one difference ,in classes the members are private by default whereas it is not so in structures. 
Latest Answer : Amid, you are talking about "C" structure that knows nothing about classes etc. The only difference between C++ class and struct is default access specifier (private and public respectively) ...

Latest Answer : Operator new mean overloading the operator 'new', giving your own defintion for the existing 'new' operator. ...
Read Answers (3) | Asked by : suman

Latest Answer : C does not have limitation access. Structures in C are used to regroup data from different types.In C++ structure have limitation access propreties (private,public protected) with public access as default, can contain methods and can be used as a class. ...
Read Answers (10) | Asked by : suji


 Sponsored Links

 
Related Articles

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

C++ Void Pointer and Null Pointer

C Void Pointer and Null Pointer In this C tutorial you will learn about two interesting types of pointers; void pointers and Null Pointer These pointers will be discussed in conjunction with syntax usage and example mosgoogle center Pointer to Void General Syntax void pointer variable; Void is use
 

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

Neuro-linguistic Programming Methods

Neuro linguistic Programming Methods There are several methods used for performing Neuro linguistic Programming on an individual for obtaining insights into the psyche of the person in order to correct to modify certain patterns of behavior These techniques are also used for Neuro linguistic trainin
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape