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

#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

1002


Why is not a pointer null after calling free?

779


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

780


What is sizeof int?

837


what is event driven software and what is procedural driven software?

2272


What is a function simple definition?

844


What does 4d mean in c?

1224


What is character constants?

899


What are comments and how do you insert it in a C program?

972


What is a structure in c language. how to initialise a structure in c?

832


What does the && operator do in a program code?

942


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1504


Why does this code crash?

835


What is %d called in c?

943


Place the #include statement must be written in the program?

766