Various Declarations and Notations in C language

Last Updated :

These are some declarations and notations in the C language. These are summarized in the following table:

Declarations p is a that takes and returns
int *p; pointer to an integer a pointer an integer
int *p[10]; p is a 10 element array of pointer to integer 10 element array of pointer an integer
int (*p)[10]; p is a pointer to a 10-element integer array a pointer integer array
int *p(); p is a function that returns a pointer to an integer function a pointer to an integer
int p(char *a); p is a function an argument as pointer to a character an integer
int *(char *a); p is a function an argument as pointer to a character a pointer to an integer
int (*p) (char *a); p is a pointer to a function an argument as pointer to a character an integer
int (*p (char *a)) [10]; p is a function an argument as pointer to a character a pointer to a 10 element integer array
int p(char (*a) []); p is a function as argument as pointer to a character array an integer
int p(char *a []); p is a function an argument as array of pointers to a characters an integer
int *p(char a []); p is a function an argument as character array a pointer to an integer
int *p(char (*a) []); p is a function an argument as pointer to a character array a pointer to an integer
int *p(char *a []); p is a function an argument as array of pointers to characters a pointer to an integer
int (*p) (char (*a) []); p is a pointer to a function as argument as pointer to a character array an integer
int *(*p) (char (*a) []); p is a pointer to a function an argument as pointer to a character array a pointer to an integer
int *(*p) (char *a []); p is a pointer to a function an argument as array of pointers to characters a pointer to an integer
int (*p [10]) (); p is a 10 element array of pointers to functions each function returns an integer
int (*p [10]) (char a); p is a 10 element array of pointers to functions each functions takes an argument as character an integer
int *(*p [10]) (char a); p is a 10 element array of pointers to functions each function takes an argument as character a pointer to an integer
int *(*p [10]) (char *a); p is a 10 element array of pointers to functions each function takes an argument as pointer to a character a pointer to an integer

These are explained as following below.

  1. p is a pointer to an integer.
    int *p;  
  2. p is a 10 element array of pointer to integer.
    int *p[10];  
  3. p is a pointer to a 10-element integer array.
    int (*p)[10];  
  4. p is a function that returns a pointer to an integer.
    int *p();  
  5. p is a function that takes an argument as pointer to a character and returns an integer.
    int p(char *a);  
  6. p is a function that takes an argument as pointer to a character and returns a pointer to an integer.
    int *(char *a);  
  7. p is a pointer to a function that takes as argument as pointer to a character and returns an integer.
    int (*p) (char *a);  
  8. p is a function that takes an argument as pointer to a character and returns a pointer to a 10 element integer array.
    int (*p (char *a)) [10];  
  9. p is a function that takes as argument as pointer to a character array and returns an integer.
    int p(char (*a) []);  
  10. p is a function that takes an argument as array of pointers to a characters and returns an integer.
    int p(char *a []);  
  11. p is a function that takes an argument as character array and returns a pointer to an integer.
    int *p(char a []);  
  12. p is a function that takes an argument as pointer to a character array and returns a pointer to an integer.
    int *p(char (*a) []);  
  13. p is a function that takes an argument as array of pointers to characters and returns a pointer to an integer.
    int *p(char *a []);  
  14. p is a pointer to a function that takes as argument as pointer to a character array and returns an integer.
    int (*p) (char (*a) []);  
  15. p is a pointer to a function that takes an argument as pointer to a character array and returns a pointer to an integer.
    int *(*p) (char (*a) []);  
  16. p is a pointer to a function that takes an argument as array of pointers to characters and returns a pointer to an integer.
    int *(*p) (char *a []);  
  17. p is a 10 element array of pointers to functions, each function returns an integer.
    int (*p [10]) ();  
  18. p is a 10 element array of pointers to functions each functions takes an argument as character, and returns an integer.
    int (*p [10]) (char a);  
  19. p is a 10 element array of pointers to functions, each function takes an argument as character, and returns a pointer to an integer.
    int *(*p [10]) (char a);  
  20. p is a 10 element array of pointers to functions, each function takes an argument as pointer to a character, and returns a pointer to an integer.
    int *(*p [10]) (char *a);  



Please write comments if you find anything incorrect. A gentle request to share this topic on your social media profile.

Comment
Next Article
Mithlesh Upadhyay Published 10 May, 2020 · 5 min read

Mithlesh Upadhyay is a Computer Science and AI expert from Madhya Pradesh with strong academic background (BE in CSE and M.Tech in AI) and over six years of experience in technical content development. He has contributed tech articles, led teams, and worked in Full Stack Development and Data Science. He founded the w3colleges.org portal for learning resources.

Article Tags :

Similar Reads

  • Four Pillars of Object-Oriented Programming (OOPS)

    Get an overview of four pillars of object-oriented programming (OOP) and see their suitable real life examples. What is OOP? Picture a cluttered garage🛠️. Tools are scattered everywhere,…

    4 min read
  • What is Overriding in C++

    Write a program in C++ to depict the concept of overriding or Dynamic polymorphism. Overriding is a type of polymorphism. Polymorphism in OOP languages means to take more…

    2 min read
  • What should we use void main() or int main() ?

    There is question that what should we use void main() or int main() ? void main() { /* ... */ } Or, int main() { /* ... */…

    2 min read
  • C Comments

    Prerequisite – C Language Introduction C comments explain code and improve readability. These do not affect program execution. You can use comments in C to clarify code and describe…

    1 min read
  • C Programming Language Standard

    Prerequisite – C Language Introduction The C programming language has various versions: C89/C90, C99, C11, and C18. C89/C90: Released in 1989/1990. It introduced key language features. C99: This…

    2 min read
  • Features of C Programming Language

    Prerequisite – C Language Introduction C is a simple language made in 1972 by Dennis Ritchie. It’s for system programming. C has low-level memory access, basic keywords, good…

    1 min read