Skip to main content

Web Application Development MCQs with Answers

Practice important Web Application Development MCQs with answers and explanations.

Multiple Choice Questions

Q141: Fill in the blank: The UPDATE table_name SET column1=value WHERE some_column=some_value statement will _______.
  • A: delete records
  • B: create a new table
  • C: update existing records
  • D: select records
View Answer
C

Q142: What is the result of running SELECT id, firstname, lastname FROM student?
  • A: Returns all columns from the table
  • B: Returns only the id, firstname, and lastname columns
  • C: Deletes records from the table
  • D: Updates the records in the table
View Answer
B

Q143: Fill in the blank: The SQL query DELETE FROM student WHERE id=3 will _______.
  • A: insert a new record
  • B: update a record
  • C: delete the record with id 3
  • D: select records with id 3
View Answer
C

Q144: Which PHP function is used to execute a SQL statement in MySQL?
  • A: mysqli_query()
  • B: mysqli_execute()
  • C: mysqli_prepare()
  • D: mysqli_fetch()
View Answer
A

Q145: Fill in the blank: To fetch a result row from a MySQL query as an associative array, use _______.
  • A: mysqli_fetch_assoc()
  • B: mysqli_query()
  • C: mysqli_prepare()
  • D: mysqli_fetch_array()
View Answer
A

Q146: What does the readfile() function do in PHP?
  • A: Deletes a file
  • B: Reads a file and writes it to the output buffer
  • C: Opens a file for writing
  • D: Closes a file
View Answer
B

Q147: Fill in the blank: The fopen() function in PHP is used to _______.
  • A: read a file
  • B: open a file
  • C: delete a file
  • D: close a file
View Answer
B

Q148: What is the purpose of the fclose() function in PHP?
  • A: To open a file
  • B: To delete a file
  • C: To close an open file
  • D: To read data from a file
View Answer
C

Q149: Fill in the blank: The fgets() function reads _______ from a file.
  • A: a single character
  • B: a single line
  • C: the entire file
  • D: multiple lines
View Answer
B

Q150: How do you read a file character by character in PHP?
  • A: Using fread()
  • B: Using fgets()
  • C: Using fgetc()
  • D: Using readfile()
View Answer
C

Test Your Knowledge

Take a timed quiz on Web Application Development

🚀 Start Quiz Now