Sae Vorbereitung Wddf910 - Test 2 - JavaScript&PHP

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Raijin
R
Raijin
Community Contributor
Quizzes Created: 1 | Total Attempts: 92
Questions: 40 | Attempts: 92

SettingsSettingsSettings
Sae Vorbereitung Wddf910 - Test 2 - JavaScript&PHP - Quiz

Sie müssen min. 80% erreichen um den Test zu bestehen Test by Max


Questions and Answers
  • 1. 

    Welche der folgenden variablen ist gültig ?

    • A.

      Var ersteZahl = 5

    • B.

      ErsteZahl = 5

    • C.

      Var ersteZahl == 5

    • D.

      $ersteZahl = 5

    Correct Answer
    A. Var ersteZahl = 5
    Explanation
    The correct answer is "Var ersteZahl = 5". This is a valid variable declaration in JavaScript, where "Var" is used to declare a variable and "ersteZahl" is the variable name. The value assigned to the variable is 5.

    Rate this question:

  • 2. 

    Einfache Rückmeldung an den Benutzer

    • A.

      Alert("ruckmeldung")

    • B.

      Popup("test")

    • C.

      Windo.open("test")

    Correct Answer
    A. Alert("ruckmeldung")
    Explanation
    The correct answer is "alert("ruckmeldung")". This answer is correct because the "alert()" function in JavaScript displays a simple message box with the specified message, in this case "ruckmeldung". This provides a simple feedback or notification to the user. The other options, "popup("test")" and "windo.open("test")", are not valid JavaScript functions and would result in errors. Therefore, the correct option is to use the "alert()" function to provide a simple feedback to the user.

    Rate this question:

  • 3. 

    Was passiert bei window.location.href

    • A.

      Eine url wird aufgerufen

    • B.

      Ein window wird geschlosschen

    • C.

      Die url wird kopiert

    Correct Answer
    A. Eine url wird aufgerufen
    Explanation
    The statement "window.location.href" is used to access the current URL of the window or to navigate to a new URL. Therefore, when this code is executed, it will navigate to a specific URL.

    Rate this question:

  • 4. 

    Anweisung die bestimmten Code ausführt wenn die Bedingung erfüllt ist

    • A.

      Where-anweisung

    • B.

      If-anweisung

    • C.

      For-schleife

    Correct Answer
    B. If-anweisung
    Explanation
    The correct answer is "if-anweisung". This is because an "if-anweisung" (if statement) is a programming construct that executes a certain block of code only if a specified condition is true. It allows for conditional execution, where the code inside the if statement is executed only when the given condition is met.

    Rate this question:

  • 5. 

    Es soll die Javascript Funktion setDate aufgerufen werden. Dazu Bietet sich zahlreiche Events an einer ist falsch Welche?

    • A.

      Onreleaseoutside = "setDate()";

    • B.

      Nix

    Correct Answer
    A. Onreleaseoutside = "setDate()";
    Explanation
    The given line of code "onreleaseoutside = "setDate()";" is incorrect because there is no event called "onreleaseoutside" in JavaScript. Therefore, calling the setDate() function using this event will not work.

    Rate this question:

  • 6. 

    Wie verbindet man in Javascript mehrere Befehle?

    • A.

      .

    • B.

      :

    • C.

      +

    • D.

      ,

    Correct Answer
    A. .
    Explanation
    In Javascript, multiple commands can be connected using the dot (.) operator. This is known as the dot notation and is used to access properties or methods of an object. By using the dot operator, you can chain together multiple commands to perform a sequence of actions.

    Rate this question:

  • 7. 

    Wie greift man auf ein element mit der ID mein Elment zu?

    • A.

      Document.getElementById("meinElment")

    • B.

      Window.getElementById("meinElment")

    • C.

      Document.getElementBy("meinElment")

    Correct Answer
    A. Document.getElementById("meinElment")
    Explanation
    To access an element with the ID "meinElment", the correct way is to use the method "getElementById" from the "document" object. This method searches for an element in the HTML document with the specified ID and returns that element. The other options provided, "window.getElementById" and "document.getElementBy", are not valid methods and will result in an error.

    Rate this question:

  • 8. 

    Was ist Javascript?

    • A.

      Eine clientseitige scriptsprache

    • B.

      Eine serverseitige Scriptsprache

    Correct Answer
    A. Eine clientseitige scriptsprache
    Explanation
    Javascript ist eine clientseitige Scriptsprache. Das bedeutet, dass sie im Webbrowser des Benutzers ausgeführt wird und dort interaktive Funktionen auf einer Webseite ermöglicht. Im Gegensatz dazu wird eine serverseitige Scriptsprache auf dem Server ausgeführt, um Daten zu verarbeiten, bevor sie an den Browser gesendet werden.

    Rate this question:

  • 9. 

    Es soll eine Popup Meldung mit Ok Button auf dem Bildschirm erstellt werden? Welchen Befehl muss hierbei verwendet werden?

    • A.

      Alert();

    • B.

      Confrim();

    • C.

      Popup();

    Correct Answer
    A. Alert();
    Explanation
    The correct answer is "alert()". This function is used to create a popup message with an OK button on the screen. It is commonly used in JavaScript to display messages or notifications to the user.

    Rate this question:

  • 10. 

    Wofür ist der Befehl .substr

    • A.

      Sie gibt einen Teilstring zurück

    • B.

      Sie mulitpliziert 2 int Werte

    • C.

      Speichert einen String

    Correct Answer
    A. Sie gibt einen Teilstring zurück
    Explanation
    Der Befehl .substr wird verwendet, um einen Teilstring aus einem vorhandenen String zurückzugeben. Es ermöglicht, einen bestimmten Abschnitt des Strings basierend auf der angegebenen Startposition und der Länge des Teilstrings auszuwählen und zurückzugeben.

    Rate this question:

  • 11. 

    Welche Aussage stimmt in Bezug auf Funktionen?

    • A.

      Ermöglicht eine sinnvolle und logische Aufteilung von Programm abschnitten

    • B.

      Ermöglicht eine neue art des programmierens

    • C.

      Ermöglicht das aufteilen des Codes in mehrere Dateien

    Correct Answer
    A. Ermöglicht eine sinnvolle und logische Aufteilung von Programm abschnitten
    Explanation
    Functions ermöglichen eine sinnvolle und logische Aufteilung von Programmabschnitten. Durch die Verwendung von Funktionen kann der Code in kleinere, wiederverwendbare Teile aufgeteilt werden, was die Lesbarkeit, Wartbarkeit und Skalierbarkeit des Codes verbessert. Funktionen ermöglichen auch die Modulbildung, indem sie bestimmte Aufgaben isolieren und separat behandeln. Dies führt zu einer klareren Struktur des Codes und erleichtert die Fehlerbehebung und das Testen.

    Rate this question:

  • 12. 

    Daten auf Festplatten manipulieren mit JS

    • A.

      Richtig

    • B.

      Flasch

    Correct Answer
    B. Flasch
  • 13. 

    Was kann Javascript mit dem Objekt .style bewirken?

    • A.

      Dauerhafte Änderung der css im browser

    • B.

      Temporäre Änderung der css im browser

    Correct Answer
    B. Temporäre Änderung der css im browser
    Explanation
    Javascript kann mit dem Objekt .style temporäre Änderungen an der CSS im Browser bewirken. Das bedeutet, dass Javascript die Eigenschaften und Werte der CSS-Regeln eines Elements ändern kann, um beispielsweise das Aussehen oder das Verhalten der Webseite dynamisch anzupassen. Diese Änderungen sind jedoch nur vorübergehend und werden nicht dauerhaft gespeichert.

    Rate this question:

  • 14. 

    Kann man mit PHP css Code ausgeben?

    • A.

      Ja

    • B.

      Nein

    Correct Answer
    A. Ja
    Explanation
    Ja, man kann mit PHP CSS-Code ausgeben. PHP ist eine serverseitige Skriptsprache, die in HTML-Dokumente eingebettet werden kann. Mit PHP kann man dynamisch CSS-Code generieren und in das HTML-Dokument einfügen. Dies ermöglicht es, das Aussehen einer Webseite basierend auf bestimmten Bedingungen oder Variablen zu ändern. PHP bietet Funktionen wie "echo" oder "print", mit denen CSS-Code direkt in das HTML-Dokument ausgegeben werden kann.

    Rate this question:

  • 15. 

    Wie macht man einen Zeilenumbruch in Php?

    • A.

      Echo "/n";

    • B.

    • C.

      Print_r "/n";

    Correct Answer
    A. Echo "/n";
    Explanation
    The correct answer is echo "/n". In PHP, the escape sequence for a newline is "\n". By using the echo statement, we can output a newline character to create a line break in the displayed text.

    Rate this question:

  • 16. 

    Wie erzeugt man Konstanten?

    • A.

      Define("TEST, "Hallo Welt");

    • B.

      Static("TEST, "hallo Welt");

    • C.

      Refind("TEST,"Hallo Welt");

    Correct Answer
    A. Define("TEST, "Hallo Welt");
    Explanation
    The correct answer is define("TEST, "Hallo Welt");. This is because the define() function in PHP is used to define a constant. In this case, the constant named "TEST" is being defined with the value "Hallo Welt". The static() and refind() functions mentioned in the other options are not valid functions in PHP for defining constants.

    Rate this question:

  • 17. 

    Wie kann man die Anzahl der Elemente eines Arrays auslesen $test = array('wert1','wert2');

    • A.

      .length

    • B.

      .count

    • C.

      Count($test)

    • D.

      Test.count()

    Correct Answer
    C. Count($test)
    Explanation
    The correct answer is count($test). In PHP, the count() function is used to count the number of elements in an array. In this case, the array $test has two elements, 'wert1' and 'wert2', so the count($test) will return 2. The other options, .length, .count, and test.count() are not valid syntax or functions in PHP for counting the elements of an array.

    Rate this question:

  • 18. 

    Beste schleife um die jeweiligen Keys eines Arrays auszulesen

    • A.

      For

    • B.

      Foreach

    • C.

      While

    • D.

      If

    Correct Answer
    B. Foreach
    Explanation
    The correct answer is "foreach". The foreach loop is used to iterate over each element in an array and perform a specific action. It allows us to access the keys and values of an array without needing to manually manage an index or counter variable. Therefore, the foreach loop is the best choice for extracting the keys of an array.

    Rate this question:

  • 19. 

    Was ist $_POST

    • A.

      Ein assoziatives Array aller mit POST übertragener Daten

    • B.

      Ein super Globale Variable

    Correct Answer
    A. Ein assoziatives Array aller mit POST übertragener Daten
    Explanation
    $_POST ist ein assoziatives Array, das alle mit POST übertragenen Daten enthält. Wenn ein Formular mit der Methode POST abgeschickt wird, werden die Werte der Eingabefelder als Schlüssel-Wert-Paare im $_POST Array gespeichert. Dies ermöglicht es, auf die übertragenen Daten zuzugreifen und sie in der weiteren Verarbeitung zu verwenden. Daher ist die Aussage "Ein assoziatives Array aller mit POST übertragener Daten" korrekt.

    Rate this question:

  • 20. 

    Zeichen für eine Variable in PHP

    • A.

      $

    • B.

      Var

    • C.

      $$

    • D.

      &

    Correct Answer
    A. $
    Explanation
    The correct answer is "$". In PHP, the dollar sign ($) is used to indicate a variable. This symbol is used before the variable name to declare and access its value.

    Rate this question:

  • 21. 

    Wo muss man den Fehler meistens suchen wenn man einen PHP Parse ERROR bekommt?

    • A.

      Zeile oben drüber

    • B.

      Zeile drunter

    • C.

      2 Zeilen drüber

    Correct Answer
    A. Zeile oben drüber
    Explanation
    When encountering a PHP Parse ERROR, the most common place to search for the error is the line directly above the line where the error is indicated. This is because the error is often caused by a mistake or syntax issue in the line preceding the error. By checking the line above, you can identify and correct any errors that may have led to the Parse ERROR.

    Rate this question:

  • 22. 

    Welche 3 Mehtoden sind bekannt um Textfiles auszulesen ?

    • A.

      File(), fopen(), fgets(),file_get_contents()

    • B.

      Nix

    Correct Answer
    A. File(), fopen(), fgets(),file_get_contents()
    Explanation
    The correct answer is file(), fopen(), fgets(), and file_get_contents(). These are three commonly used methods in PHP to read text files. The file() function reads the entire file into an array, with each line of the file as an element of the array. The fopen() function opens a file and returns a file pointer, which can be used to read the file. The fgets() function reads a single line from the file. The file_get_contents() function reads the entire contents of a file into a string.

    Rate this question:

  • 23. 

    Was macht der Befehl strstr($variable, "string") ?

    • A.

      Sucht in einem string eine zeichenkette

    • B.

      Löscht etwas aus einem string

    Correct Answer
    A. Sucht in einem string eine zeichenkette
    Explanation
    Der Befehl strstr($variable, "string") sucht in einem String nach einer bestimmten Zeichenkette.

    Rate this question:

  • 24. 

    Wie bezeichnet man $_SESSION ?

    • A.

      Variable

    • B.

      Superglobale

    • C.

      Mediagobale

    Correct Answer
    B. Superglobale
    Explanation
    The correct answer is "Superglobale." In PHP, $_SESSION is a superglobal variable that is used to store and access session data across multiple pages or requests. It is an associative array that holds information about the current session, such as user-specific data or login credentials. Superglobal variables are accessible from any scope within a PHP script, making them widely used and convenient for passing data between different parts of a program.

    Rate this question:

  • 25. 

    Kann mit php dynamisch css und javascript erstellt werden?

    • A.

      Ja

    • B.

      Nein

    Correct Answer
    A. Ja
    Explanation
    Yes, with PHP it is possible to dynamically create CSS and JavaScript. PHP can generate dynamic content, including CSS and JavaScript code, based on certain conditions or user input. This allows for more flexibility and customization in web development.

    Rate this question:

  • 26. 

    Wie beendet man eine Session in PHP ?

    • A.

      Session_destroy()

    • B.

      Destroy_session()

    • C.

      Stop_session()

    Correct Answer
    A. Session_destroy()
    Explanation
    The correct answer is session_destroy(). This function is used in PHP to end a session and release all session variables. It destroys all data registered to a session and clears all session variables. By calling this function, the session data is removed from the server and the client's session cookie is deleted. This ensures that the session is completely terminated and no longer accessible.

    Rate this question:

  • 27. 

    Kann man Variablen die Außerhalb einer Funktion erstellt wurden verändern?

    • A.

      Ja

    • B.

      Nein

    Correct Answer
    B. Nein
    Explanation
    Variables that are created outside of a function are known as global variables. These variables can be accessed and modified from anywhere within the program, including inside functions. Therefore, the correct answer is "No" as global variables can be modified.

    Rate this question:

  • 28. 

    Eine neue fpdf-Klasse erzeugen

    • A.

      $pdf = new fpdf();

    • B.

      $pdf = new f-pdf();

    Correct Answer
    A. $pdf = new fpdf();
    Explanation
    The correct answer is $pdf = new fpdf(); In this code, a new object of the fpdf class is being created and assigned to the variable $pdf. This allows the use of the fpdf class's functions and methods to generate PDF documents. The other line of code "$pdf = new f-pdf();" is incorrect because it contains a syntax error with the hyphen in the class name.

    Rate this question:

  • 29. 

    Was ist keine Supergobale?

    • A.

      $_FOLDER

    • B.

      $_SERVER

    • C.

      $_PHP

    • D.

      $_POST

    Correct Answer
    A. $_FOLDER
    Explanation
    The given options are all PHP superglobals, which are predefined variables that are always accessible from any scope. However, $_FOLDER is not a valid PHP superglobal.

    Rate this question:

  • 30. 

    Wie überprüft man einen Regex Code zb einer email

    • A.

      Preg-match ()

    • B.

      Match()

    Correct Answer
    A. Preg-match ()
    Explanation
    The correct answer is "preg-match()". This function is used to perform a regular expression match on a given string. In the context of checking a regex code for an email, preg-match() can be used to determine if the email matches the specified pattern. It returns 1 if there is a match and 0 if there is no match.

    Rate this question:

  • 31. 

    Liefert mysql_insert_id(); die ID der kommenden Inser-Operation

    • A.

      Ja

    • B.

      Nein

    Correct Answer
    B. Nein
    Explanation
    The mysql_insert_id() function does not return the ID of the upcoming insert operation. It actually returns the ID generated by the most recent insert operation in the current connection. Therefore, the correct answer is "Nein" (No).

    Rate this question:

  • 32. 

    Was macht mysql_fetch_array()

    • A.

      Wandelt einen Datensatz in ein Array um

    • B.

      Wandelt ein Array in einen Datensatz um

    • C.

      Erzeugt ein neues Array namens fetch

    Correct Answer
    A. Wandelt einen Datensatz in ein Array um
    Explanation
    mysql_fetch_array() ist eine Funktion in PHP, die einen Datensatz aus einer MySQL-Datenbank abruft und in ein Array umwandelt. Dies ermöglicht es, auf die einzelnen Werte des Datensatzes zuzugreifen und sie in der Anwendung zu verwenden. Die Funktion gibt das Array zurück, das die Werte des Datensatzes enthält.

    Rate this question:

  • 33. 

    Unterschied zwischen fetch_array und fetch_assoc

    • A.

      Fetch_array bildet einen numerisches und assoziatives array

    • B.

      Nix

    Correct Answer
    A. Fetch_array bildet einen numerisches und assoziatives array
    Explanation
    The correct answer states that fetch_array creates both a numeric and associative array.

    Rate this question:

  • 34. 

    Wie zählt man alle Einträge  einer SQL Tabelle

    • A.

      SELECT count(*) FROM tabelle

    • B.

      SELECT * FROM tabelle

    • C.

      DELETE * FROM tabelle

    Correct Answer
    A. SELECT count(*) FROM tabelle
    Explanation
    The correct answer is SELECT count(*) FROM tabelle. This query will count all the entries in the SQL table named "tabelle". The count(*) function counts all the rows in the table and returns the result.

    Rate this question:

  • 35. 

    Was macht foreach ($row as $key=>$value){}

    • A.

      Arbeitet ein Array ab und speichert Schlüsselwertpaare

    • B.

      Nix

    Correct Answer
    A. Arbeitet ein Array ab und speichert Schlüsselwertpaare
    Explanation
    Die foreach-Schleife durchläuft jedes Element des Arrays $row und speichert den Schlüsselwert in der Variablen $key und den entsprechenden Wert in der Variablen $value. Dadurch können die Schlüsselwertpaare des Arrays weiterverarbeitet oder ausgegeben werden.

    Rate this question:

  • 36. 

    Wie lautet der Befehl zur Entfernung von HTML Tags aus einem String?

    • A.

      Strip_tags();

    • B.

      Strip_slashes();

    • C.

      Tags() --

    Correct Answer
    A. Strip_tags();
    Explanation
    The correct answer is strip_tags();. This function is used to remove HTML tags from a string in PHP. It takes a string as input and returns the string with all HTML tags removed. This can be useful when you want to sanitize user input or when you need to extract only the plain text content from an HTML document.

    Rate this question:

  • 37. 

    Wo muss die Funktion exit() im Quellcode stehen, damit sie keine Fehlermeldung erzeugt ?

    • A.

      Bevor eine Ausgabe an den Browser übergeben wird

    • B.

      Am ende der php datei

    Correct Answer
    A. Bevor eine Ausgabe an den Browser übergeben wird
    Explanation
    The function exit() should be placed before any output is sent to the browser in order to avoid generating an error message.

    Rate this question:

  • 38. 

    Wozu verwendet man RTF Texte?

    • A.

      Das sind formatierte Template Tete in denen dynamische Keywords stehen

    • B.

      Um Tabellen abzuspeichern

    • C.

      Zum rechnen von Buchstaben

    Correct Answer
    A. Das sind formatierte Template Tete in denen dynamische Keywords stehen
    Explanation
    RTF Texte werden verwendet, um formatierte Vorlagen mit dynamischen Schlüsselwörtern zu erstellen. Diese Vorlagen können dann verwendet werden, um automatisch generierte Texte zu erstellen, indem die dynamischen Schlüsselwörter mit den entsprechenden Daten ersetzt werden. Dies ermöglicht eine effiziente Erstellung von Dokumenten mit wiederkehrendem Inhalt, wie zum Beispiel Serienbriefe oder Berichte.

    Rate this question:

  • 39. 

    Lassen sich in Mysql Tabellen auch Binärdaten abspeichern?

    • A.

      Ja

    • B.

      Nein

    Correct Answer
    A. Ja
    Explanation
    In Mysql können Binärdaten in Tabellen gespeichert werden.

    Rate this question:

  • 40. 

    Wofür stehen die Variablen $key und $value

    • A.

      Für schlüsse-werte-paare einer Tabellenzeile

    • B.

      Für Werte in einer Datenbank

    Correct Answer
    A. Für schlüsse-werte-paare einer Tabellenzeile
    Explanation
    Die Variablen $key und $value stehen für Schlüssel-Werte-Paare einer Tabellenzeile. Das bedeutet, dass $key den Schlüsselwert und $value den dazugehörigen Wert repräsentiert. In einer Tabellenzeile können verschiedene Informationen gespeichert werden, die jeweils durch einen eindeutigen Schlüssel identifiziert werden. Durch die Verwendung von $key und $value können diese Schlüssel-Werte-Paare effizient verarbeitet und manipuliert werden.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 07, 2011
    Quiz Created by
    Raijin
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.