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
Who invented bcpl language?
Why do we use & in c?
What do you understand by normalization of pointers?
Explain what is wrong with this statement? Myname = ?robin?;
How would you obtain the current time and difference between two times?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
What is modifier & how many types of modifiers available in c?
Why doesnt this code work?
Is c++ based on c?
Which programming language is best for getting job 2020?
What is data type long in c?
What does c mean before a date?
What are multibyte characters?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What is a stream water?