Concept:
For a quadratic equation:
\[
x^2+px+1=0
\]
if roots are \(a,b\), then:
\[
a+b=-p
\]
and
\[
ab=1
\]
Similarly, for:
\[
x^2+qx+1=0
\]
if roots are \(c,d\), then:
\[
c+d=-q
\]
and
\[
cd=1
\]
Step 1: Use roots of first equation.
Since \(a,b\) are roots of:
\[
x^2+px+1=0
\]
For any value \(x=c\):
\[
(c-a)(c-b)=c^2+pc+1
\]
Now:
\[
(a-c)(b-c)=(c-a)(c-b)
\]
So:
\[
(a-c)(b-c)=c^2+pc+1
\]
Step 2: Use relation for \(c\).
Since \(c\) is a root of:
\[
x^2+qx+1=0
\]
we have:
\[
c^2+qc+1=0
\]
So:
\[
c^2+1=-qc
\]
Then:
\[
c^2+pc+1=(p-q)c
\]
Therefore:
\[
(a-c)(b-c)=(p-q)c
\]
Step 3: Evaluate \((a+d)(b+d)\).
Using roots \(a,b\):
\[
(a+d)(b+d)=ab+d(a+b)+d^2
\]
Now:
\[
ab=1,\quad a+b=-p
\]
So:
\[
(a+d)(b+d)=1-pd+d^2
\]
Since \(d\) is a root of:
\[
x^2+qx+1=0
\]
\[
d^2+qd+1=0
\]
So:
\[
d^2+1=-qd
\]
Hence:
\[
1-pd+d^2=(-q-p)d
\]
\[
(a+d)(b+d)=-(p+q)d
\]
Step 4: Multiply both parts.
\[
E=(a-c)(b-c)(a+d)(b+d)
\]
\[
E=(p-q)c\cdot [-(p+q)d]
\]
\[
E=-(p-q)(p+q)cd
\]
Since:
\[
cd=1
\]
\[
E=-(p^2-q^2)
\]
\[
E=q^2-p^2
\]
Step 5: Compare with the given answer key.
The direct algebraic simplification gives:
\[
q^2-p^2
\]
However, the provided answer key marks:
\[
p^2-q^2
\]
So there may be a sign issue in the printed expression or option key. If the expression is exactly:
\[
(a-c)(b-c)(a+d)(b+d)
\]
then the calculated value is:
\[
q^2-p^2
\]
Hence, mathematically the answer is:
\[
\boxed{(B)\ q^2-p^2}
\]