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. Getting coding from this is very easy to me...
View Tutorial          By: shanmugaraja at 2009-09-09 01:50:02

2. Very helpful!!
View Tutorial          By: mahesh at 2012-07-12 06:24:50

3. Great Work for JAVA Beginners
View Tutorial          By: Sudhir Rajgure at 2009-03-01 02:40:00

4. hi.t.join();
wat would make the hi thread

View Tutorial          By: preeti at 2011-07-19 05:28:11

5. Very nice tutorial........
View Tutorial          By: Santosh Saha at 2010-04-11 05:58:51

6. This is so phat. Maybe the best explanation ever t
View Tutorial          By: Devin Prince III at 2010-08-11 10:01:04

7. it is perfectly working...
View Tutorial          By: Venkatesh at 2014-09-21 06:54:39

8. Nice explaination of constructor and destructor. B
View Tutorial          By: Anon at 2009-03-01 03:50:06

9. i want simple program of function used in recursio
View Tutorial          By: manish at 2009-05-19 01:03:19

10. Awesome, I am Impressed with the way the example h
View Tutorial          By: Darshan at 2010-07-09 01:34:22