Tuesday, September 6, 2011

C VS JAVA Common Sense Questions

Dear Reader, you would already come across C technical questions on CareersValley. However, the below questions are slightly different which requires you to apply your logical skills along with knowledge in concepts.

Question 1

Consider a mobile phone manufacturer who wishes that developers should be able to run JAVA and C programs on his phone. He then instructs his OS team to have a JVM installed to run JAVA applications. Now, on similar lines, is there anything he should do to ensure C programs will run hassle free ?

Answer 1

There is no such thing as JVM for C as C program would be compiled directly to executable that would run directly on the mobile phone's OS. However, he should ensure that a compiler version exists that could covert C programs to executable that can run on his mobile OS.

Question 2

Consider a security expert dealing with JAVA and C programs on a server. He is very much worried about new C programs rather than JAVA programs that are to be executed on the machines he is dealing with. What could be a possible reason for this ?

Answer 2

JAVA programs run on JVM and not directly on OS and hence JVM can take care of many security issues like illegal system calls to OS. However, C programs run directly on OS and hence the detection of illegal system calls becomes more difficult.


Question 3

Which is easier, migrating a JAVA application to a C application or migrating from C to JAVA ? Give Reasons.

Answer 3

On a broad sense, one has to agree that migration from C to JAVA is easier than from JAVA to C. This is partly because of the extra features supported in JAVA like powerful GUI. Also any C program can be migrated to JAVA without much change in algorithm whereas it would take considerable time to change the algorithm when migrating JAVA OOP programs as C does not support OOP.
Enhanced by Zemanta

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Justin Bieber, Gold Price in India