GATE CSE
First time here? Checkout the FAQ!
x
0 votes
39 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.6k points)   | 39 views
try sizeof() :)

1 Answer

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

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

 

OUTPUT : 4

answered by (283 points)  


Top Users Mar 2017
  1. rude

    4018 Points

  2. sh!va

    2994 Points

  3. Rahul Jain25

    2804 Points

  4. Kapil

    2606 Points

  5. Debashish Deka

    2092 Points

  6. 2018

    1414 Points

  7. Vignesh Sekar

    1318 Points

  8. Bikram

    1218 Points

  9. Akriti sood

    1166 Points

  10. Sanjay Sharma

    1004 Points

Monthly Topper: Rs. 500 gift card

21,439 questions
26,753 answers
60,919 comments
22,929 users