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
How to establish connection with oracle database software from c language?
Explain the difference between #include "..." And #include <...> In c?
provide an example of the Group by clause, when would you use this clause
Subtract Two Number Without Using Subtraction Operator
Write a program of prime number using recursion.
How can a program be made to print the name of a source file where an error occurs?
what is the format specifier for printing a pointer value?
What are runtime error?
What is pointer to pointer in c language?
How can I do graphics in c?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
How do c compilers work?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
what is the significance of static storage class specifier?