If variable p has type char*, then expression *p has type
What is the value of variable x after performing the following sequence of statements?
int x = 50; int* p = &x; *p = 4;
What is the value of variable x after performing the following sequence of statements?
int y = 7; int x = 35; int* p = &x; p = &y;
What does jump( ) return, where jump is writtten below, using function jumpHelper?
void jumpHelper(int x) { x = x + 1; } void jump() { int z = 40; jumpHelper(z); return z; }
What does hop( ) return, where hop is writtten below, using function hopHelper?
void hopHelper(int& x) { x = x + 1; } void hop() { int z = 40; hopHelper(z); return z; }
What does romp( ) return, where romp is written below, using function rompHelper?
void rompHelper(int a, int& b) { b = a + 2; a = b + 1; } int romp() { int x = 4; int y = 25; rompHelper(x,y); return x + y; }
Which of the following will create an array of 30 integers called Orange in C++?
Which of the following correctly sets all variables in array Orange from the preceding problem to hold 0?
Suppose that array A has been created by statement
int A[4];What is in array A after performing the following statements? Work this out carefully.
for(int i = 0; i < 4; i++) A[i] = i; for(int i = 1; i < 4; i++) A[i] = A[i-1] - 1;