Solved

c & java

Posted on 2003-11-30
5
399 Views
Last Modified: 2013-11-23
C program compliant with ANSI's C standard is platform independent. Then why is only Java considered platform independent?

What is the difference between new/delete and malloc/free?

Which new keyword was introduced in Java from JDK1.4? List some new features expected in JDK 1.5
 How is J2EE different from J2SE?

What is a deployment descriptor in J2EE terminology?  
What is the purpose of a http-servlet?


Can you call the main function of a C program from another C program

When do you use the 'volatile' keyword in Java?


 What is the difference between new/delete and malloc/free?


0
Comment
Question by:sandipmurmu
  • 2
  • 2
5 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 9846240
Sure sounds like homework.
Perhaps the folowing will help some:

1) What is the output of a C compile/link and what does Java produce?

2) What is passed to 'new' and what is passed to 'malloc'?


0
 
LVL 1

Accepted Solution

by:
abhinaysinha earned 20 total points
ID: 9852320
C produces a executable for the operating system, whereas Java produces a executable for the Java Virtual Machine(JVM).It won't matter whether the JVM is installed on windows or unix or Linux, the compiled code will work if the JVM is installed, whereas in C you have to recompile the code to work for the OS.

Regarding new and malloc, new creates the selected object and pass the pointer to the variable, whereas malloc assigns a memory space of any supplied length, and passes a void pointer to the memory to the variable. free and delete will work with there counterparts.
0
 
LVL 22

Expert Comment

by:cookre
ID: 9854779
abhinaysinha - EE has a policy against giving answers to homework.  We can help, but we can't give explicit answers.  My questions were intended to help steer sandipmurmu towards some of the answers.

0
 
LVL 1

Expert Comment

by:abhinaysinha
ID: 9864865
Oops! My mistake. Thanx for the reminder.
0
 
LVL 4

Expert Comment

by:MobileOakAI
ID: 9893821
another abandoned question

I have a different question: How do you write a program that can split 20 points for dividing amongst six or more questions while applying a responsible grade to the honest contributors to the solutions sought avidly?
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
netstat -ano | find "8000" and taskkill /f /pid 2984 3 57
iterator/ListIterator approach 17 27
null output 3 25
How to Convert a Quote to an Order in SalesForce 2 43
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This is about my first experience with programming Arduino.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question