The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
61 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 (4.1k points)
retagged by | 61 views
try sizeof() :)

1 Answer

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

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

 

OUTPUT : 4

answered by (293 points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,017 questions
36,844 answers
91,378 comments
34,721 users