wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

BCA Quizzler

Total questions: 50

Worksheet time: 38mins

Name
Class
Date
1.
Which of the following is the default file extension of PHP?
a)

.php

b)

.hphp

c)

.xml

d)

.html

2.
Which of the following is used for concatenation in PHP?
a)

+ (plus)

b)

* (Asterisk)

c)

. (dot)

d)

append()

3.
function in PHP which starts with __ (double underscore) is known as __________
a)
Default Function
b)
User Defined Function
c)
Inbuilt Function
d)
Magic Function
4.
A function in PHP which starts with __ (double underscore) is known as __________
a)
Default Function
b)
User Defined Function
c)
Inbuilt Function
d)
Magic Function
5.
Which one of the following is the default PHP session name?
a)
PHPSESSIONID
b)
PHPIDSESS
c)
PHPSESSID
d)
PHPSESID
6.
Which variable is used to collect form data sent with both the GET and POST methods?
a)
$_BOTH
b)
$REQUEST
c)
$_REQUEST
d)
$BOTH
7.
Where in C the order of precedence of operators do not exist?
a)
Within conditional statements, if, else
b)
Within while, do-while
c)
Within a macro definition
d)
None of the mentioned
8.
Which of the following declaration is not supported by C language?
a)
String str;
b)
char *str;
c)
float str = 3e2;
d)
Both “String str;” and “float str = 3e2;”
9.
What is the output of the following code snippet?
a)

1

b)

4

c)

20

d)

10

10.
What will be the output of the following code snippet?
a)

12

b)

24

c)

20

d)

18

11.
What will be the output of the following code snippet?
a)

4 4.5000

b)

4 4.000

c)

4.5000 4.5000

d)

4 4

12.
Select the output of following C code.
a)

It will print a

b)

It will print 0

c)

Compile time error

d)

Run time error

13.

Select the correct output of the following line of codes.

a)
b)
c)
d)
14.

Find the output of the following code.

a)

b)

c)

d)

15.

What is the output of the following program?

a)

1 1 1

b)

0 0 0

c)

321

d)

123

16.

.   By default the members of the structure are

a)

Access specifiers not applicable for structures.

b)

public

c)

protected

d)

private

17.

What will be the output of the following code?

a)

Hello

b)

World

c)

error

d)

Hello World

18.

What is virtual inheritance in C++?

a)

C++ technique to enhance multiple inheritance

b)

C++ technique to ensure that a private member of the base class can be accessed somehow

c)

C++ technique to avoid multiple inheritances of classes

d)

C++ technique to avoid multiple copies of the base class into children/derived class

19.
Which Set class should be most popular in a multi-threading environment, considering performance constraint?
a)
Hash Set
b)
Concurrent Skip List Set
c)
Linked Hash Set
d)
Copy on write array set
20.
Which allows the removal of elements from a collection?
a)
Enumeration
b)
Iterator
c)
Both
d)
None of the above
21.
Which Map is synchronized?
a)
Hash Table
b)
Concurrent Skip List Set
c)
Concurrent Hash Map
d)
All of the above
22.
The root interface of Java collection framework hierarchy is –
a)
Collection
b)
Root
c)
Collections
d)
List/Set
23.
Which of these is sorted by default
a)
Linked Has Set
b)
Tree Set
c)
Hash Set
d)
None of the above
24.
Complexity of ArrayList get method
a)
O(n-1)
b)
O(n)
c)
O(1)
d)
O(2n)
25.
Which of the following is correct about JavaScript?
a)
JavaScript is an Object-Based language
b)
JavaScript is Assembly-language
c)
JavaScript is an Object-Oriented language
d)
JavaScript is a High-level language
26.
What will be the output of the following JavaScript code snippet?
a)

error

b)

Sanfoundry_ Javascriptmcq

c)

undefined

d)

Sanfoundry_Javascriptmcq

