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 / karthik
void main()
{
int a[50]={1,2,3,4,1,55};
int *pa;
pa=a
printf("%d",*(pa+5));
}
we will the sixth element
its not pointer to the pointer ie *(*pa+5);
| Is This Answer Correct ? | 38 Yes | 4 No |
Post New Answer View All Answers
What are the advantages of using Unions?
Explain the use of function toupper() with and example code?
What are shell structures used for?
What is realloc in c?
What is the difference between malloc() and calloc() function in c language?
What is a constant and types of constants in c?
What is mean by data types in c?
What is the difference between fread buffer() and fwrite buffer()?
What is the scope of an external variable in c?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
Add Two Numbers Without Using the Addition Operator
why wipro wase
Explain what are the standard predefined macros?
How are pointers declared in c?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none