declare
str varchar2(80):='&str';
ab char:='&ch';
i number;
l number;
c number;
begin
l:=length(str);
for i in 1..l loop
if (substr(str,i,1=ab) then
c:=c+1;
end if;
end loop;
dbms_output.put_line('legnth of the string '||l);
dbms_output.put_line('no.of times repeated '||c);
end;