how to write a data 10 in address location 0x2000

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you redirect a standard stream?

628


how to build a exercise findig min number of e heap with list imlemented?

1614


Explain how does flowchart help in writing a program?

636


write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.

3343


Explain high-order and low-order bytes.

671






What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

672


Can you please explain the difference between syntax vs logical error?

699


c program for searching a student details among 10 student details

1658


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

1580


What is use of null pointer in c?

572


Explain continue keyword in c

590


Can a file other than a .h file be included with #include?

688


Explain what does it mean when a pointer is used in an if statement?

621


How many types of errors are there in c language? Explain

575


Give differences between - new and malloc() , delete and free() ?

614