Question:

What value does size print out?

#include <iostream>

const int SIZE = 5;

struct tester
{
    int array[SIZE];

    enum 
    {
        SIZE = 3
    };

    void size()
    {
        std::cout << sizeof(array) / sizeof(int);
    }
};

int main(int argc, char** argv)
{
    tester t;
    t.size();
    return 0;
}

Answers:


Keywords:

© 2017 QuizBucket.org