I will start a new project. But I have some simple questions about it :
1) Is the C faster than Java on processes which has no graphic user interfaces (like softwares which are working just from command line) ?
2)Because if the C is faster than Java, I want to make a software which has GUI as Java and C on background processes!? Is this possible ? If it is possible it will work on every OS or not ?
3)What are the differences between 32 bit and 64 bit operation systems ? How can I know that my software will work on 32 or 64 bit ? And especially how much bytes takes an integer on 64 bit and 32 bit exactly ? Or can we do softwares flexible, so they can work on every different 16, 32, 64... systems ? (I know that 32 bit softwares are working on 64 bit windows but there is no possible this some other operation systems :( )
4)How I can start two different process (or functions) at the same time on my software? For example:
if( myinteger== 3) { myfunction1(); myfunction2(); }
I want to start two functions at the same time!


Recommended Answers

All 2 Replies

java is pretty much operating system independent, meaning write it once and run it with no further action on any os that supports java. C and C++ languages are not -- that is you have to compile it for each target operating system. On MS-Windows you could write the C function(s) as a DLL, but that will only run on MS-Windows. If you want to use the same function on *nix then you would have to compile it on a *nix box and probably put them in a shared library (*.so). Then if you want the same on another os you would have to compile the C code on those operating systems too.

Whether it runs faster on a 64-bit computer than it would on a 32-bit computer would depend on the program and the compiler. You will have to run a compiler that can generate 64-bit code, 32-bit compilers such as VC++ 2008 Express can not do that. But you can use 64-bit integers on most modern 32-bit compilers. Here is an article that shows the maximum values of different size integers.

>>I want to start two functions at the same time!
Check out threads.

Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.