Assertion (A): If \(x=a\) is the root of a quadratic equation \(x^2-(a+b)x+k=0\) then the value of \(k\) is \(ab\).
 
Reason (R): \(x=1\) is the root of a quadratic equation \(x^2-2x+1=0\)