Skip to main content

Classes And Modules — Part 1 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Classes And Modules — Part 1 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
40
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
48 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
40

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/40 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 40
★ FPSC ★ PPSC

The behaviour of the instances present of a class inside a method is defined by

Question 2 of 40
★ FPSC ★ PPSC

The keyword or the property that you use to refer to an object through which they were invoked is

Question 3 of 40
★ FPSC ★ PPSC

Consider the following code snippet : var o = new F () ; o . constructor === F The output would be :

Question 4 of 40
★ FPSC ★ PPSC

The basic difference between JavaScript and Java is

Question 5 of 40
★ FPSC ★ PPSC

The meaning for Augmenting classes is that

Question 6 of 40
★ FPSC ★ PPSC

The property of JSON() method is:

Question 7 of 40
★ FPSC ★ PPSC

When a class B can extend another class A, we say that

Question 8 of 40
★ FPSC ★ PPSC

If A is the superclass and B is the subclass, then subclass inherting the superclass can be represented as

Question 9 of 40
★ FPSC ★ PPSC

The method that can be used to create new properties and also to modify the attributes of existing properties is

Question 10 of 40
★ FPSC ★ PPSC

The four kinds of class members are

Question 11 of 40
★ FPSC ★ PPSC

The properties of the objects act like different kinds of class members. They are

Question 12 of 40
★ FPSC ★ PPSC

The object whose properties are inherited by all instances of the class, and properties whose values are functions behaving like instance methods of the class, is

Question 13 of 40
★ FPSC ★ PPSC

Which are usually variables that are used internally in object methods and also are globally visible variables?

Question 14 of 40
★ FPSC ★ PPSC

The class that represents the regular expressions is

Question 15 of 40
★ FPSC ★ PPSC

Which is the correct code that returns a complex number that is the complex conjugate of this one?

Question 16 of 40
★ FPSC ★ PPSC

How can we make methods available on all objects?

Question 17 of 40
★ FPSC ★ PPSC

What is the procedure to add methods to HTMLElement so that they will be inherited by the objects that represent the HTML tags in the current document?

Question 18 of 40
★ FPSC ★ PPSC

You can refresh the webpage in JavaScript by using

Question 19 of 40
★ FPSC ★ PPSC

The functions provide() and require() of Dojo toolkit and Google’s Closure library are used for

Question 20 of 40
★ FPSC ★ PPSC

The maximum number of global symbols a module can define is

Question 21 of 40
★ FPSC ★ PPSC

To define each of the set classes as a property of the sets object (namespace) for the module, the statement is

Question 22 of 40
★ FPSC ★ PPSC

Consider the following statement var Set = sets . Set; var s = new Set ( 1 , 2 , 3 ) ; What could be the efficiency quotient of the above two statements ?

Question 23 of 40
★ FPSC ★ PPSC

The scope of a function is also called as

Question 24 of 40
★ FPSC ★ PPSC

Modules that have more than one item in their API can

Question 25 of 40
★ FPSC ★ PPSC

The provides() function and the exportsobject are used to

Question 26 of 40
★ FPSC ★ PPSC

Consider the following code snippet var sets = com . davidflanagan . collections . sets; What is the programmer trying to do in the above code snippet?

Question 27 of 40
★ FPSC ★ PPSC

The properties() method is a

Question 28 of 40
★ FPSC ★ PPSC

What can be done in order to avoid creation of global variables in JavaScript?

Question 29 of 40
★ FPSC ★ PPSC

The ‘$’ present in the RegExp object is called a

Question 30 of 40
★ FPSC ★ PPSC

Consider the following statement containing regular expressions var text = "testing: 1, 2, 3" ; var pattern = / d +/ g; In order to check if the pattern matches, the statement is

Question 31 of 40
★ FPSC ★ PPSC

The regular expression to match any one character not between the brackets is

Question 32 of 40
★ FPSC ★ PPSC

What does /[^(]* regular expression indicate ?

Question 33 of 40
★ FPSC ★ PPSC

What will be the result when non greedy repetition is used on the pattern /a+?b/ ?

Question 34 of 40
★ FPSC ★ PPSC

What does the subexpression /java(script)?/ result in ?

Question 35 of 40
★ FPSC ★ PPSC

What is the most essential purpose of parantheses in regular expressions ?

Question 36 of 40
★ FPSC ★ PPSC

The method that performs the search-and-replace operation to strings for pattern matching is

Question 37 of 40
★ FPSC ★ PPSC

What would be the result of the following statement in JavaScript using regular expression methods ?

Question 38 of 40
★ FPSC ★ PPSC

The Crockford’s subset doesnot include which function in JavaScript?

Question 39 of 40
★ FPSC ★ PPSC

Why does JavaScript subset disallow == and !=?

Question 40 of 40
★ FPSC ★ PPSC

What is being imposed on each subset to ensure that it conforms to the subset?

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →