Thread: A difference between 2 statements related to pointers

  1. #1
    Registered User
    Join Date
    Apr 2016
    Location
    Pakistan
    Posts
    1

    A difference between 2 statements related to pointers

    What is the difference between these two?

    1. int *abc (int, int);
    2. int (*abc) (int, int);



  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    The first is defining a function that has two int parameters and is returning a pointer to an int.

    The second is defining a pointer to a function that has two int parameters and is returning an int.

    Jim

  3. #3
    Registered User
    Join Date
    Mar 2016
    Posts
    110
    Quote Originally Posted by jimblumberg View Post
    The first is defining a function that has two int parameters and is returning a pointer to an int.

    The second is defining a pointer to a function that has two int parameters and is returning an int.

    Jim
    Don't you mean declaring?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question related to for loop statements
    By Debanshu Pani in forum C++ Programming
    Replies: 3
    Last Post: 10-02-2015, 05:17 PM
  2. Another pointers / struct/ array related question
    By patishi in forum C Programming
    Replies: 3
    Last Post: 09-11-2013, 05:25 PM
  3. Pointers related.
    By Helix in forum C++ Programming
    Replies: 4
    Last Post: 08-02-2003, 02:23 PM
  4. Related to Pointers
    By Extol in forum C++ Programming
    Replies: 4
    Last Post: 02-27-2003, 08:41 PM
  5. Question related to array and pointers
    By Q4u in forum C++ Programming
    Replies: 6
    Last Post: 07-26-2002, 12:54 PM

Tags for this Thread