given the piece of code
int a[50];
int *pa;
pa=a;
to access the 6th element of the array which of the
following is incorrect?
a.*(a+5)
b.a[5]
c.pa[5]
d.*(*pa + 5)
Answer Posted / karthik
void main()
{
int a[50]={1,2,3,4,1,55};
int *pa;
pa=a
printf("%d",*(pa+5));
}
we will the sixth element
its not pointer to the pointer ie *(*pa+5);
| Is This Answer Correct ? | 38 Yes | 4 No |
Post New Answer View All Answers
Why is #define used?
What are the advantage of c language?
How can I generate floating-point random numbers?
What are the restrictions of a modulus operator?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
What is header file in c?
What are the data types present in c?
What is pass by value in c?
What is the condition that is applied with ?: Operator?
What is volatile, register definition in C
How is actual parameter different from the formal parameter?
What is hashing in c language?
largest Of three Number using without if condition?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
string reverse using recursion