Primmer Exam MCQs with answer


61.Choose from below the valid syntax to show “Welcome to JS!!” to
user in JavaScript using a pop up. Choose most appropriate option

a. alertmsg(“Welcome to JS!!”);
b. alertBox(“Welcome to JS!!”);
c. alert(“Welcome to JS!!”);
d. alert(Welcome to JS!!);

Ans:alert(“Welcome to JS!!”);

62.Assume abc.html is existing and a valid HTML page. Refer the code
below:

<form  action="abc.html">
First Name: <input type="text"/xbr/> 
Last Name: cinput type="text"/xbr/> 
Password: <input type="hidden"/xbr/> 
<input type="submit" value="Submit"/>
<form>

63.How many HTML controls will be displayed on the browser, when
the above page is run on browser? Choose most appropriate
option

The correct answer is: 3

64.Which of the following is the correct html form element to create
the checkbox in a web page? Choose most appropriate option.

a. <input type="checkbox">
b. <input=checkbox>
c. <checkbox>
d. <input checkbox>

Ans : A

65.Consider the javascript code given below. What would be the print values from line 1 and line 2 on execution?

<html>
<body>
<p id="id1"x/px!—line 1-> 
<p id="id2"x/px!— line 2--> 
<script>
vary=10; 
myFunction();
document.getElementByld("id1 ").innerHTML = y; 
document.getElementByld("id2").innerHTML = window.y; 
function myFunction() {
y=20;
y=y+window.y
}
</script> 
</body>
</html>

The correct answer is: 40 40

66.Go-Will department store wants to automate few of its
functionalities.From the below options identify the functional
requirements of Go-Will department store

a. Add Product Details
b. Generate Bill for the purchased Items
c. System should be up and running 24/7
d. Response for each button click should be within 3 seconds

The correct answers are: Generate Bill for the purchased Items, Add Product Details

67.Tom and his team uses the SVN(Configuration Management Tool) to do versioning of source code. Tom has pulled out the code from the
5VN server to his local machine, updated his task partially and wanted
to update the work back to the 5VN server. What is the actual process
Tom has performed with the 5VN server.

a. check out/check in
b. fork/join
c. check in/check out
d. commit/rollback

The correct answer is: check out/check in

68.Which of the following option will delete the corresponding records in the child table when the records in parent table get deleted?

a. On delete cascade
b. On cascade set null
c. On delete set null
d. On cascade delete

The correct answer is: On delete cascade

69.In Oracle “Salary number(8,2)” can store which format of data?

a. 99999999
b. 9999999.99
c. 99999.99000000001
d. 999999.99

The correct answer is: 999999.99

70.Which of these SQL commands are used for manipulating the
structure of database objects?

a. Data Definition Language
b. Data Control Language
c. Data Access Language
d. Data Manipulation Language

The correct answer is: Data Definition Language

71.Which of the following keywords is used with Data Control Language statements?

a. Select
b. Grant
c. Delete
d. Insert

The correct answer is: b

72.Which values are ignored by count(*) function

a. Null values
b. Integers
c. Characters
d. Repetitive values

The correct answer is: a

73.The CUSTOMER table has following structure
CID NUMBER (5), CNAME VARCHAR2 (50), CADDRESS VARCHAR2
(150)
Which of the following statement will produce the output as “DEAR
CUSTOMER NAME”, where CUSTOMER NAME is fetched from
CUSTOMER table?

a. SELECT ‘DEAR ‘ll CNAME FROM CUSTOMER;
b. SELECT “DEAR”, CNAME FROM CUSTOMER;
c. SELECT “DEAR 11 CNAME” FROM CUSTOMER;
d. SELECT DEAR, CNAME FROM CUSTOMER;

The correct answer is: SELECT ‘DEAR ‘ll CNAME FROM CUSTOMER;

74.Which command in UNIX displays the list of all the users who have
logged into the Unix server?

a. Who
b. Who am i
c. users
d. List users

The correct answer is: Who

75.What is the purpose of using -a option with Is command ?

a. for showing directories
b. for showing executables
c. for showing hidden files

The correct answer is: for showing hidden files

76.Pipes are Used to combine two or more commands. The symbol used for representing pipe is_________

a. II
b. »
c. I
d. ;;

The correct answer is: c

77.every entry in the UNIX directory file has the following component(s).

a. Filename and Inode number
b. File Sixe
c. Filename
d. Inode number


The correct answer is: Filename and Inode number

78.What does the below Unix command accomplish?
$ sed ‘s/ABC/ZYX/1 file.txt

a. Only matches and displays the occurrence of the pattern
b. Replaces only first occurrence of ‘ABC’ with ‘ZYX1
c. Replaces all occurrences ‘ABC’ with ‘ZYX’
d. Replaces first occurrence in every line ‘ABC’ with ‘ZYX1

The correct answer is: Replaces first occurrence in every line ‘ABC’ with ■ZYX1

79.What is the output of the following code?

<script type="text/javascript">
var s = "6718654 or 70101?";
var pattern = /\d{4}/;
var output = s.match(pattern); 
document.write(output); 
</script>

The correct answer is: 6718

80.In CSS, styles are written under tag which is the child of tag

The correct answer is: head, style

81.Javascript is included in an HTML file with the help of_____tag.

a. style
b. body
c. script
d. head

The correct answer is:c

82.What does the following selector do ? $(“div”)

a. Selects all div elements

b. Selects all div elements within a tag
c. selects the first div element inside a tag
d. Selects the first div element

The correct answer is:Selects all div elements

83.What is the correct syntax to create an array in javascript

a. vartxt = new Array(1:,,John",2:"Ron,,,3:"Tom")
b. vartxt = new Array:1=("John,,)2=("Ron")3=("Tom")
c. vartxt = new Array="John","Ron","Tom"
d. vartxt = new ArrayC'John","Ron","Tom")

The correct answer is: vartxt = new ArrayC’John”,”Ron”,”Tom”)

84.In CSS to define style for a unique element then which css selector
should be used?

a. class
b. text
c. id
d. name

The correct answer is: c

85.What will be the XPATH expression to select all the book elements
that have a price greater than 135.00

a. /bookstore-book-price>135.00]

b. /bookstore/book[price>135.00]
c. /bookstore/book-price>135.00]
d. /bookstore-book[price>135.00]

The correct answer is: /bookstore/book[price>135.00]

86.What is wrong in the following lines of xml code

<note  date=  14/04/1979> 
<to>Abin<  /to>
<from>3ohn<  /from> 
</note>

a. XML Elements Must be Properly Nested

b. XML Attribute Values Must be Quoted
c. All XML Elements Must Have a Closing Tag
d. XML Tags are Case Sensitive

The correct answer is: XML Attribute Values Must be Quoted

87.What is the diagram that depicts the interaction between objects
by arranging the objects in time sequence?

a. Use Case Diagram
b. Component Diagram
c. Sequence Diagram
d. Activity Diagram

The correct answer is: Sequence Diagram

88.Select the diagram used to depict the building blocks and the
static structure of the system ?

a. Sequence Diagram
b. Component Diagram
c. Interaction Diagram
d. Class Diagram

The correct answer is: d

89.Select the principle that best describes the given scenario. The wind is called a breeze if it is gentle. The wind is called a storm if it is harsh.

a. Abstraction
b. Aggregation
c. Typing
d. Polymorphism

The correct answer is: d

90.Select the principle that best describes the given scenario. An air-
condition can be operated using the button or remote control.

a. Abstraction
b. Encapsulation
c. Polymorphism
d. Hierarchy

The correct answer is: b

« Previous  


Leave a Reply

Your email address will not be published. Required fields are marked *