My assumption here is that you're using the verbiage .exe file to indicate a binary executable which was generated by a compiler to run on Linux. Because what you wrote doesn't sound accurate:
I executed a C program in a linux terminal,then the generated .exe file
What I'm thinking is that you "wrote" a C program, "compiled" it in a terminal shell and the result was an executable file.
Question #1 is did that file run at the time it was created?
Next, after you copied the file, there are several things which you need to check on the other system.
1. What is the user name on that other system which you're using? What group is that user part of?
2. When you copied the file over, which username ended up owning the file? What were the file's full attributes insofar as privileges, ownership, and group?
If you perform "ls -l" from the directory in which that file is located, you'll see the information I'm indicating.
For instance, here is an example of something that likely would not work.
me@my-desktop:~/testcode$ ls -l
-rwxr--r-- 1 root root 294912 2012-09-25 12:05 binary-tool
-rwxr-xr-x 1 me users 1220 2012-03-06 14:24 crc-tool
I made that up from a general ls command, my points here are:
Logged in as "me", I can see binary-tool; however the permissions are the left-most chunk of that, nothing is a symbolic link or a directory, that's the first dash "-", then you see tri-groups of permissions for "owner", "group", and "world". Followed by owner name and group name.
binary-tool is owned by root, and is in the group root.
binary-tool has permissions for owner to be rwx = read, write, execute
binary-tool has permissions for group and world to be r-- = read
crc-tool is owned by me, and is in the group users.
crc-tool has permissions for owner to be rwx = read, write, execute
crc-tool has permissions for group and world to be r-x = read, execute
This all means that user "me", which is "who I'm logged in as for purposes of my example" can "see" binary-tool, but cannot delete it, nor run it. However "me" owns crc-tool, can read it, write it (and thus delete it), and can execute it.
It is possible that a file can be placed into your user directory which you do not own, nor do not have access, nor privileges too.
If this is the case, then you need to use things (logged in as root, or using sudo) like "chown" - to change owner, "chgrp" - to change the group, and "chmod" - to change the file privileges.
You may not be able to run this because you may either not be able to execute it, nor even access it as the user you are logged in as. And even if you're root, if the file is owned by "nobody" in group "nowhere" it may still be inaccessible if the privileges are "-r--r--r--", where you can see it, but do little else.
The $PATH variable is important; however in order to run anything from within the directory where you are at in your shell, you can always do, "./binary-tool", and that will run it.
In the particular case I've shown here, I would do the following:
sudo chown me binary-tool
sudo chgrp users binary-tool
chmod 755 binary-tool
However you may need to do things differently depending on what your situation is.
If you find that you either don't understand, or still cannot resolve; please perform "ls -l" in the directory where your binary executable is located so that we can see the attributes of the file, and also relate your environment by typing "env" and pasting the output of that into a message here as well.