Untitled

mail@pastecode.io avatar
unknown
c_cpp
14 days ago
580 B
0
Indexable
Never
#include <iostream>

int main()
{
    int     tabi[ 6 ];
    double  tabd[ 6 ];

    int*        wi;
    double*    wd;

    wi = tabi;            // wi = &tabi[ 0 ]
    wd = tabd;            // wd = &tabd[ 0 ]

    std::cout << "Zmiana ukrytych adresów podczas inkrementacji wskaznikow:\n";
    for( int i = 0; i < 6; ++i, ++wi, ++wd )
    {
        std::cout   << "i = " << i
                    << ") wi = "
                    << wi
                    << ", wd = "
                    << wd
                    << std::endl;
    }

    return 0;
}
Leave a Comment