Comment on Tutorial - Using malloc() Function in C By Abinaya



Comment Added by : leon

Comment Added at : 2012-05-02 19:00:56

Comment on Tutorial : Using malloc() Function in C By Abinaya
First things first, you might want to use malloc(int size_t).
Second and more important is sizeof(char) gives you the size in bytes of a type, this might change someday, and this way you only need to recompile things out. "read about utf 8 and utf 16"
What sizeof does is actually search the type definition in a table and it sees "hmm this type is declared this way,"
Things get cooler with typedef.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. #include<iostream>
#include<conio.

View Tutorial          By: XavioR at 2011-01-31 00:53:11

2. Can anybody tell me how to send and receive SMS us
View Tutorial          By: Bharat Lahori at 2010-02-04 07:14:19

3. it is very nice example of overloading when i read
View Tutorial          By: narendra saini at 2012-04-20 04:03:56

4. excellent
View Tutorial          By: shamim at 2011-07-08 02:39:31

5. Great help
View Tutorial          By: Rajeshvar at 2009-11-04 08:43:09

6. This is the help full sites for diploma student
View Tutorial          By: Tanuja at 2013-08-11 09:41:55

7. Thanks, this is exactly i am looking for. I need t
View Tutorial          By: VictorH at 2009-08-31 16:11:55

8. Yes, as @ Mansi said it's really helpful.
I

View Tutorial          By: Eko SW at 2011-06-22 23:38:22

9. Hi
after i dl the javacomm20-win32.zip and

View Tutorial          By: jm at 2010-05-31 01:42:28

10. Great stuff, learned more from this example than r
View Tutorial          By: David Bandelin at 2011-03-22 07:10:38