Question
int main()
{
int ary[] = {10,20,30}, *p;
p = &ary[0];
int i=0;
while(i<3)
{
printf("%d ", *p);
p++;
i++;
}
return 0;
}
a.
10 10 10
b.
10 20 20
c.
10 20 30
d.
randomvalue randomvalue randomvalue
Posted under C Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of C Program with arrays and pointers?
Similar Questions
Discover Related MCQs
Q. What is the function used to allocate memory to an array at run time with Zero initial value to each?
View solution
Q. What is the function used to allocate memory to an array at run time without initializing array elements?
View solution
Q. Choose a correct Syntax for malloc() function to allocate memory to an array at run time.
View solution
Q. What is the syntax of CALLOC to allocate memory to an array at runtime.?
View solution
Q. What is the dimension of the C array int ary[10][5]?
View solution
Q. Choose a correct statement with array pointers.
View solution
Q. Choose correct statement about C array pointers.
View solution
Q. Difference between C Arrays, ary[10] and cry[10][10] is
View solution
Q. Array of Arrays is also called
View solution
Q. Choose a correct statement about a C Multidimensional array.
View solution
Q. A multidimensional array of dimension N is a collection of
View solution
Q. Choose a correct statement about a Multidimensional array and pointer.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!