Scripting

Beschreibung

Computer Science Quiz am Scripting, erstellt von Nurlykhan Omarov am 20/12/2018.
Nurlykhan Omarov
Quiz von Nurlykhan Omarov, aktualisiert more than 1 year ago
Nurlykhan Omarov
Erstellt von Nurlykhan Omarov vor fast 6 Jahre
310
2

Zusammenfassung der Ressource

Frage 1

Frage
1. What does PHP stand for? i) Personal Home Page ii) Hypertext Preprocessor iii) Pretext Hypertext Processor iv) Preprocessor Home Page
Antworten
  • a) Both i) and iii)
  • b) Both ii) and iv)
  • c) Only ii)
  • d) Both i) and ii)

Frage 2

Frage
2. PHP files have a default file extension of_______
Antworten
  • a) .html
  • b) .xml
  • c) .php
  • d) .ph

Frage 3

Frage
3. A PHP script should start with ___ and end with ___
Antworten
  • a) < php >
  • b) < ? php ?>
  • c) <? ?>
  • d) <?php ?>

Frage 4

Frage
4. Which of the following is/are a PHP code editor? i) Notepad ii) Notepad++ iii) Adobe Dreamweaver iv) PDT
Antworten
  • a) Only iv)
  • b) All of the mentioned.
  • c) i), ii) and iii)
  • d) Only iii)

Frage 5

Frage
5. Which of the following must be installed on your computer so as to run PHP script? i) Adobe Dreamweaver ii) PHP iii) Apache iv) IIS
Antworten
  • a) All of the mentioned.
  • b) Only ii)
  • c) ii) and iii)
  • d) ii), iii) and iv)

Frage 6

Frage
6. Which version of PHP introduced Try/catch Exception?
Antworten
  • a) PHP 4
  • b) PHP 5
  • c) PHP 5.3
  • d) PHP 6

Frage 7

Frage
7. We can use ___ to comment a single line? i) /? ii) // iii) # iv) /* */
Antworten
  • a) Only ii)
  • b) i), iii) and iv)
  • c) ii), iii) and iv)
  • d) Both ii) and iv)

Frage 8

Frage
8. Which of the following php statement/statements will store 111 in variable num? i) int $num = 111; ii) int mum = 111; iii) $num = 111; iv) 111 = $num;
Antworten
  • a) Both i) and ii)
  • b) All of the mentioned
  • c) Only iii)
  • d) Only i)

Frage 9

Frage
9. What will be the output of the following php code?
Antworten
  • a) 3
  • b) 1+2
  • c) 1.+.2
  • d) Error

Frage 10

Frage
10. What will be the output of the following php code?
Antworten
  • a) 3
  • b) 1+2
  • c) Error
  • d) 12

Frage 11

Frage
1. Which of following variables can be assigned a value to it? i) $3hello ii) $_hello iii) $this iv) $This
Antworten
  • a) All of the mentioned
  • b) Only ii)
  • c) ii), iii) and iv)
  • d) ii) and iv)

Frage 12

Frage
2. What will be the output of the following code?
Antworten
  • a) Error
  • b) My name is BobBob
  • c) My name is BobMy name is Bob
  • d) My name is Bob Bob

Frage 13

Frage
3. Which of the following PHP statements will output Hello World on the screen? i) echo (“Hello World”); ii) print (“Hello World”); iii) printf (“Hello World”); iv) sprintf (“Hello World”);
Antworten
  • a) i) and ii)
  • b) i), ii) and iii)
  • c) All of the mentioned
  • d) i), ii) and iv)

Frage 14

Frage
4. What will be the output of the following PHP code?
Antworten
  • a) a
  • b) Error
  • c) $var
  • d) r

Frage 15

Frage
5. What will be the output of the following PHP code?
Antworten
  • a) 1
  • b) Error
  • c) 1234
  • d) 2

Frage 16

Frage
6. What will be the output of the following PHP code?
Antworten
  • a) Error
  • b) 35 students
  • c) 35
  • d) 25 students

Frage 17

Frage
7. Which of the below statements is equivalent to $add += $add ?
Antworten
  • a) $add = $add
  • b) $add = $add +$add
  • c) $add = $add + 1
  • d) $add = $add + $add + 1

Frage 18

Frage
8. Which statement will output $x on the screen?
Antworten
  • a) echo “\$x”;
  • b) echo “$$x”;
  • c) echo “/$x”;
  • d) echo “$x;”;

