i got it...
even though no body replied for this i write my solution for people who want the same thing to happen with their work..
i got the marks through
$attempts = quiz_get_user_attempts($quiz->id, $USER->id);
here $attempts is an associative array containing contents of user with regard to that quiz..
you can extract the required fields