#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 / sridhar

1

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I read in an object file and jump to locations in it?

563


Explain can static variables be declared in a header file?

665


How can you convert integers to binary or hexadecimal?

604


What is the difference between far and near in c?

588


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

658






What is the explanation for the dangling pointer in c?

664


What is modifier & how many types of modifiers available in c?

596


Explain what math functions are available for integers? For floating point?

600


What is cohesion and coupling in c?

579


Explain how do you print an address?

646


Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.

3681


What is extern c used for?

560


What is storage class?

644


How can I implement a delay, or time a users response, with sub-second resolution?

611


What does the && operator do in a program code?

686