Q:

Using the variable p write down some declaration

0

Using the variable p write down some declaration

  1. An integer variable.
  2. An array of five integers.
  3. A pointer to an integer.
  4. An array of ten pointers to integers.
  5. A pointer to a pointer to an integer.
  6. A pointer to an array of three integers.
  7. A pointer to a function that takes a pointer to a character as an argument and returns an integer.
  8. An array of five pointers to functions that take an integer argument and return an integer.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

1. int p; // An integer
 
2. int p[5]; // An array of 5 integers
 
3. int *p; // A pointer to an integer
 
4. int *p[10]; // An array of 10 pointers to integers
 
5. int **p; // A pointer to a pointer to an integer
 
6. int (*p)[3]; // A pointer to an array of 3 integers
 
7. int (*p)(char *); // A pointer to a function a that takes an integer
 
8. int (*p[5])(int); // An array of 5 pointers to functions that take an integer argument and

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What are the data types in C?... >>
<< What is the variable in C?...