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
will u please send me the placement papers to my mail???????????????????
How many types of operators are there in c?
Why are algorithms important in c program?
Explain data types & how many data types supported by c?
How to declare pointer variables?
What is difference between union and structure in c?
Explain what header files do I need in order to define the standard library functions I use?
What are local variables c?
What is the difference between volatile and const volatile?
How can I implement sets or arrays of bits?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
How can I find the modification date of a file?
How do you declare a variable that will hold string values?
What does nil mean in c?
What is the general form of function in c?