1.
Welche der folgenden variablen ist gültig ?
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.
2.
Einfache Rückmeldung an den Benutzer
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.
3.
Was passiert bei window.location.href
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.
4.
Anweisung die bestimmten Code ausführt wenn die Bedingung erfüllt ist
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.
5.
Es soll die Javascript Funktion setDate aufgerufen werden. Dazu Bietet sich zahlreiche Events an einer ist falsch Welche?
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.
6.
Wie verbindet man in Javascript mehrere Befehle?
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.
7.
Wie greift man auf ein element mit der ID mein Elment zu?
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.
8.
Was ist Javascript?
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.
9.
Es soll eine Popup Meldung mit Ok Button auf dem Bildschirm erstellt werden? Welchen Befehl muss hierbei verwendet werden?
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.
10.
Wofür ist der Befehl .substr
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.
11.
Welche Aussage stimmt in Bezug auf Funktionen?
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.
12.
Daten auf Festplatten manipulieren mit JS
Correct Answer
B. Flasch
13.
Was kann Javascript mit dem Objekt .style bewirken?
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.
14.
Kann man mit PHP css Code ausgeben?
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.
15.
Wie macht man einen Zeilenumbruch in Php?
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.
16.
Wie erzeugt man Konstanten?
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.
17.
Wie kann man die Anzahl der Elemente eines Arrays auslesen $test = array('wert1','wert2');
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.
18.
Beste schleife um die jeweiligen Keys eines Arrays auszulesen
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.
19.
Was ist $_POST
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.
20.
Zeichen für eine Variable in PHP
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.
21.
Wo muss man den Fehler meistens suchen wenn man einen PHP Parse ERROR bekommt?
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.
22.
Welche 3 Mehtoden sind bekannt um Textfiles auszulesen ?
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.
23.
Was macht der Befehl strstr($variable, "string") ?
Correct Answer
A. Sucht in einem string eine zeichenkette
Explanation
Der Befehl strstr($variable, "string") sucht in einem String nach einer bestimmten Zeichenkette.
24.
Wie bezeichnet man $_SESSION ?
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.
25.
Kann mit php dynamisch css und javascript erstellt werden?
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.
26.
Wie beendet man eine Session in PHP ?
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.
27.
Kann man Variablen die Außerhalb einer Funktion erstellt wurden verändern?
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.
28.
Eine neue fpdf-Klasse erzeugen
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.
29.
Was ist keine Supergobale?
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.
30.
Wie überprüft man einen Regex Code zb einer email
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.
31.
Liefert mysql_insert_id(); die ID der kommenden Inser-Operation
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).
32.
Was macht mysql_fetch_array()
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.
33.
Unterschied zwischen fetch_array und fetch_assoc
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.
34.
Wie zählt man alle Einträge einer SQL 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.
35.
Was macht foreach ($row as $key=>$value){}
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.
36.
Wie lautet der Befehl zur Entfernung von HTML Tags aus einem String?
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.
37.
Wo muss die Funktion exit() im Quellcode stehen, damit sie keine Fehlermeldung erzeugt ?
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.
38.
Wozu verwendet man RTF Texte?
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.
39.
Lassen sich in Mysql Tabellen auch Binärdaten abspeichern?
Correct Answer
A. Ja
Explanation
In Mysql können Binärdaten in Tabellen gespeichert werden.
40.
Wofür stehen die Variablen $key und $value
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.