# Answer to Question #22814 in C++ for Sujata Roy

Question #22814

Consider the following program segment

char*a, *b, c[10], d[10];

a = b; b = c; c = d; d = a;

choose the statements having errors

Answer options:

A. No error

B. a = b; and b = c;

C. c = d; and d = a;

D. a = b; and d = a;

char*a, *b, c[10], d[10];

a = b; b = c; c = d; d = a;

choose the statements having errors

Answer options:

A. No error

B. a = b; and b = c;

C. c = d; and d = a;

D. a = b; and d = a;

Expert's answer

A. No error B. a = b; and b = c; C. c = d; and d = a; D. a = b; and d = a;

A has an error (because there are errors actually)

C has an error

D has an error

A has an error (because there are errors actually)

C has an error

D has an error

## Comments

## Leave a comment