Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8303447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:32:43+00:00 2026-06-08T17:32:43+00:00

I was reading a bit in Pointer Arithmetic, and I came upon 2 things

  • 0

I was reading a bit in Pointer Arithmetic, and I came upon 2 things I couldn’t understand neither know it’s use

address_expression - address_expression

and also

address_expression > address_expression

Can someone please explain them to me, how do they work and when they are used.

Edit:

What I meant to say is what do they produce if I just take two addresses and subtract them

And If I take two addresses and compare them what is the result or comparing based upon

Edit:
I now understand the result of subtracting addresses, but comparing addresses I still don’t get it.

I understand that 1<2, but how is an address greater than another one and what are they compared upon

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:32:44+00:00Added an answer on June 8, 2026 at 5:32 pm

    Pointer subtraction yields the number of array elements between two pointers of the same type.

    For example,

    int buf[10] = /* initializer here */;
    
    &buf[10] - &buf[0];  // yields 10, the difference is 10 elements
    

    Pointer comparison. For example, for the > relational operator: the > operation yields 1 if the pointed array element or structure member on the left hand side is after the pointed array element or structure member on the right hand side and it yields 0 otherwise. Remember arrays and structures are ordered sequences.

     &buf[10] > &buf[0];  // 1, &buf[10] element is after &buf[0] element
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Re-reading a bit about php basics, as to refresh some things and to be
Edit: Prepare my objects for the use within a HashMap. after reading a bit
After reading a bit on Javascript's prototypical inheritance model , I change my style
I'm reading 16-bit integers from a piece of hardware over the serial port. Using
I'm reading a bit of C code in an OS kernel that says x
Im skinning a progressBar in Flex, and after reading a bit about it, I
I've been reading a fair bit about the performance of using LINQ rather than
I was just reading a little bit on them from http://www.cplusplus.com/doc/tutorial/namespaces/ and it seems
So I've been reading quite a bit about Unicoding tonight because I was thinking
Out of curiosity, I've been reading up a bit on the field of Machine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.