Multiple choice
1. Given a class called Employee and the following definitions statement.
Void my function ( Employee ‘ eptr):
Employee emp:
Which of the following statement correctly calls the function passing in the address of the data array ?
myFunction(emp;
myFunction(&emp);
myFunction(*emp);
myFunction(**emp);
2. What is the output of the following code snippet?
Int *p;
Int*q;
P= new int;
*p =43;
q = p;
*q=52;
P=new int;
*p =78;
Q= new int;
*q =*p;
Cout <<*p << “ “<<*q<<end1
a. 4352
b. 5278
c. 7878
d. 7852
3. What is the value of data after the following codes executes?
Unsigned char data = 0xA5:
Data = data & 0xF0:
a. 0xA0
b. 0xF0
c. 0xF5
d. 0x5A
4. Which Looping statement is best if the number of iterations is know?
a. if/Else
b. For
c. While
d. Do/While
12 years ago
Purchase the answer to view it
- 3.doc