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 / jaya prakash
Answer is D.
It is not a pointer to pointer.So we cannot use two stars.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
What library is sizeof in c?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
Compare and contrast compilers from interpreters.
What is wild pointer in c?
Why do we use return in c?
What is hashing in c?
What are the advantages of union?
Explain a pre-processor and its advantages.
How can I write functions that take a variable number of arguments?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
How can I read data from data files with particular formats?
Can i use “int” data type to store the value 32768? Why?
What is formal argument?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?