#include<stdio.h>
int main(){
int a[]={1,2,3,5,1};
int *ptr=a+4;
int y=ptr-a;
printf("%d",y);
}
Answer Posted / 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 |
Post New Answer View All Answers
Why isnt there a numbered, multi-level break statement to break out
Are enumerations really portable?
Explain 'bus error'?
What functions are in conio h?
Explain how can I remove the trailing spaces from a string?
Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
Explain how do you generate random numbers in c?
What are lookup tables in c?
How will you find a duplicate number in a array without negating the nos ?
what is bit rate & baud rate? plz give wave forms
What is the difference between struct and typedef struct in c?
When can a far pointer be used?
What is a constant and types of constants in c?
How can you increase the size of a dynamically allocated array?