27.
Which of the following is not javascript data types?
a)
Null type
b)
Undefined type
c)
Number type
d)
All of the mentioned
28.
What will be the output of the following JavaScript code snippet?
a)

0

b)

1

c)

compiler error

d)

runtime error

29.
Why event handlers is needed in JS?
a)
Allows JavaScript code to alter the behaviour of windows
b)
Adds innerHTML page to the code
c)
Change the server location
d)
Performs handling of exceptions and occurrences
30.

What will be the output of the following JavaScript code?

a)

10

b)

50

c)

5

d)

error

31.
Which of the following is not a valid HTML tag
a)
<p>
b)
<h8>
c)
<body>
d)
<head>
32.
Which of the following is used to create a hyperlink in HTML?
a)
<a>
b)
<link>
c)
<href>
d)
<url>
33.
Which of the following is used to create a list in HTML?
a)
<ul>
b)
<li>
c)
<ol>
d)
All of the above
34.
Which of the following HTML tags is used to insert an image on a web page?
a)
<img>
b)
<picture>
c)
<figure>
d)
<img src="">
35.
Which of the following is the correct way to create a table with two rows and three columns in HTML?
a)
<table><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></table>
b)
<table><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table>
c)
<table><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr><td></td><td></td><td></td></table>
d)
<table><tr><td></td><td></td><td></td></tr></table><table><tr><td></td><td></td><td></td></tr></table>
36.
What is the purpose of the <meta> tag in HTML?
a)
To define a hyperlink
b)
To specify the title of the web page
c)
To provide information about the web page
d)
To create a new section of the web page
37.
Which of the following CSS property is used to make the text bold?
a)
text-decoration: bold
b)
font-weight: bold
c)
font-style: bold
d)
text-align: bold
38.
Which of the following CSS property defines the different properties of all four sides of an element’s border in a single declaration?
a)
border-collapse
b)
border-width
c)
padding
d)
border
39.
. Which property is used to set the width of an element in CSS?
a)
width
b)
height
c)
size
d)
length
40.
Which selector is used to apply a style to an element based on its ID?
a)
# selector
b)
. Selector
c)
* Selector
d)
@
41.
Which CSS property is used to create a horizontal line?
a)
line-style
b)
line-width
c)
line-height
d)
<hr>
42.
What is the correct CSS syntax to set the width and height of an element to 100 pixels?
a)
width: 100px; height: 100px;
b)
size: 10px;
c)
dimensions: 100px
d)
width-height: 100px;
43.
Which CSS property is used to center an text element horizontally?
a)
margin-left
b)
margin-right
c)
tex-align
d)
align
44.
Python supports the creation of anonymous functions at runtime, using a construct called __________
a)
pi
b)
anonymous
c)
lambda
d)
none of the mentioned
45.
Which of the following Python statements will result in the output: 6? When A is:
a)
A[2][1]
b)
A[1][2]
c)
A[3][2]
d)
A[2][3]
46.
What will be the output of the following code snippet?
a)
0 1 2 ….. 15
b)
Infinite Loop
c)
0 3 6 9 12 15
d)
0 3 6 9 12
47.
What will be the output of the following code snippet? example = ["Sunday", "Monday", "Tuesday", "Wednesday"]; print(example[-3:-1])
a)
['Monday', 'Tuesday']
b)
['Sunday', 'Monday']
c)
['Tuesday', 'Wednesday']
d)
['Wednesday', 'Monday']
48.
will be the output of the following code snippet?
a)
number is an even number
b)
54 is an odd number
c)
number is an odd number
d)
54 is an even number
49.
Is Python code compiled or interpreted?
a)
Python code is both compiled and interpreted
b)
Python code is only compiled
c)
Python code is neither compiled nor interpreted
d)
Python code is only interpreted
50.
Which of the following is used to define a block of code in Python language?
a)
All of the mentioned
b)
Key
c)
Brackets
d)
Indentation