MCQ Exam

30:00

Question 1: What is the use of the array_combine() function in PHP?

Question 2: What is the purpose of the array_intersect() function in PHP?

Question 3: What is the use of the array_diff() function in PHP?

Question 4: What is PHP?

Question 5: How do you create a hyperlink to another webpage?

Question 6: What is the correct HTML for creating a superscript text?

Question 7: How do you select the first letter of a paragraph in CSS?

Question 8: What is the correct way to end a PHP statement?

Question 9: What is the difference between fopen and file_get_contents for reading files in PHP?

Question 10: Which CSS property is used to control the space between lines of text?

Question 11: What is the difference between single quotes (') and double quotes ("") in PHP string literals?

Question 12: Which CSS property is used to add rounded corners to an element?

Question 13: Which HTML element is used to display a scalar measurement within a range?

Question 14: How do you select an element with id "demo" in CSS?

Question 15: Write a PHP program to find the factorial of a given number using recursion

Question 16: What is the purpose of CSS?

Question 17: How do you select the first line of a paragraph in CSS?

Question 18: How do you add a comment in JavaScript?

Question 19: What is the purpose of the array_merge() function in PHP?

Question 20: What is the CSS property used to set the list item marker style?

Question 21: How do you select all paragraphs in CSS?

Question 22: What is the correct HTML for creating a checkbox?

Question 23: What is the purpose of the CSS position property?

Question 24: Write a PHP program to check if a year is a leap year

Question 25: What is the correct HTML element for the largest heading?

Question 26: What is the CSS property used to add shadow to text?

Question 27: What is the CSS property used to control the style of the bullet in a list?

Question 28: What is the correct HTML for creating a hyperlink to an email address?

Question 29: What is the purpose of the array_push() function in PHP?

Question 30: What is the CSS property used to control the width of an element?

Question 31: What does JavaScript stand for?

Question 32: What is the correct way to declare a JavaScript variable?

Question 33: What is the JavaScript syntax for writing comments?

Question 34: What is a return statement in PHP, and why is it used?

Question 35: What is the purpose of the require statement in PHP?

Question 36: How do you select elements that are not hovered over in CSS?

Question 37: Which HTML tag is used to define a hyperlink?

Question 38: Write a PHP program to find the sum of all odd numbers from 1 to 100

Question 39: How do you create an ordered list in HTML?

Question 40: What is the correct HTML for creating a hyperlink to another website?

Question 41: How do you select all elements with a specific class in CSS?

Question 42: What is the correct HTML for creating a subscript text?

Question 43: What is the CSS property used to set the opacity of an element?

Question 44: How do you select elements that are in a specific state, like when hovered over, in CSS?

Question 45: How do you create a JavaScript function that returns a value?

Question 46: How do you open and close a file in PHP?

Question 47: How do you access an element in an associative array in PHP?

Question 48: Write a PHP program to count the number of words in a given sentence

Question 49: How do you select all links in CSS?

Question 50: How do you create a function in PHP?

Question 51: How do you add comments in CSS?

Question 52: What is the difference between include and require in PHP?

Question 53: What is the purpose of the unset function in PHP?

Question 54: How do you select the last line of a paragraph in CSS?

Question 55: What is the CSS property used to set the background color of an element?

Question 56: How do you select all elements with a specific attribute in CSS?

Question 57: What is the CSS property used to change the text color of an element?

Question 58: What is the ternary operator in PHP, and how is it used?

Question 59: What is the difference between == and === in PHP?

Question 60: Write a PHP program to check if a number is prime

Question 61: Write a PHP program to find the smallest element in an array

Question 62: How do you comment out multiple lines of code in JavaScript?

Question 63: Which event is triggered when a user clicks on an HTML element?

Question 64: What does HTML stand for?

Question 65: Which HTML attribute is used to specify that an input field must be filled out?

Question 66: How do you create a new paragraph in HTML?

Question 67: Which HTML tag is used to define an external style sheet?

Question 68: Which CSS property is used to control the alignment of text?

Question 69: What is the CSS property used to set the text transform of an element?

Question 70: How do you create a for loop in JavaScript?

Question 71: What is the use of the array_flip() function in PHP?

Question 72: What is the purpose of the HTML

element?

Question 73: What is the CSS property used to set the margin on the top of an element?

Question 74: How do you declare a function in JavaScript?

Question 75: What is the CSS property used to set the font style of an element?

Question 76: What is the CSS property used to set the font weight of an element?

Question 77: Write a PHP program to find the average of an array of numbers

Question 78: How do you select elements that have a specific attribute with a specific value in CSS?

Question 79: How do you select elements that are visited links in CSS?

Question 80: What is the CSS property used to control the style of a border?

Question 81: What is the result of the following expression: "5" + 2 in JavaScript?

Question 82: What is the CSS property used to control the spacing between lines of text?

Question 83: Write a PHP program to print the first 10 natural numbers

Question 84: Which operator is used for strict equality in JavaScript?

Question 85: What is the CSS property used to set the maximum width of an element?

Question 86: What is the CSS property used to set the border color of an element?

Question 87: What is the CSS property used to change the font size of an element?

Question 88: What is the JavaScript syntax for creating an object?

Question 89: What is the correct HTML for inserting a background image?

Question 90: How do you make a list that lists its items with numbers in HTML?

Question 91: How do you call a function named "myFunction" in JavaScript?

Question 92: What is the latest stable version of PHP?

Question 93: What is the correct HTML for creating a video?

Question 94: How do you select elements that are out of focus in CSS?

Question 95: What is the correct HTML for creating a hyperlink to a webpage?

Question 96: What is the correct JavaScript syntax for referring to an external script called "script.js"?

Question 97: What is the use of the array_push() function in PHP?

Question 98: What is the correct HTML for creating a numbered list?

Question 99: How do you define a constant in PHP?

Question 100: What is an associative array in PHP?

Question 101: What is the correct CSS syntax for making all the

elements bold?

Question 102: Write a PHP program to find the second largest element in an array

Question 103: How do you select elements with class "example" in CSS?

Question 104: How do you create a hyperlink that will send an email?

Question 105: What is the foreach loop used for in PHP?

Question 106: What is the correct CSS syntax for changing the font of an element to Arial?

Question 107: Write a PHP program to reverse a given string

Question 108: What is the CSS property used to set the outline of an element?

Question 109: What is a parameter in a PHP function?

Question 110: What is the purpose of the HTML element?

Question 111: What is the correct HTML for inserting a copyright symbol?

Question 112: What is the purpose of the include statement in PHP?

Question 113: What is the correct HTML for creating a text area?

Question 114: How do you select the nth-of-type element in CSS?

Question 115: How do you add an element to an associative array in PHP?

Question 116: Write a PHP program to find the square root of a given number

Question 117: How do you select elements that are being clicked in CSS?

Question 118: What is the scope of a global variable in PHP?

Question 119: What is the CSS property used to control the spacing between elements?

Question 120: What is the purpose of the CSS float property?

Question 121: How do you select elements that have focus in CSS?

Question 122: How do you write a conditional statement for executing some code if "x" is equal to 5 in JavaScript?

Question 123: What is the purpose of the PHP function "echo"?

Question 124: Write a PHP program to find the sum of all even numbers from 1 to 100

Question 125: Explain the concept of variable variable names in PHP.

Question 126: What is the correct HTML for adding a background color?

Question 127: Which property is used to change the left margin of an element?

Question 128: Which HTML tag is used to create a hyperlink?

Question 129: Write a PHP program to sort an array in ascending order

Question 130: Which HTML element defines navigation links?

Question 131: What is the correct HTML for referring to an external style sheet?

Question 132: Which HTML tag is used to define a paragraph?

Question 133: What is the correct HTML for creating a copyright symbol?

Question 134: How do you select the nth child element in CSS?

Question 135: What is the purpose of the array_shift() function in PHP?

Question 136: What is the correct HTML for creating a line break?

Question 137: What is the CSS property used to set the padding on all sides of an element?

Question 138: What is the CSS property used to set the height of an element?

Question 139: What is the correct way to write an if statement in JavaScript?

Question 140: What is the correct HTML for creating a hyperlink to another website in a new tab?

Question 141: What is the correct HTML for creating an email link?

Question 142: Write a PHP program to find the length of a given string

Question 143: What is the correct HTML for creating a table header?

Question 144: How do you make a text input field read-only in HTML?

Question 145: Write a PHP program to find the power of a number

Question 146: What is the JavaScript operator for exponentiation?

Question 147: Write a PHP program to find the number of vowels in a given string

Question 148: Write a PHP program to check if a string is a palindrome

Question 149: What is the CSS property used to set the text alignment within an element?

Question 150: How do you write data to a file in PHP?

Question 151: What does CSS stand for?

Question 152: What is the purpose of the array_pop() function in PHP?

Question 153: How do you create an unordered list with square bullets?

Question 154: Which HTML tag is used to define a table row?

Question 155: Which CSS property is used to control the transparency of an element?

Question 156: What is the correct HTML for creating a horizontal line?

Question 157: What is the purpose of the array_key_exists() function in PHP?

Question 158: How do you concatenate two strings in PHP?

Question 159: How do you select all headers (h1 to h6) in CSS?

Question 160: How do you round a number to the nearest integer in JavaScript?

Question 161: What is the correct HTML for creating a submit button?

Question 162: What is the CSS property used to set the border width of an element?

Question 163: Write a PHP program to generate a random number between 1 and 100

Question 164: What is the difference between include_once and include in PHP?

Question 165: How do you call a function in PHP?

Question 166: Which CSS property is used to change the font size of an element?

Question 167: How do you check if a variable is set in PHP?

Question 168: Write a PHP program to reverse an array

Question 169: Which HTML tag is used to define a table?

Question 170: What is the purpose of the array_keys() function in PHP?

Question 171: What is the correct HTML for creating a button?

Question 172: Which CSS property is used to change the text color of an element?

Question 173: How do you create a new list item in HTML?

Question 174: Write a PHP program to find the Fibonacci series up to a given number

Question 175: What is the purpose of the CSS display property?

Question 176: What is the use of the array_values() function in PHP?

Question 177: How do you include an external CSS file in an HTML document?

Question 178: What is the purpose of the CSS z-index property?

Question 179: What is the CSS property used to set the text decoration of an element?

Question 180: How do you center an element horizontally in CSS?

Question 181: How do you change the text of an HTML element with id="demo" using JavaScript?

Question 182: How do you make a background image repeat horizontally in CSS?

Question 183: What is the correct HTML for inserting an image?

Question 184: Which CSS property is used to change the background color of an element?

Question 185: What is the purpose of the HTML element?

Question 186: Which HTML tag is used to define an unordered list?

Question 187: Write a PHP program to find the largest number among three numbers

Question 188: What is the correct HTML for creating a table?

Question 189: Write a PHP program to find the GCD of two numbers

Question 190: How do you create a comment in HTML?

Question 191: What is the purpose of the HTML element?

Question 192: Which HTML tag is used to define an internal style sheet?

Question 193: How do you make a text italic in CSS?

Question 194: How do you make a list that lists its items with squares?

Question 195: How do you create an ordered list with numbers in HTML?

Question 196: Write a PHP program to display "Hello, World!"

Question 197: How do you add an element to the end of an array in JavaScript?

Question 198: Which HTML tag is used to define a list item?

Question 199: What is the CSS property used to set the font family of an element?

Question 200: Write a PHP program to find the largest element in an array

Question 201: How do you select elements that are checked (e.g., checkboxes) in CSS?

Question 202: What is the correct HTML for inserting a line break?

Question 203: What is the scope of a local variable in PHP?

Question 204: How do you create a class selector in CSS?

Question 205: What is the CSS property used to set the border radius of an element?

Question 206: How do you create a JavaScript function that takes parameters?

Question 207: What is the difference between require_once and require in PHP?

Question 208: Which CSS property is used to control the width of an element?

Question 209: What is the correct HTML for inserting a paragraph?

Question 210: Write a PHP program to declare a variable named "num" and assign it the value 42

Question 211: Write a PHP program to find the factorial of a number

Question 212: Which CSS property is used to control the space between the letters of text?

Question 213: What is the result of the following expression: 5 % 2 in JavaScript?

Question 214: How do you select elements that are disabled in CSS?

Question 215: How do you create a hyperlink in HTML?

Question 216: What does the "box model" in CSS refer to?

Question 217: Which PHP data type is used to store whole numbers?

Question 218: How do you select the last child element in CSS?

Question 219: Write a PHP program to add two numbers, 5 and 3, and display the result

Question 220: How do you declare a variable in PHP?

Question 221: What is the correct HTML for creating a text input field?

Question 222: What is the use of the array_unshift() function in PHP?

Question 223: What is the correct HTML for creating a hyperlink?

Question 224: Which CSS property is used to create a shadow effect on text?

Question 225: Which CSS property is used to make text bold?

Question 226: Write a PHP program to check if a number is even or odd

Question 227: How do you make a text input field required in HTML?

Question 228: Which symbol is used to comment out a single line in PHP?

Question 229: What is the correct way to write a JavaScript array?

Question 230: What is the result of the following expression: 5 + "5" in JavaScript?

Question 231: What is the correct HTML for creating a drop-down list?

Question 232: What is the correct HTML for creating a radio button?

Question 233: Which CSS property is used to underline text?

Question 234: Write a PHP program to find the sum of all prime numbers between 1 and 100

Question 235: How do you select the first child element in CSS?

Question 236: How do you check if a file exists in PHP?

Question 237: How do you group multiple selectors in CSS?

Question 238: Write a PHP program to remove duplicates from an array

Question 239: Write a PHP program to find the sum of digits of a given number

Question 240: How do you select an element by its ID in CSS?

Question 241: Write a PHP program to find the LCM of two numbers

Question 242: Write a PHP program to check if a string is a valid email address