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:

Java Applets – EMBED IN HTML:



Know better? Leave your own answer in the comments!

Leave a Reply

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