How do I declare a pointer to an array?
Answers were Sorted based on User's Feedback
Answer / sureshreddy
data_type (*ptr)[];
ex: int (*ptr)[10];
pointer to arry of 10 elements
| Is This Answer Correct ? | 14 Yes | 3 No |
Answer / 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 |
Answer / guest
could any one help me out how this pointer to an array
organized in the memory?
Eg.,
int (*p) [3] = (int (*)[3])a;
Here *p == p, how?
Thanks in advance!
| Is This Answer Correct ? | 3 Yes | 4 No |
Answer / k.thejonath
char (*)p[100];
Here p is a pointer to an array of 100 character elements..
| Is This Answer Correct ? | 6 Yes | 11 No |
How can I rethow can I return a sequence of random numbers which dont repeat at all?
WHAT IS INT?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What is the difference between NULL and NUL?
Explain the difference between exit() and _exit() function?
how to count no of words,characters,lines in a paragraph.
what is the difference between #include<> and #include”…”?
What is the description for syntax errors?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
You have an array of n integers, randomly ordered with value 1 to n-1.The array is such that there is only one and one value occurred twice. How will you find this number?
What is gets() function?
An array name contains base address of the array. Can we change the base address of the array?