Frage 19

Frage
9. What will be the output of the following code?
Antworten
  • a) 123
  • b) 111
  • c) 000
  • d) 011

Frage 20

Frage
10. What will be the output of the following PHP code?
Antworten
  • a) get
  • b) true
  • c) false
  • d) clueget

Frage 21

Frage
1. What will be the output of the following PHP code?
Antworten
  • a) 5 === 5
  • b) Error
  • c) 1
  • d) False

Frage 22

Frage
2. Which of the below symbols is a newline character?
Antworten
  • a) \r
  • b) \n
  • c) /n
  • d) /r

Frage 23

Frage
3. What will be the output of the following PHP code?
Antworten
  • a) What is her age? \n She is $num years old
  • b) What is her age? She is $num years old
  • c) What is her age? She is 10 years old
  • d) What is her age? She is 10 years old

Frage 24

Frage
4. Which of the conditional statements is/are supported by PHP? i) if statements ii) if-else statements iii) if-elseif statements iv) switch statements
Antworten
  • a) Only i)
  • b) i), ii) and iv)
  • c) ii), iii) and iv)
  • d) All of the mentioned.

Frage 25

Frage
5. What will be the output of the following PHP code?
Antworten
  • a) I love arsenal
  • b) Error
  • c) I love arsenalI love manc
  • d) I love arsenalI love mancI love manu

Frage 26

Frage
6. Which of the looping statements is/are supported by PHP? i) for loop ii) while loop iii) do-while loop iv) foreach loop
Antworten
  • a) i) and ii)
  • b) i), ii) and iii)
  • c) All of the mentioned
  • d) None of the mentioned

Frage 27

Frage
7. What will be the output of the following PHP code?
Antworten
  • a) AshleyBale
  • b) AshleyBaleBlank
  • c) ShrekBlank
  • d) Shrek

Frage 28

Frage
8. If $a = 12 what will be returned when ($a == 12) ? 5 : 1 is executed?
Antworten
  • a) 12
  • b) 1
  • c) Error
  • d) 5

Frage 29

Frage
9. What is the value of $a and $b after the function call?
Antworten
  • a) a is 3 and b is 4
  • b) a is 4 and b is 3
  • c) Both are 3
  • d) Both are 4

Frage 30

Frage
10. Who is the father of PHP?
Antworten
  • a) Rasmus Lerdorf
  • b) Willam Makepiece
  • c) Drek Kolkevi
  • d) List Barely

Frage 31

Frage
1. Which one of the following is the right way of defining a function in PHP?
Antworten
  • a) function { function body }
  • b) data type functionName(parameters) { function body }
  • c) functionName(parameters) { function body }
  • d) function fumctionName(parameters) { function body }

Frage 32

Frage
2. Type Hinting was introduced in which version of PHP?
Antworten
  • a) PHP 4
  • b) PHP 5
  • c) PHP 5.3
  • d) PHP 6

Frage 33

Frage
3. What will happen in this function call?
Antworten
  • a) Call By Value
  • b) Call By Reference
  • c) Default Argument Value
  • d) Type Hinting

Frage 34

Frage
4. What will be the output of the following PHP code?
Antworten
  • a) Error
  • b) 0
  • c) 42
  • d) 84

Frage 35

Frage
5. Which of the following are valid function names? i) function() ii) €() iii) .function() iv) $function()
Antworten
  • a) Only ii)
  • b) None of the mentioned.
  • c) All of the mentioned.
  • d) iii) and iv)

Frage 36

Frage
6. What will be the output of the following PHP code?
Antworten
  • a) I am b
  • b) I am bI am a
  • c) Error
  • d) I am a Error

Frage 37

Frage
7. What will be the output of the following PHP code?
Antworten
  • a) I am b
  • b) I am bI am a
  • c) Error
  • d) I am a Error

Frage 38

Frage
8. What will be the output of the following PHP code?
Antworten
  • a) helloblabla
  • b) Error
  • c) hello
  • d) helloblablablabla

Frage 39

Frage
9. A function in PHP which starts with __ (double underscore) is know as..
Antworten
  • a) Magic Function
  • b) Inbuilt Function
  • c) Default Function
  • d) User Defined Function

Frage 40

Frage
10. What will be the output of the following PHP code?
Antworten
  • a) Error
  • b) $msg
  • c) 0
  • d) Will this work

