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. what is the output
View Tutorial          By: Raja at 2012-12-28 11:47:48

2. Hi Sir...
sir i am a student and I am worki

View Tutorial          By: shanthi at 2013-03-22 11:01:15

3. thumbs up!
View Tutorial          By: huang at 2013-03-28 04:02:33

4. hi how ru
anybody tell me that how to print

View Tutorial          By: imran at 2010-12-10 00:34:51

5. good
View Tutorial          By: [email protected] at 2014-08-28 14:02:28

6. hello
i am developing a budget application

View Tutorial          By: anu at 2010-04-16 04:26:36

7. This program is mush faster and finer than given p
View Tutorial          By: Anonymous at 2013-02-27 05:38:27

8. I was using commons-logging-1.0.4.jar previously,
View Tutorial          By: Pradeep at 2009-09-29 06:39:21

9. great work..keep it up.
View Tutorial          By: faizaan at 2011-04-29 12:23:39

10. hello

my problem is how to intrega

View Tutorial          By: mihir patel at 2013-11-28 18:10:04