Quiz
OpenSource Programming
This quiz has a time limit, so it opens in the usual player.
Questions in this quiz (51)
1How can you create an e-mail link?
- A<mail href="a@b.com">
- B<mail>a@b.com</mail>
- C<a href="a@b.com">
- D<a href="mailto:a@b.com">
2colspan=n can be added to only what tag?
- A<table>
- B<td>
- C<tr>
3 The following elements <header>, <footer>, <article>, <section> are the new elements in HTML5. These elements are called,
- AControl attributes
- BSemantic elements
- CGraphic elements
- DMultimedia elements
4Which is not suited for game applications?
- ACanvas
- BSvg
- CBoth A & B
- DNone of the above
5The canvas element has a DOM method it is called.
- AgetContext
- BgetId
- CgetElement
- DNone of the above
6The default value of "position" attribute is _________.
- Ainherit
- Brelative
- Cfixed
- Dabsolute
7Which css property you will use if you want to add some margin between a border and its inner text ?
- Aspacing
- Bmargin
- Cpadding
- Dinner-margin
8p {line-height: 150%;}.
What type of selector is used in this case?- Aclass Selectors
- Belement Selectors
- Cid Selectors
- Dnone of the mentioned
9By applying an ___________ a style can be applied to just a single tag.
- Aclass rule
- Belement rule
- Cid rule
- Dnone of the mentioned
10 A ___________ is used to define a special state of an element.
- Apseudo-tag
- Bpseudo-element
- Cpseudo-id
- Dpseudo-class
11Which of the following JavaScript function of String object returns the character at the specified index?
- AcharAt()
- BcharCodeAt()
- Cconcat()
- DindexOf()
12What is the correct JavaScript syntax to write "Hello World"?
- ASystem.out.println("Hello World");
- Bprintln ("Hello World");
- Cdocument.write("Hello World");
- Dresponse.write("Hello World");
13Which of the following is not considered a JavaScript operator?
- Anew
- Bthis
- Cdelete
- Dtypeof
14Which of the looping statements is/are supported by PHP?
i) for loop ii) while loop iii) do-while loop iv) foreach loop- A(i) and (ii)
- B(i), (ii) and (iii)
- CAll of the mentioned
- DNone of the mentioned
15What will be the output of the following php code
< ?php
$num = 1;
$num1 = 2;
print $num . "+". $num1 ;
?>- A3
- B1+2
- C1.+.2
- DError
16What will be the output of the following code?
< ?php
function track() {
static $count = 0;
$count++;
echo $count ;
}
track();
track();
track();
?>- A123
- B111
- C000
- D011
17PHP scripts are executed on _________
- AISP Computer
- BClient Computer
- CServer Computer
- DIt depends on PHP scripts
18What will be the output of the following code?
$var = 10;
function fn ()
{
$var = 20;
return $var;
}
fn ();
echo $var;- A10
- B20
- CUndefined Variable
- DSyntax Error
19What will be the output of the following PHP code?
echo 30*5 . 7;- A150.7
- B1507
- C171
- Derror will occur
20In your PHP application you need to open a file. You want the application to issue a warning
and continue execution, in case the file is not found. The ideal function to be used is:- Ainclude()
- Brequire()
- Cnowarn()
- DgetFile(false)
21Which of the following is used in perl?
- Aelse if
- Belseif
- Celsif
- Delif
22What will be printed by the Perl code below?
my @a = (0, 1, 2);
my $b = @a;
print $b;- A0
- B1
- C2
- D3
- E0 1 2
23What gets printed in Perl?
my $str = 'a\\b\n';
print $str;- Aab(newline)
- Ba\b(newline)
- Ca\b\n
- Da\\b(newline)
- Ea\\b\n
24What gets printed in Perl?
my $a = '123';
my $b = '0123';
if ($a == $b) {
print "same";
} else {
print "different";
}- Asame
- Bdifferent
- Cthe code is ill-formed
25What will the @b array consist of in Perl?
my @a = (10, 5, 1);
my @b = sort @a;- A(1, 5, 10)
- B(10, 5, 1)
- C(1, 10, 5)
- D(5, 10, 1)
- E( )
26What will be printed in Perl?
print 'a';
BEGIN {
print 'b';
}
sub foo {
print 'c';
}- Aabc
- Bbac
- Cab
- Dba
- Ebca
27what does the following python code do?
def a(b, c, d): pass- Adefines a list and initializes it
- Bdefines a function, which does nothing
- Cdefines a function, which passes its parameters through
- Ddefines an empty class
28What is the output of the following python code ?
print(type([1,2]))- A<class 'tuple'>
- B<class 'int'>
- C<class 'set'>
- D<class 'dictionary'>
- E<class 'list'>
29what is the output of the below program in python?
a = [1,2,3,None,(),[],]
print(len(a))- Asyntax error
- B7
- C6
- D4
- E5
30What gets printed in python?
x = 4.5
y = 2
print(x//y)- A2.0
- B2.25
- C9.0
- D20.25
- E21
31What gets printed in Python?
print(r"\nwoow")- Anew line then the string: woow
- Bthe text exactly like this: r"\nwoow"
- Cthe text like exactly like this: \nwoow
- Dthe letter r and then newline then the text: woow
- Ethe letter r then the text like this: nwoow
32What gets printed in Python?
print(0xA + 0xa)- A0xA + 0xa
- B0xA 0xa
- C14
- D20
- E0x20
33What gets printed in Python?
name = "snow storm"
print(name[6:8])- Ast
- Bsto
- Cto
- Dtor
- ESyntax Error
34Which numbers are printed in Python?
for i in range(2):
print(i)
for i in range(4,6):
print(i)- A2, 4, 6
- B0, 1, 2, 4, 5, 6
- C0, 1, 4, 5
- D0, 1, 4, 5, 6, 7, 8, 9
- E1, 2, 4, 5, 6
35What gets printed in Python?
x = "foo "
y = 2
print(x + y)- Afoo
- Bfoo foo
- Cfoo 2
- D2
- EAn exception is thrown
36What gets printed in Python?
foo = (3, 4, 5)
print(type(foo))- A<class 'int'>
- B<class 'list'>
- C<class 'tuple'>
- D<class 'dict'>
- E<class 'set'>
37What gets printed in Python?
names = ['Amir', 'Barry', 'Chales', 'Dao']
print(names[-1][-1])- AA
- Br
- CAmir
- DDao
- Eo
38What gets printed in Python?
numbers = [1, 2, 3, 4]
numbers.append([5,6,7,8])
print(len(numbers))- A4
- B5
- C8
- D12
- EAn exception is thrown
39Which of the following data structures in Python can be used with the "in" operator to check if an item is in the data structure?
- Alist
- Bset
- Cdictionary
- DAll of the above
- ENone of the above
40What gets printed in Python?
my_tuple = (1, 2, 3, 4)
my_tuple.append( (5, 6, 7) )
print(len(my_tuple))- A1
- B2
- C5
- D7
- EAn exception is thrown
41What gets printed in Python?
x = sum(range(5))
print(x)- A4
- B5
- C10
- D15
- EAn exception is thrown
42Which of the following is the way to create comments in PHP?
- A// commented code to end of line
- B/* commented code here */
- C# commented code to end of line
- Dall of the above
43What gets printed in PHP?
$var = 'false';
if ($var) {
echo 'true';
} else {
echo 'false';
}- Atrue
- Bfalse
44Which of the following is used to declare a constant in PHP?
- Aconst
- Bconstant
- Cdefine
- D#pragma
- Edef
45What gets printed?
<?php
$RESULT = 11 + 011 + 0x11;
echo "$RESULT";
?>- A11
- B22
- C33
- D37
- E39
46Which tags are most commonly used by search engines?
- AParagraph
- BHeading
- CTitle
- DAll of above
47Banners, buttons, dividers, clipart and other simple images usually work best as ?
- Apng
- Bgif
- Cjpg
48Which built-in method returns the character at the specified index?
- AcharacterAt()
- BgetCharAt()
- CcharAt()
- DNone of the above
49var city = new Array("delhi", "agra", "akot", "aligarh","palampur");
console.log(city.pop());- Adelhi
- Bpalampur
- Cagra
- Dakot
50What does isNaN function do?
- AReturns false if the argument is not a number.
- BReturns true if the argument is not a number.
- CReturns true if the argument is a number.
- DNone of the above
51CDN stands for_______
- AContent Distribution Network
- BCommon Distribution Network
- CCollective Distribution Network
- DNone of these
Information
- Description
- ThirdYear Third Year Quiz on OpenSource Programming, created by Faheem Ahmed on 23/03/2018.
- Author
- Faheem Ahmed
- Language
- English
- Views
- 1,073
- History
- Created on 23 Mar 2018 · updated on 18 May 2020
- Tags
- Rating
- No ratings yet Rate this quiz