Exforsys

Online Training

Programming in C

This is a discussion on Programming in C within the C and C++ forums, part of the Programming Talk category; what is the difference between array of pointers and pointer in array?...


Go Back   Exforsys > Programming Talk > C and C++

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-20-2006, 06:58 AM
Junior Member
 
Join Date: Dec 2006
Posts: 1
ANANTHA KRISHNAN is on a distinguished road
Programming in C

what is the difference between array of pointers and pointer in array?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-23-2006, 04:07 PM
Senior Member
 
Join Date: Apr 2006
Posts: 162
sammy is on a distinguished road
array of pointers
As an example we can say
char *argv[];
is an array of pointer to char.

Hope this helps you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-29-2006, 01:17 PM
Junior Member
 
Join Date: Nov 2006
Posts: 3
chaisen2006 is on a distinguished road
hi there!!

int a=1,b=2,c=3;
int *arr[3];
arr[0]=&a;
arr[1]=&b;
arr[2]=&c;
this forms the array of pointer...ie an array which contains a set of addresses....in this case address of set of intergers............


pointer of array!!
a[]={1,2,3,4};
int *p;//pointer to an array//
p=a;//in this it will contain the base address of a// ie address of a[0];
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-08-2007, 03:22 PM
Senior Member
 
Join Date: Apr 2006
Posts: 144
caradoc is on a distinguished road
Friend,Hope you would have got a clear understanding from the replies given by our friends here in this thread. If you have any more query post it here and we would clarify the same.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Icon Programming Language FAQ icon-project@cs.arizona.edu Tech FAQ 0 06-01-2004 04:00 AM
Icon Programming Language FAQ icon-project@cs.arizona.edu Tech FAQ 0 05-01-2004 04:00 AM
comp.lang.eiffel Frequently Asked Questions (FAQ) Franck Arnaud Tech FAQ 0 04-17-2004 08:27 AM
comp.constraints FAQ (Part 1 of 1) pse@cs.unh.edu Tech FAQ 0 04-17-2004 08:23 AM


All times are GMT -4. The time now is 12:11 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.