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. download jdk
View Tutorial          By: alireza esfandyarinezhad at 2011-03-07 11:52:55

2. So I appreciate this website, however... would it
View Tutorial          By: Christina at 2013-02-06 16:46:12

3. Hi I would like to get help with a client-server d
View Tutorial          By: lolaFireBird at 2012-06-29 08:04:31

4. The Compleate Reference
JAVA Seventh Editi

View Tutorial          By: joshap at 2014-10-25 12:05:41

5. would you please send me a code that can be run pl
View Tutorial          By: putra at 2008-12-17 13:26:26

6. As C does not support Function Overloading, there
View Tutorial          By: N at 2013-03-06 00:27:14

7. Guys, txtWeb is back with their National Level Dev
View Tutorial          By: rahul.del at 2012-08-16 10:01:09

8. Hello,
I've tried the above code, but I've

View Tutorial          By: Phyo Phyo at 2009-09-14 05:32:28

9. Hello
thanks for nice tutorial. I have one

View Tutorial          By: Chanchal Prajapat at 2015-02-09 06:10:42

10. i want to know how to read a file inside zipfile.<
View Tutorial          By: iman at 2009-11-26 12:50:21