How will this difference b interpreted, Computer Engineering

Assignment Help:

How will this difference b interpreted?

When one pointer is subtracted from another pointer, the number of elements between the two pointers always includes the element pointed to by one of the pointers. As an example, for s_ptr2 - s_ptr1, the difference is 3.

Subtracting s_ptr1 from s_ptr2 yields the number of elements between the two pointers: 3 elements. The compiler subtracts the addresses of the two pointers and divides the result (6 bytes) by the size of the pointed-to object. In this example, the compiler divides by 2 bytes (sizeof(short)).

 

 


Related Discussions:- How will this difference b interpreted

History of information technology and organisations, History of Information...

History of Information Technology and Organisations The increasing sophistication in information systems and the growth in their use have been influenced by three main factors

What is shift operation, Q. What is Shift operation? Shift: Shift ope...

Q. What is Shift operation? Shift: Shift operation is employed for transfer of bits either to left or to right. It can be used to comprehend simple arithmetic operation or da

Computer representation for the negative integer, Everything stored on a co...

Everything stored on a computer can be represented as a string of bits. However, different types of data (for example, characters and numbers) may be represented by the same string

Explain demand paging, What is Demand paging? Virtual memory is commonl...

What is Demand paging? Virtual memory is commonly executed by demand paging. In demand paging, the pager brings only those essential pages into memory instead of swapping in a

Describe the hardwired control method, Describe the Hardwired control metho...

Describe the Hardwired control method for generating the control signals Hard-wired control can be explained as sequential logic circuit that generates particular sequences of

Build data flow diagrams showing functional dependencies, Build data Flow d...

Build data Flow diagrams showing functional dependencies Data flow diagrams are very useful for showing functional dependencies. In data flow diagrams processes are indicated

Define the term web service with example, Define the term web service with ...

Define the term web service with example. A web service is an application that operate over a network-typically, over the Internet. Most typically, a web service is an API that

In ldb what determines hierarchy of the tables, In LDB what determines hier...

In LDB what determines hierarchy of the tables? Structure

What is the file-system security, What is the File-system security Most...

What is the File-system security Most commercial servers use a powerful operating system as base that provides good methods of file-system security. Some servers require additi

What are condition codes, What are condition codes? In many processors,...

What are condition codes? In many processors, the condition code flags are kept in the processor status register. They are either set are cleared by lots of instructions, so th

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd