Pointers, C/C++ Programming

Pointers are just numbers, representing addresses in memory. You can add to and subtract from pointers, for instance. It is pretty easy to make mistakes with pointer math, however, and some times those sorts of bugs can be hard to catch, so be careful. Don't dereference pointers unless you know that the address is valid, and that you know what data type is at that memory address. With arrays, generally be careful. C/C++ does not check array bounds, and the problems with pointer math can occur with arrays as well, since arrays are just "syntactic sugar" barely covering up the underlying pointers.

Posted Date: 3/12/2013 3:59:37 AM | Location : United States

Related Discussions:- Pointers, Assignment Help, Ask Question on Pointers, Get Answer, Expert's Help, Pointers Discussions

Write discussion on Pointers
Your posts are moderated
Related Questions
simple coding for pebble merchant..

Q: But MFC appear to encourage the employ of catch-by-pointer; should I do the similar? A: Depends. If you're utilizing MFC and catching one of their exceptions, by all means, d


Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.

Explain the Formatted Input Output with Strings? These are the third set of the scanf and printf families. They are called sscanf and sprintf. sprintf Puts formatted dat

Many human diseases could be controlled by the knowledge of the gene’s structure and pattern. The human gene could be represented by four nucleotides. Each nucleotide is represente

(a) Write a fragment of code that declares a variable colSp of type ColourSpot, and then moves it to the point (3, -4), and sets its colour to Green. (b) A function QU8 is speci

Q: What are User Defined data types? C supports an extraordinary feature known as "type definition" that permits users to define an identifier that would represent an existing