Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 2 (Q.No. 2)
2.
The first element in a string is
Discussion:
8 comments Page 1 of 1.
Shruti said:
10 months ago
@All
Here, It means that in a string, the first element (at index 0) refers to the very first character of that string.
For example, in the string "hello", the first element is 'h'.
Here, It means that in a string, the first element (at index 0) refers to the very first character of that string.
For example, in the string "hello", the first element is 'h'.
Bhavnish said:
6 years ago
Yes, correct, But can anyone tell me what is the name of an array of the String which contains that String?
Bilal said:
8 years ago
According to the question, the first element of the string. Obviously the first character. But not important in case.
Lakshyajit said:
1 decade ago
We that the best definition of string is "The string is a array of characters terminated with a null character". So the first element of a string is the first character of the string.
Babita said:
1 decade ago
According to question the first element of the string. Obviously the first character.
Ravi said:
1 decade ago
The definition of string is collection of characters ending with null character ('/0'). So obviously, first element would be character.
Hareesh said:
1 decade ago
The answer is the name of the string. Like e.g:string s, s1;
Nisha singh said:
1 decade ago
Please explain me.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers