Thread: What is the datatype? -- possible array decay?

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    34

    What is the datatype? -- possible array decay?

    given:

    float numbers[25];

    what is the data type of numbers in the following:

    &(numbers + printf("Hello"));

    I think it would still be an array of floats?

    Thanks

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    It would decay to a pointer to a float.

    Note that what you have posted won't compile since you are trying to get the address of a rvalue.
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    please compile the code before posting and think for some time

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multidimensional Array Addressing
    By BlackOps in forum C Programming
    Replies: 11
    Last Post: 07-21-2009, 09:26 PM
  2. Replies: 16
    Last Post: 05-29-2009, 07:25 PM
  3. Replies: 6
    Last Post: 11-09-2006, 03:28 AM
  4. [question]Analyzing data in a two-dimensional array
    By burbose in forum C Programming
    Replies: 2
    Last Post: 06-13-2005, 07:31 AM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM