Questions about C Programs in Linux that can run in Windows

Asked By 40 points N/A Posted on -
qa-featured

Hi,

I am a bit confused and mixing the concepts this question is it possible that those C programs that we can compile and run in Linux environment can also be runnable in Windows. If yes, then which compiler we have to install to compile the code in handouts. 

Can u also tell me that Where we will have to place wait () and signal () operations in the code? And why we place them there?

 It’s a great request to support me in my studies and give me answer of this question as soon as possible.

Thank you.

SHARE
Best Answer by m.smith
Best Answer
Best Answer
Answered By 40 points N/A #128268

Questions about C Programs in Linux that can run in Windows

qa-featured

Hi friend, how are you. Hope you will be fine. My name is M.Smith and doing job in Private Organization. In first part of your question is that you can not compile them using Turbo C or Borland C because they need support of Linux environment. The system calls that you have studied in this course is supported by Linux Kernel. But using Cygwin, you can be able to compile these C programs even in Windows. For the detail of Cygwin, consult the yesterday's announcement on Announcement Page.

Dear the answer of send part of your question is that the Wait and signal are actually used to implement synchronization through semaphores. I will recommend you to first hear the lecture related to semaphore then you will be in a good position to understand the concept of wait and signal operations.

If you have anymore question then contact with me.

Answered By 0 points N/A #128270

Questions about C Programs in Linux that can run in Windows

qa-featured

It depends on code but if you  are using a c++ code and it is major code then you can run it on any operating system to do this you need to compile your file using any c++ compiler and it will treat the file as .exe file.

But if you have written a program for a special purpose and in special environment then it may not work with other environments. A c++ compiler can compile any file that is made with the using the C++ functions and by using the C library if the program is written as some assembly code then it may not work exactly with C language because assembly is a different language and C is a different language.

Related Questions