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



Ask a Question

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. Good work!

Few changes: polish oper

View Tutorial          By: Karol Z. at 2010-06-02 09:09:52

2. class loop8
{
public static voi

View Tutorial          By: ankush singh at 2011-11-04 16:26:36

3. gr8 help dude thankx a lot:-)
View Tutorial          By: Mr. Bond at 2011-12-09 19:21:36

4. int iNum2 = parseInt(â0xAâ); //ret
View Tutorial          By: Doug Whitehead at 2008-12-01 21:27:55

5. Please
Can you help me ^-^
I use th

View Tutorial          By: HNO11 at 2011-03-28 11:08:28

6. to know
View Tutorial          By: Parthasarathi.N at 2010-02-19 05:59:51

7. i see that lots of people get this exception : jav
View Tutorial          By: oded at 2008-09-28 03:33:33

8. good one
View Tutorial          By: vij at 2009-06-03 16:00:12

9. I want to know the difference between java and .ne
View Tutorial          By: Jack at 2010-06-10 07:40:35

10. Its really good and helpfull..........
chee

View Tutorial          By: sumit at 2009-04-28 05:17:17