Frage 41

Frage
1. Which one of the following PHP functions can be used to build a function that accepts any number of arguments?
Antworten
  • a) func_get_argv()
  • b) func_get_argc()
  • c) get_argv()
  • d) get_argc()

Frage 42

Frage
2. Which one of the following PHP functions can be used to find files?
Antworten
  • a) glob()
  • b) file()
  • c) fold()
  • d) get_file()

Frage 43

Frage
3. Which of the following PHP functions can be used to get the current memory usage?
Antworten
  • a) get_usage()
  • b) get_peak_usage()
  • c) get_memory_usage()
  • d) get_memory_peak_usage()

Frage 44

Frage
4. Which of the following PHP functions can be used for generating unique ids?
Antworten
  • a) uniqueid()
  • b) id()
  • c) md5()
  • d) mdid()

Frage 45

Frage
5. Which one of the following functions can be used to compress a string?
Antworten
  • a) zip_compress()
  • b) zip()
  • c) compress()
  • d) gzcompress()

Frage 46

Frage
6. What will be the output of the following PHP code?
Antworten
  • a) 1
  • b) 2
  • c) 3
  • d) 4

Frage 47

Frage
7. What will be the output of the following PHP code?
Antworten
  • a) 106
  • b) 103
  • c) 104
  • d) 209

Frage 48

Frage
8. What will be the output of the following PHP code?
Antworten
  • a) Hello World
  • b) Hello World
  • c) Hell o wo rld
  • d) World

Frage 49

Frage
9. What will be the output of the following PHP code?
Antworten
  • a) I love my country
  • b) i love my Country
  • c) I love my Country
  • d) I Love My Country

Frage 50

Frage
10. What will be the output of the following PHP code?
Antworten
  • a) welcome to India
  • b) welcome to india
  • c) Welcome to India
  • d) Welcome to india

Frage 51

Frage
1. PHP’s numerically indexed array begin with position ___________
Antworten
  • a) 1
  • b) 2
  • c) 0
  • d) -1

Frage 52

Frage
2. Which of the following are correct ways of creating an array? i) state[0] = “karnataka”; ii) $state[] = array(“karnataka”); iii) $state[0] = “karnataka”; iv) $state = array(“karnataka”);
Antworten
  • a) iii) and iv)
  • b) ii) and iii)
  • c) Only i)
  • d) ii), iii) and iv)

Frage 53

Frage
3. What will be the output of the following php code?
Antworten
  • a) karnataka 11,35,000
  • b) 11,35,000
  • c) population 11,35,000
  • d) karnataka population

Frage 54

Frage
4. Which function will return true if a variable is an array or false if it is not?
Antworten
  • a) this_array()
  • b) is_array()
  • c) do_array()
  • d) in_array()

Frage 55

Frage
5. Which in-built function will add a value to the end of an array?
Antworten
  • a) array_unshift()
  • b) into_array()
  • c) inend_array()
  • d) array_push()

Frage 56

Frage
6. What will be the output of the following PHP code?
Antworten
  • a) True
  • b) 1
  • c) False
  • d) 2

Frage 57

Frage
7. What will be the output of the following PHP code?
Antworten
  • a) orangebanana
  • b) appleorange
  • c) orangeorange
  • d) appleapple

Frage 58

Frage
8. Which function can be used to move the pointer to the previous array position?
Antworten
  • a) last()
  • b) before()
  • c) prev()
  • d) previous()

Frage 59

Frage
9. What will be the output of the following PHP code?
Antworten
  • a) 3
  • b) 4
  • c) 5
  • d) 6

Frage 60

Frage
10. Which function returns an array consisting of associative key/value pairs?
Antworten
  • a) count()
  • b) array_count()
  • c) array_count_values()
  • d) count_values()

Frage 61

Frage
1. What will be the output of the following PHP code?
Antworten
  • a) I like Volvo, Toyota and BMW
  • b) I like Volvo, BMW and Toyota
  • c) I like BMW, Volvo and Toyota
  • d) I like Toyota, BMW and Volvo

Frage 62

Frage
2. What will be the output of the following PHP code?
Antworten
  • a) Array ( Peter Ben Joe )
  • b) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
  • c) Array ( 35 37 43 )
  • d) Array ( [35] => Peter [37] => Ben [43] => Joe )

Frage 63

