0% found this document useful (0 votes)
192 views44 pages

CS508 Quiz-3 by Vu Topper RM

Uploaded by

Only Movies
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
192 views44 pages

CS508 Quiz-3 by Vu Topper RM

Uploaded by

Only Movies
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

CS-508 Modern Programming

Update MCQS For Quiz-3 File


Solve By Vu Topper RM
85% To 100% Marks

For More Help Contact What’s app 03224021365


A type conversion that occurs without any special directive from the
programmer is known as:
A. Strict conversion
B. Explicit conversion
C. Implicit conversion Page 98
D. Imperative conversion

Which of the following are the types of constants in PROLOG?


A. short and char
B. float and numbers
C. single and decimal
D. atoms and numbers Google

The super class of all exception classes in Java is:


A. Throwable Google
B. Error
C. System
D. Exception

In java, explicit conversion of primitive type is done by _________


A. boxing
B. casting
C. overloading
D. aliasing

When a class inherits from another class in Java then:


A. all fields and methods are inherited
B. only public fields and methods are inherited
C. only private fields and methods are inherited
D. only static fields and methods are inherited

A variable name in PROLOG starts with _________


A. Number

For More Help Contact What’s app 03224021365


B. Capital letter
C. Small letter
D. $ sign

A main() function in a JAVA program:


A. must be inside a class
B. returns more than one value
C. is always declared as a global function
D. cannot be inside a class

_______ cannot be converted to other types in Java.


A. Int
B. Char
C. Double
D. Booleans Page 98

The keyword that is used to generate exception explicitly in Java is:


A. Try
B. Catch
C. Throw Google
D. Finally

Default access (if no other access is specified) for classes and fields in
Java is:
A. Public
B. Private
C. Package Google
D. Protected

The basic tool for writing programs in PROLOG is:


A. Recursion Page 85
B. Inheritance
C. Polymorphism

For More Help Contact What’s app 03224021365


D. Object-Orientation

How many kinds of “type conversion” of primitive types are there in


Java?
A. 2 Page 175
B. 3
C. 4
D. 5

Expert system___________ provide a structure to design expert system.


A. Mechanism
B. Shells
C. Lists
D. Techniques

Which of the following primitive type is available in JAVA?


A. typedef
B. struct
C. byte
D. enum

which of given is the magical thing in Prolog?


A. Program partition
B. List Processing
C. Predicate
D. Inference engine

The correct way to write comments in a PROLOG program is:


A. % This is another comment
B. /* This is also a comment */
C. # Consider this a comment
D. // this is a comment

For More Help Contact What’s app 03224021365


In a PROLOG program, the definitions of predicate sentences or phrases
are known as:
A. Facts
B. Inferences
C. Declarations
D. Clauses

How many elements are in the following PROLOG list?[[a,list,of,lists],


and, numbers,[1,2,3]]
A. 9
B. 2
C. 4
D. 6

When you declare a class object in a JAVA program then:


A. storage is allocated to the object
B. Object is automatically initialized
C. Constructor of a class is called
D. no storage is allocated to the object

While eliminating repeated elements of list in PROLOG, each element


should be replaced with:
A. Previous element
B. Next element
C. Blank space
D. Single copy of the same element

The inference mechanism of PROLOG is based upon _____________.


A. Forward chaining
B. Back tracking
C. Propositional logic
D. Recursion

For More Help Contact What’s app 03224021365


In the context of PROLOG language, which problem(s) may mostly
occur in backward chaining algorithm?
A. Complexity
B. Readiness
C. Completeness
D. Repetition

The facts in a PROLOG program must end with:


A. Colon (:)
B. Semicolon (;)
C. Full stop (.)
D. Comma (,)

In the context of Java language, which of following is NOT a correct


statement?
A. Abstract class defines only the structure of the class not its
implementation
B. Abstract class can be initiated by 'new' operator
C. Abstract class can be inherited
D. Every class containing abstract method must be declared abstract

To sort a list in PROLOG language, we need to:


A. Use the Forward Chaining mechanism
B. Write the sorting algorithm
C. Tell the inference engine of PROLOG that what sorting means
D. Use Dynamic Programming Techniques

In Prolog, a "member(X, T)" predicate is used to check the membership


of X in _______.
A. stack
B. symbol
C. class
D. list

For More Help Contact What’s app 03224021365


