//przeciazenie funkcji
#include <iostream.h>
int PrintArray(char tab[], int d, int a=0, int b=0)
{
     if(a<0 || b>d || a>b )
     {
      return 0;
     }
     else
     for(int i=a;i<b;i++)
     {
      cout<<tab[i];
     }
     cout<<endl;
     return (b-a);
}
int PrintArray(float tab[], int d, int a=0, int b=0)
{
     if(a<0 || b>d || a>b )
     {
      return 0;
     }
     else
     for(int i=a;i<b;i++)
     {
      cout<<tab[i]<<" ";
     }
     cout<<endl;
     return (b-a);
}
int main(int argc, char * argv[])
{
    char tab_c[]="tekst jest dlugi";
    float tab_f[]={1.2,2.6,6.4,7.0,1.3,6.4,5.5};
    int a,b;
    a=1;
    b=5;
    int d=sizeof(tab_c);
    int df=sizeof(tab_f)/sizeof(float);
    cout<<"Ilosc wyswietlonych elementow z tab_c: "<<PrintArray(tab_c,d,a,b);
    cout<<endl;
    cout<<"Ilosc wyswietlonych elementow z tab_f: "<<PrintArray(tab_f,df,a,b);
    cout<<endl;
    system("pause");
    return 0;
}
