Basic quiz in jQuery
Some suggestions


If you ignore the q your questions object is a list of sequential integers so might as well be an array. This will simplify the logic later on.

answers: [
    'd',
    'd',
    'a',
    'c',
    'a'
]

If you use an array as suggested above, then we can simplify this block quite a lot (also, use strict comparators!): 


var resultArr = [];
        for (var p in ans) {
            var x = parseInt(p) + 1;
            var key = 'q' + x;
            var flag = false;
            if (ans[p] == 'q' + x + '-' + arr[key]) {
                flag = true;
            } else {
                flag = false;
            }
            resultArr.push(flag);
        }



    var results = [];
    for ( var i = 0; = &lt; ans.length; i++ ) {
        var flag = (ans[p] === arr[i]);
        result.push(flag);
    }

This is daft unless you want to make certain it's not something other than a boolean;


if (results[i] === true) {}



if (results[i]) {}

It's much nicer to build HTML using jQuery than with Strings. And your for loop seems to have an unnecessary variable.

 var resultSet = $('&lt;div&gt;');
 var trueCount = 0;
 for (var i = 0; i &lt; results.length; i++) {
    if (results[i] === true) trueCount++;
    resultSet.text('Question ' + (i + 1) + ' is ' + results[i] + ');
 }

If you're declaring multiple variables you can separate them with a comma.

var results = jQuiz.checkAnswers(),
  resultSet = $('&lt;div&gt;'),
  trueCount = 0;