What will be printed out as a result of the following code execution?
    int * z;
    int  const x = 5;
    z = &x;
    std::cout << z ;
Reference to a constant object x cannot be assigned to a non-constant pointer z

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
C++ quizzes
Sign Up Now
or Subscribe for future quizzes