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
Is c programming hard?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What is c programming structure?
will u please send me the placement papers to my mail???????????????????
What is difference between array and pointer in c?
Difference between exit() and _exit() function?
What is floating point constants?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
What will be the outcome of the following conditional statement if the value of variable s is 10?
Explain the advantages of using macro in c language?
In c programming language, how many parameters can be passed to a function ?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
How does sizeof know array size?
What is the use of getch ()?