GATE CSE
First time here? Checkout the FAQ!
x
0 votes
54 views
Which functions of string include the null terminator '\0'? I know strlen() doesn't include the '\0' in giving the length, does anyone know which other functions include and which do not include?
asked in Programming by Loyal (3.8k points)  
retagged by | 54 views
try sizeof() :)

1 Answer

+1 vote
char includeNull[] = "hii";

printf("%d", sizeof(includeNull));

 

OUTPUT : 4

answered by (283 points)  


Top Users Sep 2017
  1. Habibkhan

    6334 Points

  2. Warrior

    2202 Points

  3. Arjun

    2150 Points

  4. nikunj

    1980 Points

  5. manu00x

    1726 Points

  6. SiddharthMahapatra

    1718 Points

  7. Bikram

    1706 Points

  8. makhdoom ghaya

    1650 Points

  9. A_i_$_h

    1518 Points

  10. rishu_darkshadow

    1512 Points


25,979 questions
33,554 answers
79,348 comments
31,011 users