answersLogoWhite

0


Best Answer

char* my_array[3]; /* an array of three pointers to char */

User Avatar

Wiki User

โˆ™ 2016-03-18 21:00:00
This answer is:
User Avatar
Study guides

What is a programming language

What does DOS stand for

What is a software that is distributed for free

What is application software

โžก๏ธ
See all cards
3.77
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
26 Reviews

Add your answer:

Earn +20 pts
Q: How do you declare An array of three pointers to chars?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do declare the following a An array of three pointers to chars b An array of three char pointers c A pointer to array of three chars d A pointer to function which receives an int point?

char* a[3]; char* b[3]; char[3] *c; void(*d)(int*); Note that these are definitions. To make these declarations only, use the keyword 'extern'.


How do you declare An array of three pointers to char?

char * p[3];


How do you declare A pointer to array of three chars?

char c[3]; //array of 3 chars char * p; //pointer of type char p=c; //point the pointer to the base of char array


How do you declare the following An array of three pointers to chars An array of three char pointers A pointer to array of three chars A pointer to function which receives an int pointer?

Please ask just one question at a time!Question 1:How do you declare an array of three pointers to chars?How do you declare an array of three char pointers?Note: both of these questions are merely alternative wordings for the same question.Answer 1:char * a[3];Question 2:How do you declare a pointer to an array of three chars?Answer 2:char a[3]; // an array of three charschar * p = a; // a pointer to an array of three charsQuestion 3:How do you declare a pointer to a function which receives an int pointer?Answer 3:#include // some functions we can point at:void func_1(int * p){}void func_2(int * p){}// note: all functions we wish to point at with the same// pointer must have the same signature.int main(){int* p = NULL; // instantiate an int pointervoid (*pFunc) (int*); // declare a function pointerpFunc = func_1; // point to func_1pFunc(p); // call func_1 via function pointerpFunc = func_2; // point to func_2pFunc(p); // call func_2 via function pointerreturn(0);}Note that the brackets in the function pointer declaration are required. If you omit them, you will end up with a standard function declaration that returns a pointer to void, resulting in a compiler error.


How do you declare an array of three char pointers?

int main() { char *array[3]; // This declares an array of type char*of size 3 // Declare two random chars char example0 = 'X'; char example1 = 'Y'; // You can use the char* array elements just like any regular char* array[0] = example0; array[1] = example1; printf("array[0] = %c, array[1] = %c\n", array[0], array[1]); // Prints X, Y array[0] = example1; array[1] = example0; printf("array[0] = %c, array[1] = %c\n", array[0], array[1]); // Prints Y, X return 0; }


What is the array of three pointers to char?

char *p[3];


How will you declare an array of three function pointers where each function receives two ints and returns a float?

typedef float (*pt_func)(int, int); pt_func arr[3];another way:float (*pt_func[3])(int, int);


How will you declare an array of three function pointers where each function receives two int and returns float?

typedef float (*pt_func)(int, int); pt_func arr[3];another way:float (*pt_func[3])(int, int);


How do you create a pointer to an array of function pointers?

You point at the array the same way you would with an array of any pointer type, by using an additional level of indirection than is employed by the pointers in the array itself. In this case, the array contains pointer-to-function data types (with one level of indirection), thus you must use a pointer-to-pointer-to-function data type (with two levels of indirection) in order to point at the array itself. Had the array contained pointer-to-pointer-to-function data types (where each pointer points to a separate array of pointer-to-function data types), then you'd use three levels of indirection, and so on. You increase the level of indirection by placing an additional asterisk before the pointer's name when you declare the pointer. That is, one asterisk per level.


How many three-pointers did LeBron James make?

he made about 130,000 three pointers


How do you get score 6?

3 two-pointers or 2 three-pointers


How many ways can points be scored in basketball?

three ways, two pointers,three pointers andfoul shots

People also asked