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 / fazlur rahaman naik
d is the right answer.
| Is This Answer Correct ? | 19 Yes | 2 No |
Post New Answer View All Answers
What are dangling pointers? How are dangling pointers different from memory leaks?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
What is an auto variable in c?
What are the types of c language?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What is difference between arrays and pointers?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
application attempts to perform an operation?
When should the const modifier be used?
What is use of pointer?
Write a program to reverse a string.
What is int main () in c?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
What is a good way to implement complex numbers in c?