question on C programming dynamic memory allocation…..?

Question by cold_cold_cool: question on C programming dynamic memory allocation…..?
I am writing an algorithm for embedded processor. Is it wise to dynamically allocate memory to arrays using malloc() or should I define it at the beginning of the whole program?

Best answer:

Answer by Chris
I always use malloc unless I’m sure of the array size and even then if I’m not going to fill the array every time I still use malloc. Just make sure to test for success and free up whatever you can when you’re done with it.

Give your answer to this question below!
Question by : What program do I use to create an embed code to embed a java applet into html?

Best answer:

Answer by Ron
Normally you can use the object tags which replaced the applet tags for Java applets.

Using applet, object and embed Tags: http://download.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/using_tags.html

Java Applets – EMBED IN HTML: http://www.echoecho.com/applets01.htm

: http://java.sun.com/products/jsp/syntax/1.2/syntaxref1215.html

Ron

Know better? Leave your own answer in the comments!

Leave a Reply

Your email address will not be published. Required fields are marked *


*