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 |
1 1 12 21 123 321 12344231 how i creat it with for loop??
Why c is called a mid level programming language?
what is the c source code for the below output? 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1
Write a c program to Find the name that you entered is male name or female name? Such as Sunjay is name of male and Payal is name of female
Write a c program to demonstrate Type casting in c?
Which weighs more, a gram of feathers or a gram of gold?
wat is the output #define VOLEDEMORT _who_must_not_be_named int main() { printf("VOLEDEMORT"); }
Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1
What does stand for?
int *p=20; if u print like dis printf("%d",p); o\p:- 20; how is it possible? plz give me the explanation.
atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...