Frage
3. What will be the output of the following PHP code?
Antworten
  • a) Array ( [A] => 5 [Cat] => 2 [Dog] => 2 [Tiger] => 1 )
  • b) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 [Tiger] => 1 )
  • c) Array ( [A] => 6 [Cat] => 1 [Dog] => 2 [Tiger] => 1 )
  • d) Array ( [A] => 2 [Cat] => 1 [Dog] => 4 [Tiger] => 1 )

Frage 64

Frage
4. What will be the output of the following PHP code?
Antworten
  • a) Array ( [d] => yellow )
  • b) Array ( [i] => orange )
  • c) Array ( [h] => orange )
  • d) Array ( [d] => yellow [h] => orange )

Frage 65

Frage
5. What will be the output of the following PHP code?
Antworten
  • a) Array ( [a] => blue [b] => yellow [c] => red [d] => green )
  • b) Array ( [0] => blue [1] => yellow [2] => red [3] => green )
  • c) Array ( [0] => red [1] => green [2] => blue [3] => yellow )
  • d) Array ( [a] => red [b] => green [c] => blue [d] => yellow )

Frage 66

Frage
6. What will be the output of the following PHP code?
Antworten
  • a) india Array ( [a] => china )
  • b) india Array ( [a] => brazil )
  • c) china Array ( [a] => india )
  • d) china Array ( [a] => brazil )

Frage 67

Frage
7. What will be the output of the following PHP code?
Antworten
  • a) Array ( [1] => hello [4] => hello [5] => php ) Array ( [5] => php
  • b) Array ( [1] => hello [2] => hello [3] => hello [4] => hello ) Array ( [5] => php )
  • c) Array ( [1] => hello [2] => hello [3] => hello [4] => hello [5] => php ) Array ( [5] => php )
  • d) Array ( [1] => hello [2] => hello [3] => hello [4] => hello ) Array ( [1] => php )

Frage 68

Frage
8. What will be the output of the following PHP code?
Antworten
  • a) Sam is the brother of Bob and Jack
  • b) Sam is the brother of Bob and Bob)
  • c) Sam is the brother of Jack and Bob)
  • d) Error

Frage 69

Frage
9. What will be the output of the following PHP code?
Antworten
  • a) Sam is the brother of Bob and Bob) $brother
  • b) Sam is the brother of Bob and Bob)
  • c) $brother
  • d) Error

Frage 70

Frage
10. What will be the output of the following PHP code?
Antworten
  • a) Array ( [0] => LA [1] => Paris [2] => Paris )
  • b) Array ( [0] => NYC [1] => LA [2] => Paris)
  • c) Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris )
  • d) None of the mentioned

Frage 71

Frage
1. What will be the output of the following PHP code ?
Antworten
  • a) Array ( [Harry] => 21 [Ron] => 23 [Malfoy] => 21 )
  • b) Array ( [HARRY] => 21 [RON] => 23 [MALFOY] => 21 )
  • c) Array ( [HARRY] => 21 [RON] => 23 )
  • d) Array ( [Harry] => 21 [Ron] => 23 )

Frage 72

Frage
2. What will be the output of the following PHP code ?
Antworten
  • a) Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow )
  • b) Array ( [a] => a [b] => b [c] => c [d] => d )
  • c) Array ( [red] => a [green] => b [blue] => c [yellow] => d )
  • d) Array ( [a] => red [b] => green [c] => blue [d] => yellow )

Frage 73

Frage
3. What will be the output of the following PHP code ?
Antworten
  • a) Array ( [a] => red [b] => green [c] => blue )
  • b) Array ( [a] => red [b] => green [c] => blue [d] => yellow )
  • c) Array ( [e] => red [f] => green [g] => blue )
  • d) Array ( [a] => red [b] => green [c] => blue [d] => yellow [e] => red [f] => green [g] => blue )

Frage 74

Frage
4. What will be the output of the following PHP code ?
Antworten
  • a) 024
  • b) 120
  • c) 010
  • d) 060

Frage 75

Frage
5. What will be the output of the following PHP code ?
Antworten
  • a) a
  • b) b
  • c) c
  • d) d

Frage 76

Frage
6. What will be the output of the following PHP code ?
Antworten
  • a) Array ( [1] => Mumbai [0] => Beijing )
  • b) Array ( [0] => NYC [1] => London )
  • c) Array ( [1] => NYC [0] => London )
  • d) Array ( [0] => Mumbai [1] => Beijing )

