Computer Science, asked by diddivarunteja3355, 1 year ago

Write the name of functions which : (i) returns length of a string (ii) returns specified number of character from a string.

Answers

Answered by amannishad0512p5zxh6
1

(i)  length()

For ex-  String a="Sunny Leone";

   int l= a.length();

Output :- 11  (it also count space )

(ii)   substring()           // it does not include upper index bound

i-for ex-   String  t="Aftab Ahmed Ansari";

String  b= t.substring(0,3);

Output :-   Aft        

ii-  String t="Raftaar Is the Best"  ,k;

k=t.substring(9);

Ouptut :-  s the Best

Hope it will help

mark me brainlest @

Similar questions