ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
How do I declare a pointer to an array?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How do I declare a pointer to an array?
Answer
# 1
char (*)p[100];
Here p is a pointer to an array of 100 character elements..
 
Is This Answer Correct ?    0 Yes 0 No
K.thejonath
 
  Re: How do I declare a pointer to an array?
Answer
# 2
data_type (*ptr)[];
ex: int (*ptr)[10];

pointer to arry of 10 elements
 
Is This Answer Correct ?    1 Yes 0 No
Sureshreddy
 
 
 
  Re: How do I declare a pointer to an array?
Answer
# 3
you do not need to declare a pointer to any array..

an array itself is a constant pointer..

a[10] is equivalent to *a.
 
Is This Answer Correct ?    0 Yes 0 No
Shruti
 
  Re: How do I declare a pointer to an array?
Answer
# 4
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 ?    0 Yes 0 No
Guest
 
  Re: How do I declare a pointer to an array?
Answer
# 5
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 ?    0 Yes 0 No
Chittaranjan
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Main must be written as a.the first function in the program b.Second function in the program c.Last function in the program d.any where in the program TCS10
How can I read a directory in a C program?  1
wap in c to accept a number display the total count of digit  4
write the program for prime numbers? TCS7
How to implement variable argument functions ? HP1
Program to display given 3 integers in ascending order N-Tech1
what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7 TCS1
how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0 Wipro2
i want to know aptitude questions,technical questions  1
how to find that no is int or float?  4
explain memory layout of a C program  1
Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack  3
plz answer..... a program that reads non-negative integer and computes and prints its factorial  1
Given an array of characters, how would you reverse it? How would you reverse it without using indexing in the array?  1
#define f(x) main() { printf("\n%d",f(2+2)); }  3
why java is called as a purely oops language.  2
related to rdbms query .  1
what is dangling pointer? LG-Soft1
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); } ADITI2
Which of these statements are false w.r.t File Functions? i)fputs() ii)fdopen() iii)fgetpos() iv)ferror() A)ii B)i,ii C)iii D)iv Accenture3
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com