Computer Science MCQs · MySQL Which of the following is NOT a valid comparison operator in MySQL? A = B != C <= D ## Correct answer MCQSEXAM Show answer Read explanation
Computer Science MCQs · MySQL How can you prevent duplicate entries in a MySQL table? A Use the UNIQUE constraint on a column. Correct answer B Set the primary key to auto-increment. C Use the NOT NULL constraint on all columns. D Manually check for duplicates before inserting data. MCQSEXAM Show answer Read explanation
Computer Science MCQs · MySQL What does the JOIN clause do in a MySQL query? A Combine data from multiple tables based on a related field. Correct answer B Sort the results of a query. C Filter data based on a condition. D Rename a column in a table. MCQSEXAM Show answer Read explanation
Computer Science MCQs · MySQL Which data type would you use to store a customer's phone number in MySQL? A VARCHAR(10) B INT C CHAR(10) Correct answer D DATE MCQSEXAM Show answer Read explanation
Computer Science MCQs · MySQL What is the main purpose of the SELECT statement in MySQL? A Create a new database. B Update existing data in a table. C Retrieve data from one or more tables. Correct answer D Delete rows from a table. MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP What is the purpose of the header() function in PHP? A To define a header for an HTML document B To send raw HTTP headers Correct answer C To include an external PHP file D To set the background color of a webpage MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP Which of the following is a valid way to start a PHP session? A session_begin() B start_session() C session_start() Correct answer D begin_session() MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP In PHP, what is the purpose of the __construct method in a class? A To create a new instance of the class B To initialize class properties Correct answer C To destroy the class object D To update class methods MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP What does the mysqli_real_escape_string() function in PHP do? A Escapes HTML characters in a string B Escapes special characters in a string for use in a SQL statement Correct answer C Converts a string to lowercase D Validates an email address MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP Which of the following is the correct way to include an external PHP file? A include("file.php"); Correct answer B require("file.php"); C import("file.php"); D load("file.php"); MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP What does the foreach loop in PHP do? A Loops through a block of code a specified number of times B Loops through the elements of an array Correct answer C Loops through the characters of a string D Loops through a database result set MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP How do you define a constant in PHP? A define_constant() B create_constant() C const() D define() Correct answer MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP What does the $_SESSION superglobal in PHP store? A Cookies B Session variables Correct answer C Server variables D Global variables MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP What does the function isset() in PHP check for? A Checks if a variable is set and not null Correct answer B Checks if a variable is defined C Checks if a variable is empty D Checks if a variable is numeric MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP Which of the following is used to concatenate two strings in PHP? A . Correct answer B + C :: D - MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP What function is used to output text in PHP? A printText() B echo() Correct answer C display() D outputText() MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP Which directive determines which degree of server details is provided if the ServerSignature directive is enabled? A ServerAddons B ServerExtra C ServerTokens Correct answer D ServerDetails MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP Which directive should we disable to obscure the fact that PHP is being used on our server? A show_php B expose_php Correct answer C print_php D info_php MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP The developers of PHP deprecated the safe mode feature as of which PHP version. A PHP 5.1.0 B PHP 5.2.0 C PHP 5.3.0 Correct answer D PHP 5.3.1 MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP The date() function returns ___ representation of the current date and/or time. A Integer B String Correct answer C Boolean D Float MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP Which one of the following format parameter can be used to identify timezone in PHP? A T B N C E Correct answer D I MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP What is the default value of max_execution_time directive? This directive specifies how many seconds a script can execute before being terminated. A 10 B 20 C 30 Correct answer D 40 MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP In a class diagram the class is divided into three sections, what is displayed in the first section? A Class Attributes B Class Declaration C Class Name Correct answer D Class Functions MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP UML stands for? A unified mailing language B unified mailing languageunified modeling logo C undefined modeling language D unified modeling language Correct answer MCQSEXAM Show answer Read explanation
Computer Science MCQs · PHP Which one of the following means tight coupling? A Code Duplication Correct answer B Inheritance C Encapsulation D Polymorphism MCQSEXAM Show answer Read explanation