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

1 Answer

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

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

 

OUTPUT : 4

answered by (283 points)  
Top Users Feb 2017
  1. Arjun

    4898 Points

  2. Bikram

    4102 Points

  3. Habibkhan

    3748 Points

  4. Aboveallplayer

    2986 Points

  5. sriv_shubham

    2288 Points

  6. Smriti012

    2222 Points

  7. Arnabi

    1946 Points

  8. Debashish Deka

    1920 Points

  9. mcjoshi

    1614 Points

  10. sh!va

    1462 Points

Monthly Topper: Rs. 500 gift card

20,793 questions
25,951 answers
59,557 comments
21,976 users