#include<stdio.h>
int main(){
int a[]={1,2,3,5,1};
int *ptr=a+4;
int y=ptr-a;
printf("%d",y);
}
Answers were Sorted based on User's Feedback
Answer / harsha
as per my knowledge..4
a is base address of array
every array is a pointer
difference between the pointers is count of data elements ,but not difference between address
y=a+4-a
i.e., y=4
Is This Answer Correct ? | 5 Yes | 0 No |
Give a fast way to multiply a number by 7
15 Answers Accenture, Aricent, Microsoft,
how to find greatet of 10 numbers without using array?
Explain what is gets() function?
What is structure and union in c?
Expand the following LKB BKL FFG
Who is the main contributor in designing the c language after dennis ritchie?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
7 Answers Accenture, Gridco, IBM, Kevin IT, TCS, Vimukti Technologies,
what is the benefit of c30
What is typedef?
How many types of linked lists what are they? How many types of data structures?
18 Answers BSNL, Pivotal Software,
please send me papers for Dy. manager IT , PNB. it would be a great help for me.
write a program in c language for the multiplication of two matrices using pointers?