#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 |
Explain enumerated types.
write an algorithm to get a sentence and reverse it in the following format: input : I am here opuput: Here Am I note: first letter of every word is capiatlised
how to print this sereis 2 4 3 6 5..........?
Reverse a string word by word??
how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......
Describe static function with its usage?
What are disadvantages of C language.
c program to print a name without using semicolon
What is the acronym for ansi?
What is difference between scanf and gets?
how can u print a message without using any library function in c
Explain what is the benefit of using enum to declare a constant?