#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 |
What is a nested loop?
Sir,please help me out with the output of this programme:- #include<stdio.h> #include<conio.h> void main() { int a=18,b=12,i; for(i=a<b?a:b;a%i||b%i;i--); printf("%d %d",i); }
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
Can we access RAM? How? Whats the range of access? Similarly What are other hardware we can access?
What are the valid places to have keyword “break”?
find the size of structure without using the size of function
write a code for large nos multilication (upto 200 digits)
Why is struct padding needed?
Write a program to identify if a given binary tree is balanced or not.
What is volatile, register definition in C
What is the difference between functions abs() and fabs()?
What is meant by int main ()?