/* * Copyright ©2020 Hal Perkins. All rights reserved. Permission is * hereby granted to students registered for University of Washington * CSE 333 for use solely during Spring Quarter 2020 for purposes of * the course. No other use, copying, distribution, or modification * is permitted without prior written consent. Copyrights for * third-party components of this work must be honored. Instructors * interested in reusing these course materials should contact the * author. */ void foo(const int &arg) { } void bar(int &arg) { } int main(int argc, char **argv) { int x = 5; int &refx = x; const int &ro_refx = refx; int y = 0; int *ptry = &y; const int *ro_ptr1 = &y; int *const ro_ptr2 = &y; /* Which of the following lines of code will compile? bar(refx); bar(ro_refx); foo(refx); ro_ptr1 = (int*)0xDEADBEEF; ro_ptr2 = ro_ptr2 + 2; *ro_ptr1 = *ro_ptr1 + 1; */ }