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 8375137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:05:45+00:00 2026-06-09T15:05:45+00:00

I am a java programmer, but i have few things to be done in

  • 0

I am a java programmer, but i have few things to be done in C. So, i started with a simple example as below. If i have compiled it and generate a executable file (hello), can i run the executable file (hello) in any unix platform without the original file (hello.c)? And also is there a way to read the data from executable file means, decompile the executable file to original file (hello.c)?

[oracle@oracleapps test]$ cat hello.c
#include <stdio.h>
int main(){
int i,data =0;
for(i=1;i<=64;i+=1){
data = i*2;
printf("data=%d\n",data);
}
return 0;
}

To compile

gcc -Wall -W -Werror hello.c -o hello
  • 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-06-09T15:05:47+00:00Added an answer on June 9, 2026 at 3:05 pm

    You can run the resulting executable on platforms that are ABI-compatible with the one which you have compiled the executable for. ABI-compatibility basically means that the same physical processor architecture and OS-interfaces (plus calling convention) is used on two (possibly different) OSes. For example, you can run binaries compiled for Linux on a FreeBSD system (with the same processor type), because FreeBSD includes Linux ABI-compatibility. However, it may not be possible to run a binary on all other types of Unices, unless some hackery is done. For example, you can’t run Mac OS X applications on linux, however this guy has a solution with which it’s possible to use some OS X command line tools (including the GCC compiler itself) on Linux.

    Reverse engineering: there are indeed decompilers which aim to generate C code from machine code, but they’re not (yet) very powerful. The reason for this is they’re by nature extremely hard to write. Machine code patterns have to be recognized, and even then you can’t gather all the original info. For example, types of loops, comments and non-static local variable names and most of the types are all gone during the compilation process. For example, if you have a C source file like this:

    int main(int argc, char **argv)
    {
        int i;
        for (i = 0; i < 10; i++)
        {
            printf("I is: %d\n", i); /* Write the value of I */
        }
    
        return 0;
    }
    

    a C decompiler may be able to reconstruct the following code:

    int main(int _var1, void *_var2)
    {
        int _var3 = 0;
        while (_var3 < 10)
        {
            printf("I is: %d\n", _var3);
            _var3 = _var3 + 1;
        }
    
        return 0;
    }
    

    But this would be a rather advanced decompiler, such as this one.

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

Sidebar

Related Questions

I have been a Java programmer for years but only iPhone/Obj-c for a few
I am a Java programmer and I know a few things about threading int
I'm a 15-year-old programmer, and I have been programming for a few years, but
my host (one.com) doesn´t support java webapps. But I have a java programm that
I'm an experienced Java programmer but am looking at some JavaScript/HTML5 stuff for the
I am relatively new to PHP, but experienced Java programmer in complex enterprise environments
I'm a java programmer switching over to C++. I have a list of data
So far I have been writing programs in Java. So when I started C++,
I'm doing a few mock test for my Oracle Certified Java Programmer certification. One
I am mostly a Java and AS3 programmer but right now I am working

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.