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 / yatish m yadav
The wrong answer is
d> *(*pa+5)
here value pointed to by pa is accessed and added 5 to it
then trying to print the value at that address, which gives
us an warning with some garbage value.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is string length in c?
What is the best way to store flag values in a program?
How do you convert strings to numbers in C?
Write a code to remove duplicates in a string.
Is it possible to initialize a variable at the time it was declared?
What is break statement?
What is the difference between far and near ?
How to get string length of given string in c?
What are the 5 organizational structures?
Describe explain how arrays can be passed to a user defined function
How can I get random integers in a certain range?
All technical questions
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What is a #include preprocessor?
The statement, int(*x[]) () what does in indicate?