3 Answers
New AnswerC++ : Using sizeof with a string results in the size of whole string. Example:- char str[10]="Sololearn"; cout<<sizeof(str); Output will be 10 (one character occupies 1 byte, so a 10 character string will be of 10 bytes) 🤟
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message