Frage 77

Frage
7. What will be the output of the following PHP code ?
Antworten
  • a) Lucy
  • b) Peter
  • c) Susan
  • d) Edmund

Frage 78

Frage
8. What will be the output of the following PHP code ?
Antworten
  • a) Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 )
  • b) Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 )
  • c) Array ( [0] => 5 [1] => 5 [2] => 5 [3] => 5 [4] => 5 [5] => 5 )
  • d) Array ( [0] => 0 [5] => 5 )

Frage 79

Frage
9. What will be the output of the following PHP code ?
Antworten
  • a) Array ( [0] => red [1] => green [2] => blue [3] => yellow )
  • b) Array ( [0] => blue [1] => yellow [2] => red [3] => green )
  • c) Array ( [0] => red [1] => green )
  • d) Array ( [0] => blue [1] => yellow )

Frage 80

Frage
10. What will be the output of the following PHP code ?
Antworten
  • a) Key = Harry, Value = 21 Key = Ron, Value = 21 Key = Malfoy, Value = 23
  • b) Key = Harry, Value = 21 Key = Ron, Value = 19 Key = Malfoy, Value = 23
  • c) Key = Harry, Value = 21 Key = Malfoy, Value = 23 Key = Ron, Value = 19
  • d) Key = Ron, Value = 19 Key = Harry, Value = 21 Key = Malfoy, Value = 23

Frage 81

Frage
1. What will be the output of the following PHP code?
Antworten
  • a) I like Volvo BMW and Toyota)
  • b) I like Volvo, BMW and Toyota.
  • c) I like Volvo, BMW and Toyota
  • d) I like. Volvo.,. BMW. and) Toyota)

Frage 82

Frage
2. What will be the output of the following PHP code?
Antworten
  • a) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
  • b) Array ( [peter] => 35 [ben] => 37 [joe] => 43 )
  • c) Array ( [PETER] => 35 [BEN] => 37 [JOE] => 43 )
  • d) Array ( [PeTeR] => 35 [BeN] => 37 [Joe] => 43 )

Frage 83

Frage
3. What will be the output of the following PHP code?
Antworten
  • a) Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) )
  • b) Array ( [1] => Array ( [1] => Volvo [2] => BMW ) [2] => Array ( [1] => Toyota [2] => Honda ) [3] => Array ( [1] => Mercedes [2] => Opel ) )
  • c) Array ( [0] => Array ( [0] => Volvo [1] => Volvo ) [1] => Array ( [0] => BMW [1] => BMW ) [2] => Array ( [0] => Toyota [1] => Toyota ) )
  • d) Array ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) )

Frage 84

Frage
4. What will be the output of the following PHP code?
Antworten
  • a) Array ( Peter Ben Joe )
  • b) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
  • c) Array ( 35 37 43 )
  • d) Array ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” )

Frage 85

Frage
5. What will be the output of the following PHP code?
Antworten
  • a) Array ( [A] => 2 [Cat] => 1 [Dog] => 2 )
  • b) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 )
  • c) Array ( [A] => 1 [Cat] => 1 [Dog] => 2 )
  • d) Array ( [A] => 2 [Cat] => 1 [Dog] => 1)

Frage 86

Frage
6. What will be the output of the following PHP code?
Antworten
  • a) Array ( [d] => yellow )
  • b) Array ( [c] => blue )
  • c) Array ( [a] => red )
  • d) Array ( [e] => yellow )

Frage 87

Frage
7. What will be the output of the following PHP code?
Antworten
  • a) Array ( [3] => blue [4] => blue) Array ( [0] => red )
  • b) Array ( [4] => blue [5] => blue [6] => blue) Array ( [0] => red )
  • c) Array ( [3] => blue [4] => blue [5] => blue [6] => blue ) Array ()
  • d) Array ( [3] => blue [4] => blue [5] => blue [6] => blue ) Array ( [0] => red )

Frage 88

Frage
8. What will be the output of the following PHP code?
Antworten
  • a) Array ( [0] => red [1] => green)
  • b) Array ( [0] => blue [1] => yellow [2] => red [3] => green )
  • c) Array ( [0] => red [1] => green [2] => blue [3] => yellow )
  • d) Array ( [0] => blue [1] => yellow )

Frage 89

