Thread: change pointer of an array

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    83

    change pointer of an array

    I have two arrays.
    char array1[64]="Hello World" //left out bytes are padded with NULL
    char array2[64]="Nothing to see here"//left out bytes are padded with NULL

    Now I want to copy all the contents of array1 to array2 but I don't want to copy the data itself. How can I change the pointer of Array2?

    If there is not a convenient way to do this, please tell me about an pointer array. How to initialise it and all?
    Last edited by Swoorup; 11-27-2011 at 01:37 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Change array length
    By miroslavgojic in forum C Programming
    Replies: 6
    Last Post: 11-28-2010, 08:56 AM
  2. How do you change the size of a global array?
    By kbfirebreather in forum C Programming
    Replies: 10
    Last Post: 10-17-2009, 08:39 PM
  3. Replies: 6
    Last Post: 11-29-2004, 08:50 AM
  4. Change Value in an array
    By beginner999 in forum C Programming
    Replies: 3
    Last Post: 01-18-2003, 07:16 AM
  5. change array size
    By dontknow in forum C++ Programming
    Replies: 6
    Last Post: 04-05-2002, 02:25 PM