cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
please explain
please explain
Oct 9, 2012 at 1:15am UTC
vw4x4
(21)
int num[5];
int *ptr;
here we use num[] to refer individual cells or data stored in it?
is ptr[] and num[] any kind of operations,coz both of them is giving the data stored in respective memories
Oct 9, 2012 at 2:10am UTC
pogrady
(677)
int num[5] is an array of consecutive memory locations that all have the size of int. you access each element by giving an index within the brackets.
Visually it looks like this:
[memory][memory][memory][memory][memory]
Oct 9, 2012 at 5:24am UTC
TheIdeasMan
(6806)
vw4x4 (21)
You seem to ask a lot of these trivial, pedantic questions - anyone might think that you are trolling.
Oct 9, 2012 at 9:23am UTC
Moschops
(7244)
anyone might think that you are trolling.
I tend to think very lazy student for whom English is a second language. I like to attribute to laziness ahead of malice :)
Oct 9, 2012 at 1:01pm UTC
doug4
(1537)
If it is just laziness, try reading these tutorial chapters. They will cover your question.
http://cplusplus.com/doc/tutorial/arrays/
http://cplusplus.com/doc/tutorial/pointers/
Topic archived. No new replies allowed.