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 ? | 36 Yes | 3 No |
Post New Answer View All Answers
What is c language used for?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
write a c program for swapping two strings using pointer
Write a program to check whether a number is prime or not using c?
What are c header files?
How to implement a packet in C
Can you please compare array with pointer?
What is typedef?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
Is array a primitive data type in c?
Write a program to print "hello world" without using a semicolon?
Under what circumstances does a name clash occur?
What is #line in c?
What is d'n in c?
I have seen function declarations that look like this