Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 717867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:27:40+00:00 2026-05-14T05:27:40+00:00

Is there any really low level programming language that can get access the memory

  • 0

Is there any really low level programming language that can get access the memory variable directly? For example, if I have a program have a variable i. Can anyone access the memory to change my program variable i to another value?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:27:41+00:00Added an answer on May 14, 2026 at 5:27 am

    As an example of how to change the variable in a program from “the outside”, consider the use of a debugger. Example program:

    $ cat print_i.c
    #include <stdio.h>
    #include <unistd.h>
    
    int main (void) {
        int i = 42;
        for (;;) { (void) printf("i = %d\n", i); (void) sleep(3); }
        return 0;
    }
    $ gcc -g -o print_i print_i.c
    $ ./print_i
    i = 42
    i = 42
    i = 42
    …
    

    (The program prints the value of i every 3 seconds.)

    In another terminal, find the process id of the running program and attach the gdb debugger to it:

    
    $ ps | grep print_i
     1779  p1  S+     0:00.01 ./print_i
    $ gdb print_i 1779
    …
    (gdb) bt
    #0  0x90040df8 in mach_wait_until ()
    #1  0x90040bc4 in nanosleep ()
    #2  0x900409f0 in sleep ()
    #3  0x00002b8c in main () at print_i.c:6
    (gdb) up 3
    #3  0x00002b8c in main () at print_i.c:6
    6           for (;;) { (void) printf("i = %d\n", i); (void) sleep(3); }
    (gdb) set variable i = 666
    (gdb) continue
    

    Now the output of the program changes:

    …
    i = 42
    i = 42
    i = 666
    

    So, yes, it’s possible to change the variable of a program from the “outside” if you have access to its memory. There are plenty of caveats here, e.g. one needs to locate where and how the variable is stored. Here it was easy because I compiled the program with debugging symbols. For an arbitrary program in an arbitrary language it’s much more difficult, but still theoretically possible. Of course, if I weren’t the owner of the running process, then a well-behaved operating system would not let me access its memory (without “hacking”), but that’s a whole another question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 367k
  • Answers 367k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer What about the following: // view public void StartApplication() //… May 14, 2026 at 5:02 pm
  • Editorial Team
    Editorial Team added an answer i guess this works public static void main(String[] args) throws… May 14, 2026 at 5:02 pm
  • Editorial Team
    Editorial Team added an answer Try $(this).id nope, this.id works, no need to create a… May 14, 2026 at 5:02 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.