Frage
9. What will be the output of the following PHP code?
Antworten
  • a) green
  • b) red
  • c) blue
  • d) none of the mentioned

Frage 90

Frage
10. What will be the output of the following PHP code?
Antworten
  • a) Array ( [0] => red [1] => green )
  • b) Array ( [0] => green [1] => blue )
  • c) Array ( [0] => red [1] => blue )
  • d) Array ( [0] => blue [1] => blue )

Frage 91

Frage
1. What will be the output of the following PHP code?
Antworten
  • a) mango
  • b) error
  • c) peach
  • d) 0

Frage 92

Frage
2. Which of the functions is used to sort an array in descending order?
Antworten
  • a) sort()
  • b) asort()
  • c) rsort()
  • d) dsort()

Frage 93

Frage
3. What will be the output of the following PHP code?
Antworten
  • a) Array ( [1] => apple [0] => mango [2] => peach [3] => pear )
  • b) Array ( [0] => apple [1] => mango [2] => peach [3] => pear )
  • c) Error
  • d) Array ( [1] => apple [0] => mango [3] => peach [2] => pear )

Frage 94

Frage
4. What will be the output of the following PHP code?
Antworten
  • a) Array ( [0] => picture1.JPG [1] => Picture10.jpg [2] => picture2.jpg [3] => picture20.jpg )
  • b) Array ( [0] => picture1.JPG [1] => picture2.jpg [2] => Picture10.jpg [3] => picture20.jpg )
  • c) Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture2.jpg [3] => picture20.jpg )
  • d) Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture20.jpg [3] => picture2.jpg )

Frage 95

Frage
5. Say in the above question you need to get the array sorted in the manner we humans would have done it i.e picture1 then picture2 etc.. Which of the following function should be used?
Antworten
  • a) dsort()
  • b) casesort()
  • c) natcasesort()
  • d) naturalsort()

Frage 96

Frage
6. What will be the output of the following PHP code?
Antworten
  • a) Array ( [0] => A [1] => J [2] => Q [3] => K [4] => 2 [5] => 3 [6] => 4 [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 )
  • b) Array ( [0] => A [1] => 2 [2] => J [3] => 3 [4] => Q [5] => 4 [6] => K [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 )
  • c) Error
  • d) Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8] => 10 [9] => A [10] => J [11] => Q [12] => K )

Frage 97

Frage
7. What will be the output of the following PHP code?
Antworten
  • a) Array ( [0] => peach )
  • b) Array ( [0] => apple [1] => mango [2] => peach )
  • c) Array ( [0] => apple [1] => mango )
  • d) Array ( [0] => peach [1] => pear [2] => orange )

Frage 98

Frage
8. What will be the output of the following PHP code?
Antworten
  • a) Error
  • b) Array ( [0] => apple [1] => mango [2] => peach )
  • c) Array ( [0] => apple [1] => mango )
  • d) Array ( [0] => pear [1] => orange )

Frage 99

Frage
9. What will be the output of the following PHP code?
Antworten
  • a) 4hello2
  • b) 4
  • c) 2
  • d) 6

Frage 100

Frage
10. What will be the output of the following PHP code?
Antworten
  • a) Array ( [0] => KA [1] => LA [2] => CA [3] => MA [4] => TA [5] => IA [6] => GA )
  • b) Array ( [0] => KA [2] => CA [4] => TA )
  • c) Array ( [1] => IA [3] => GA )
  • d) Array ( [1] => LA [3] => MA )

Frage 101

Frage
1. PHP has long supported two regular expression implementations known as _______ and _______ i) Perl ii) PEAR iii) Pearl iv) POSIX
Antworten
  • a) i) and ii)
  • b) ii) and iv)
  • c) i) and iv)
  • d) ii) and iii)

Frage 102

Frage
2. Which one of the following regular expression matches any string containing zero or one p?
Antworten
  • a) p+
  • b) p*
  • c) P?
  • d) p#

Frage 103

Frage
3. [:alpha:] can also be specified as..
Antworten
  • a) [A-Za-z0-9].
  • b) [A-za-z].
  • c) [A-z].
  • d) [a-z].

Frage 104

Frage
4. How many functions does PHP offer for searching strings using POSIX style regular expression?
Antworten
  • a) 7
  • b) 8
  • c) 9
  • d) 10

Frage 105

