How do I declare a pointer to an array?

Answer Posted / chittaranjan

int (*ptr)[10];
is the proper declaration of pointer to an array, i.e. ptr
is a pointer to an array of 10 integers .

Note:
int *ptr[10];
which would make ptr the name of an array of 10 pointers to
type int.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is typedf?

896


How can you tell whether a program was compiled using c versus c++?

858


Is it cc or c in a letter?

781


Lists the benefits of c programming language?

839


How can I do peek and poke in c?

859


Why use int main instead of void main?

872


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

839


Explain how does flowchart help in writing a program?

888


Differentiate between functions getch() and getche().

824


Why c is known as a mother language?

855


What do you mean by recursion in c?

871


hi send me sample aptitude papers of cts?

1912


What is the benefit of using const for declaring constants?

823


What does it mean when the linker says that _end is undefined?

874


how to build a exercise findig min number of e heap with list imlemented?

1868