Pointers

Pointers

Assessment

Quiz

Professional Development

Medium

Created by

deepa dspuc

Used 3+ times

FREE Resource

Student preview

quiz-placeholder

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1) Given int *ptr, x=50; which is the correct way to assign address of x variables to the pointer?

a) Ptr=x;

b) ptr=*x;

c) x=ptr;

d) ptr=&x;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2) Which unary operator returns the value of the variable located at the address specified by its operand?

a) Indirection(*) operator

b) address of (&) operator

c) ++ operator

d) --operator

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3) Which one of the following operators can be applied to the pointer variables?

a) division

b) multiplication

c) increment

d) None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4) A pointer to the current object is called

a) This pointer

b) Array of pointer

c) Array of object

d) None of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5) Which one of the following is unsupported C++ expression with respect to pointer ptr ?

a) ptr+80

b) ptr++

c) ptr-100

d) ptr * 100

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6) Which one of the following is valid C++ expression with respect to pointer ptr1 and ptr2 ?

a) ptr1 +ptr2

b) ptr1 * ptr2

c) ptr1 + 5

d) ptr1 / 8

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7) Which operator is called reference operator

a) *

b) &

c) #

d) ::

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?