1. In JavaScript, navigator is a ______object
Select the correct option
a. Browser
b. User defined
c. Built-in
d. Document

2. Which of the following type of numbers are not supported by PHP?


Select the correct option
a. Real Numbers
b. Unsinged Integers
c. Complex Numbers
d. Singed Integers

3. Which of the following language is used for server-side scripting?


select the correct option
a. PHP
b. C#
c. Ada
d. C++

4. The model in JavaScript provides access to the contents of the


browser window.

For More Help Contact What’s app 03224021365


Select the correct option
a. DOM
b. BOM
c. ROM
d. COM
5. The code written in PHP is returned to the web browser as:
Select the correct option
a. Applets
b. Plain HTML
c. Shell scripts
d. CSS flexbox

6. Which of the given is used before the declaration of variable in PHP?


Select the correct option
a. #sign
b. $ sign
c. ? sign
d. @sign

7. An in PHP is an ordered map.


Select the correct option
a. string
b. array
c. queue
d. stack

8. In the 'break' statement may have an optional parameter or argument.

For More Help Contact What’s app 03224021365


Select the correct option
a. C#
b. C/C++
c. Java
d. PHP

9. In PHP 'switch' structure, the starts or implements an implicit loop.


Select the correct option
a. Break Statement
b. Continue Statement
c. For Loop
d. Return Statement

10. In JavaScript, "with" statement is an alternative of


select the correct option
a. Multiple document.write statements
b. While statement
c. Single document.write statement
d. Union statement
11 . In how many places a javascript code can be placed?
Select the correct option
a. 3
b. 2

For More Help Contact What’s app 03224021365


c. 4
d. 6

12. If an integer variable is not initialized in PHP then its default value
will be:
Select the correct option
a. Zero
b. False
c. NULL
d. One
13. In PHP, if a number is beyond the bounds of the integer type, then it
will be interpreted as a instead.
Select the correct option
a. string
b. short
c. float
d. long

14. In JavaScript, which of the given provides access to the contents of


browser window?
select the correct option
a. BOM
b. ROM
c. DOM
d. COM

15. The scripts written in PHP are executed by:


Select the correct option

For More Help Contact What’s app 03224021365


a. Web browser
b. Java
c. Applet Client machine
d. Web Server

16. Arrays in JavaScript are based.


Select the correct option
a. Length
b. One
b. Index Location
d. Zero Index

17. Classes and objects of PHP are similar to


Select the correct option
a. Classes and objects of Basic
b. Classes and objects of C
c. Classes and objects of Java
d. Classes and objects of C++

18. Which of the following type of numbers are not supported by PHP?
select the correct option
a. Complex Numbers
b. Unsinged Integers
c. Real Numbers
d. Singed Integers

19. To dynamically generate a web page, which of the following


programming language is most suitable?

For More Help Contact What’s app 03224021365


the correct option
a. PHP
b. C++
c. Ada
d. Prolog
20. The scripts written in PHP are executed by:
Select the correct option
a. Web Server
b. Web browser
c. Client machine
d. Java Applet
21. Which of the given is used before the declaration of variable in
PHP?
Select the correct option
a. ? sign
b. @sign
c. #sign
d. $ sign

22. The data type of variable in PHP is automatically determined by its:


select the correct option
a. Name
b. Location
c. Size
d. Value

23. an object that describes the basic characteristics of the browser,


notably its type and version. Select the correct option

For More Help Contact What’s app 03224021365


a. Window
b. Navigator
c. Document
d. Location
24. How many <script> tags can be used in the <head> element?
Select the correct option
a. One
b. Many
c. Zero
d. Two

25. Which of the following language is used for server-side scripting?


Select the correct option
a. C#
b. Ada
c. C++
d. PHP

26. An in PHP is an ordered map.


Select the correct option
a. queue
b. array
c. stack
d. string
27. In Strings and numeric values are inter convertible
Select the correct option
a. C#
b. C/C++

For More Help Contact What’s app 03224021365


c. PHP
d. Java

28. In JavaScript, "with" statement is an alternative of


Select the correct option
a. While statement
b. Union statement
c. Multiple document.write statements
d. Single document.write statement

29. In PHP switch structure, the starts or implements an implicit loop.


Select the correct option
a. Return Statement
b. Break Statement
c. Continue Statement
d. For Loop

For More Help Contact What’s app 03224021365


For More Help Contact What’s app 03224021365

You might also like