#include<stdio.h>
int main(){
int i=10;
int *ptr=&i;
*ptr=(int *)20;
printf("%d",i);
return 0;
}

Output: 20
can anyone explain how came the output is 20


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

Rapunzel walks into the forest of forgetfullness. She meets a Lion who lies on Monday Tuesdays and Wednesdays and meets a rabbit who lies on Thurs fridays and saturdays . On that day both say that "I lied yesterday". What day is it .

3 Answers   TCS,


What is an example of structure?

0 Answers  


An entire structure variable can be assigned to another structure variable if __________

3 Answers   Sasken, TCS, Tech Mahindra, Wipro,


Is null equal to 0 in sql?

0 Answers  


In CMM or CMMI certified organizations,we assess only the standard software processes of the organization. We do not assess the organizations other functional departments like HR or Admin. Then how can we certify the entire organization as CMM level company?? We have assessed only software related activities. Right. There is no relation with other departments like Accounts, HR or Admin. Then how can we claim that the whole company is a CMM certified company?

1 Answers   Melstar,






how will you write a program on linked lists using JAVA programming???????????

1 Answers   Keane India Ltd,


WAP that prints the number from 1 to 100. but for multiplies of three print "XXX" instead of the number and for the multiplies of five print "YYY" . for number which are multiplies of both three and five print "ZZZ"

3 Answers  


write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.

6 Answers  


What are local static variables?

0 Answers  


What’s a signal? Explain what do I use signals for?

0 Answers  


How do you use a 'Local Block'?

0 Answers   Ericsson,


what is a stack

3 Answers  


Categories