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 / vignesh1988i
d) is the wrong choice...... because , first variable pa
refers to a address of the array... * of that pa will give
you the first value of the array.. ie a[0] , then that value
will be getting added with 5 and the * which is outside wont
have any value towards this manuplation...... so this will
show an error...... illegal use of pointers.....
thank u
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can you write a programmer for FACTORIAL using recursion?
Is multithreading possible in c?
why programs in c are running with out #include
What is the difference between pure virtual function and virtual function?
What does 4d mean in c?
How can you tell whether a program was compiled using c versus c++?
Why can’t we compare structures?
What is void main () in c?
What is fflush() function?
Why we use conio h in c?
Can you please explain the scope of static variables?
What is the best way to comment out a section of code that contains comments?
Are the variables argc and argv are local to main?
write a c program in such a way that if we enter the today date the output should be next day's date.
about c language