Frage
5. What will be the output of the following PHP code?
Antworten
  • a) Error
  • b) Username must be all lowercase!
  • c) Username is all lowercase!
  • d) No Output is returned

Frage 106

Frage
6. POSIX implementation was deprecated in which version of PHP?
Antworten
  • a) PHP 4
  • b) PHP 5
  • c) PHP 5.2
  • d) PHP 5.3

Frage 107

Frage
7. POSIX stands for
Antworten
  • a) Portable Operating System Interface for Unix
  • b) Portable Operating System Interface for Linux
  • c) Portative Operating System Interface for Unix
  • d) Portative Operating System Interface for Linux

Frage 108

Frage
8. What will be the output of the following PHP code?
Antworten
  • a) this is some text that we might like to parse.
  • b) Array ( [0] => some text that [1] => we might like to parse. )
  • c) Array ( [0] => this is [1] => some text that [2] => we might like to parse. )
  • d) [0] => this is [1] => some text that [2] => we might like to parse.

Frage 109

Frage
9. Which of the following would be a potential match for the Perl-based regular expression /fo{2,4}/ ? i) fol ii) fool iii) fooool iv) fooooool
Antworten
  • a) Only i)
  • b) ii) and iii)
  • c) i), iii) and iv)
  • d) i) and iv)

Frage 110

Frage
10. Which among the following is/are not a metacharacter? i) \a ii) \A iii) \b iv) \B
Antworten
  • a) Only i)
  • b) i) and iii)
  • c) ii), iii) and iv)
  • d) ii) and iv)

Frage 111

Frage
1. How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions.
Antworten
  • a) 7
  • b) 8
  • c) 9
  • d) 10

Frage 112

Frage
2. What will be the output of the following PHP code?
Antworten
  • a) Array ( [0] => pasta [1] => steak [2] => fish [3] => potatoes )
  • b) Array ( [3] => potatoes )
  • c) Array ( [1] => steak )
  • d) Array ( [0] => potatoes )

Frage 113

Frage
3. Say we have two compare two strings which of the following function/functions can you use? i) strcmp() ii) strcasecmp() iii) strspn() iv) strcspn()
Antworten
  • a) i) and ii)
  • b) iii) and iv)
  • c) None of the mentioned
  • d) All of the mentioned

Frage 114

Frage
4. Which one of the following functions will convert a string to all uppercase?
Antworten
  • a) strtoupper()
  • b) uppercase()
  • c) str_uppercase()
  • d) struppercase()

Frage 115

Frage
5. What will be the output of the following PHP code?
Antworten
  • a) O’Malley Wins The Heavyweight Championship!
  • b) O’malley Wins The Heavyweight Championship!
  • c) O’Malley wins the heavyweight championship!
  • d) o’malley wins the heavyweight championship!

Frage 116

Frage
6. What will be the output of the following PHP code?
Antworten
  • a) SaladSaladSaladSaladSalad is good
  • b) is good SaladSaladSaladSaladSalad
  • c) is good Salad
  • d) Salad is good

Frage 117

Frage
7. Which one of the following functions can be used to concatenate array elements to form a single delimited string?
Antworten
  • a) explode()
  • b) implode()
  • c) concat()
  • d) concatenate()

Frage 118

Frage
8. Which one of the following functions finds the last occurrence of a string, returning its numerical position?
Antworten
  • a) strlastpos()
  • b) strpos()
  • c) strlast()
  • d) strrpos()

Frage 119

Frage
9. What will be the output of the following PHP code?
Antworten
  • a) Contact the author of this article at nachiketh@ex@mple.com
  • b) Cont@ct the @uthor of this @rticle @t n@chiketh@ex@mple.com
  • c) Contact the author of this article at n@chiketh@ex@mple.com
  • d) Error

Frage 120

Frage
10. What will be the output of the following PHP code?
Antworten
  • a) nachiketh@example.com
  • b) nachiketh
  • c) nachiketh@
  • d) example.com
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Computing Hardware - CPU and Memory
ollietablet123
SFDC App Builder 2
Parker Webb-Mitchell
Data Types
Jacob Sedore
Intake7 BIM L1
Stanley Chia
Software Processes
Nurul Aiman Abdu
Design Patterns
Erica Solum
CCNA Answers – CCNA Exam
Abdul Demir
Abstraction
Shannon Anderson-Rush
Spyware
Sam2
HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Data Analytics
anelvr