C++ programming on UNIX platforms

  1. What is a Make file?(Fujitsu) Make file is a utility in Unix to help compile large programs. It helps by only compiling the portion of the program that has been changed.
  2. What is deadlock? (Novell) Deadlock is a situation when two or more processes prevent each other from running.Example: if T1 is holding x and waiting for y to be free and T2 holding y and waiting for x to be free deadlock happens.
  3. What is semaphore? (Novell) Semaphore is a special variable, it has two methods: up and down. Semaphore performs atomic operations, which means ones a semaphore is called it can not be inturrupted.
  4. Is C an object-oriented language? (Microsoft) C is not an object-oriented language, but limited object-oriented programming can be done in C.
  5. Name some major differences between C++ and Java. C++ has pointers; Java does not. Java is platform-independent; C++ is not. Java has garbage collection; C++ does not.
This entry was posted in C++. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

5 Comments on C++ programming on UNIX platforms

  1. Slink
    Posted 1/14/2004 at 7:14 pm | Permalink

    #5 is slightly incorrect. Java does have pointers. In fact all variables in Java are pointers. The difference is that Java does not allow you to manipulate the addresses of the pointer

  2. Posted 1/14/2004 at 7:18 pm | Permalink

    Right you are.

  3. NIck Urbanik
    Posted 5/27/2004 at 12:50 pm | Permalink

    Question 1 is poor. The question asks about “a Make file”, but the asnwer is actually asking about the make program. A Makefile (one word) is the file make uses to determine what rules to apply. make is useful for far more than compiling programs.

  4. harko
    Posted 4/14/2005 at 7:59 am | Permalink

    #3 You left out the most important feature of a semaphore: the internal counter (= #ups - #downs) can never be negative. If you execute the “down” method when the internal counter is zero, it will block until some other thread calls the “up” method. Semaphores are use for thread synchronization.

  5. Posted 11/16/2006 at 3:59 pm | Permalink

    Correction to the answer,

    Java compiled byte codes are OS independent,
    C/C++ compiled binaries are OS dependent,

    But as the language is neutral, again C++ implementation varies by vendor, like GNU C++, MS C++, Intel C++ and etc vary greatly. it is not just specific to the OS but also the vendors(since MS never obeys anything, always lacks the standard).

    But Java being controlled by one vendor it still stands as one standard.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*