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. Can you give me an example to create InetAddress f
View Tutorial          By: Vaibhav at 2009-12-15 23:37:49

2. I get this error too, but my scrit doesint use mys
View Tutorial          By: Paulius at 2009-04-29 12:35:55

3. i am developing a video streaming pc server to j2m
View Tutorial          By: ziathegreat at 2009-05-19 13:19:15

4. Thanks for providing detailed information .
View Tutorial          By: CM Mankar at 2008-03-18 04:37:03

5. hi....!
This program is working well in co

View Tutorial          By: param at 2014-10-15 07:02:49

6. Your answer was right on the money! After searchi
View Tutorial          By: ooh la la at 2013-07-19 20:33:41

7. simply nice.. Thank you.
View Tutorial          By: Anil at 2011-11-30 06:36:23

8. can u give a gud example on command line arguments
View Tutorial          By: shravan at 2010-04-09 23:11:18

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

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

10. i need scjp questions and information
View Tutorial          By: raja at 2010-03-29 08:05:35