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. Hello,
I've tried the above code, but I've

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

2. thanks a lot............
View Tutorial          By: mks at 2013-01-03 06:50:05

3. very nice tutorial.
Thanks..

View Tutorial          By: Ramar at 2011-06-16 08:16:14

4. sir i am mca student. i can choose my flatform is
View Tutorial          By: sridevi at 2012-06-06 10:21:39

5. At a writing of the big program in a team comments
View Tutorial          By: vlad at 2011-05-13 12:29:01

6. hi , sending of sms is failing. Please help me in
View Tutorial          By: sudhakar at 2009-06-19 09:39:55

7. It is very helpful, I searched in many websites, b
View Tutorial          By: Anil Vaja at 2013-10-14 17:21:42

8. very very nice...
thanks

View Tutorial          By: ramu at 2010-11-23 23:38:18

9. Can I use my Nokia 6300 as my GSM Modem???? Please
View Tutorial          By: deKi at 2009-03-17 03:54:59

10. Thank you , It is really good for beginners.
View Tutorial          By: Satish Kumar at 2010-01-18 03:06:49