

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Quiz; Class: Electrical Engr Computations; Subject: Electrical And Computer Engr; University: University of Tennessee - Knoxville; Term: Unknown 1989;
Typology: Quizzes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Quiz #3 10/23/07 Name:____________________
Quiz #3 10/23/07 Name:____________________
int main() { int num = 1; // declare a reference of num, name it as numref int &numref = num; int &numref; numref = num; //wrong // declare a pointer pointing to num, name it as *numptr int numptr = # int * numptr; numptr = # // Ok // increase the value of num by 1 through reference variable numref numref++; // increase the value of num by 1 through pointer variable **numptr numptr++; // wrong ++numptr; // wrong (numptr)++; //ok ++numptr; //ok numptr = numptr+1;//ok }