Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to write a data 10 in address location 0x2000

Answers were Sorted based on User's Feedback



how to write a data 10 in address location 0x2000..

Answer / vishnu

int main()
{
int *ptr;
ptr = (int *)0x2000;
*ptr = 10;
printf("%d", *ptr);
}

Is This Answer Correct ?    5 Yes 1 No

how to write a data 10 in address location 0x2000..

Answer / vatsava

int main()
{
int *ptr;
ptr = (int *)2000;
*ptr = 10;
printf("%d", *ptr);
}

Is This Answer Correct ?    1 Yes 0 No

how to write a data 10 in address location 0x2000..

Answer / vadivel t

The below line u can use for the question asked, provided
the address is not pointing to any OS memory, system files
or any location on ROM memory.

0x2000 is invalid address(Access voilation)in my system. So
I tried with the valid address 0x12FF70 to get the o/p.

main()
{
*(int *)(0x12FF70)= 20;
printf("%d \n",*(int *)(0x12FF70));
getch();
}

O/p would be 20.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

Here is a good puzzle: how do you write a program which produces its own source code as output?

0 Answers  


What is difference between Structure and Unions?

0 Answers   TISL,


What is the symbol indicated the c-preprocessor?

0 Answers  


why we wont use '&' sing in aceesing the string using scanf

0 Answers   HCL,


How can I find the modification date and time of a file?

0 Answers  


what does exit() do?

3 Answers   Cadence,


void main() {int i=2; printf("%d%d%d",i,++i,i++); getch(); }

9 Answers  


Write a routine that prints out a 2-D array in spiral order!

1 Answers   Lucent,


Explain what is output redirection?

0 Answers  


How to print "I Love My India" without using semi colon?

4 Answers  


Using which language Test cases are added in .ptu file of RTRT unit testing???

0 Answers  


Tell me can the size of an array be declared at runtime?

0 Answers  


Categories