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 list a file’s date and time?

825


What is an lvalue?

848


Why ca not I do something like this?

792


What does typedef struct mean?

856


Where register variables are stored in c?

758


What is #define?

801


If I have a char * variable pointing to the name of a function ..

917


What do you mean by keywords in c?

894


What is the use of clrscr?

801


Can we assign string to char pointer?

818


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2290


How many types of arrays are there in c?

790


What is printf () in c?

792


Explain why c is faster than c++?

822


Write a program to print factorial of given number using recursion?

796