#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 |
main() { char p[] = "hello world!"; p = "vector"; printf("%s",p); }
2 Answers Vector, Vector India,
Is a pointer a kind of array?
True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
Does c have an equivalent to pascals with statement?
Explain 'far' and 'near' pointers in c.
Can you return null in c?
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?
Fifty minutes ago if it was four times as many mints past 3 o clock. how many minutes is it to six o'clock n how....?????
Explain what is the benefit of using enum to declare a constant?
How can a number be converted to a string?
which of the function operator cannot be over loaded a) <= b)?: c)== d)*
10 Answers Cisco, CTS, Google, HCL, HP,