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

1 Answer

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

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

 

OUTPUT : 4

answered by (283 points)  


Top Users Apr 2017
  1. akash.dinkar12

    3660 Points

  2. Divya Bharti

    2580 Points

  3. Deepthi_ts

    2040 Points

  4. rude

    1966 Points

  5. Tesla!

    1768 Points

  6. Debashish Deka

    1614 Points

  7. Shubham Sharma 2

    1610 Points

  8. Prashant.

    1492 Points

  9. Arjun

    1472 Points

  10. Arunav Khare

    1464 Points

Monthly Topper: Rs. 500 gift card

22,088 questions
28,063 answers
63,298 comments
24,173 users