Programming MCQs Feed

📊 PHP
Q. Single line comments can be placed in PHP script by using which symbol?
  • (A) //
  • (B) #
  • (C) $
  • (D) Both A and B
💬 Discuss
✅ Correct Answer: (D) Both A and B
📊 C++
Q. What is a dynamic binding?
  • (A) The process of binding the current code to a procedure call at runtime.
  • (B) The process of linking the actual code to a procedure call during compilation.
  • (C) Process of linking the current code to a procedure call at any time.
  • (D) All the answers are true
💬 Discuss
✅ Correct Answer: (A) The process of binding the current code to a procedure call at runtime.
📊 C++
Q. Which variable is equal to the size of enum variable?
  • (A) int var;
  • (B) float var;
  • (C) string var;
  • (D) None of the above
💬 Discuss
✅ Correct Answer: (A) int var;
📊 Linux
Q. How will you see the system date?
  • (A) $dt
  • (B) $ date
  • (C) $ dy
  • (D) $ dd
💬 Discuss
✅ Correct Answer: (B) $ date
📊 SQL Server
Q. Which of the following code list all the log files in Window?
  • (A) snippet Clear-Host $Directory = "C:\Windows\"` -ErrorAction SilentlyContinue
  • (B) snippet Clear-Host $Files = Get-Childitem $Directory -recurse -Include *.log ` -ErrorAction SilentlyContinue
  • (C) snippet Clear-Host $Directory = "C:\Windows\" $Files = Get-Childitem $Directory -recurse -Include *.log ` -ErrorAction SilentlyContinue
  • (D) All of the mentioned
💬 Discuss
✅ Correct Answer: (C) snippet Clear-Host $Directory = "C:\Windows\" $Files = Get-Childitem $Directory -recurse -Include *.log ` -ErrorAction SilentlyContinue
📊 MySQL
Q. Which of the following are valid column names?
  • (A) Marks_Eng
  • (B) 66_Marks
  • (C) #Eng_Marks
  • (D) Marks Eng
💬 Discuss
✅ Correct Answer: (A) Marks_Eng
📊 C++
Q. Identify the type of the variables.
Code:
typedef char* CHAR;
    CHAR a,b;
  • (A) char
  • (B) CHAR
  • (C) char*
  • (D) typedef
💬 Discuss
✅ Correct Answer: (C) char*
📊 JavaScript
Q. The main purpose of a “Live Wire” in NetScape is to
  • (A) Create linkage between client side and server side
  • (B) Permit server side, JavaScript code, to connect to RDBMS
  • (C) Support only non relational database
  • (D) To interpret JavaScript code
💬 Discuss
✅ Correct Answer: (B) Permit server side, JavaScript code, to connect to RDBMS
📊 C++
Q. Which of the following type is provided by C++ but not C?
  • (A) double
  • (B) float
  • (C) int
  • (D) bool
💬 Discuss
✅ Correct Answer: (D) bool
📊 Python
Q. What is the output?
Code:
Y=[2,5J,6] Y.sort()
  • (A) [2,6,5J]
  • (B) [5J,2,6]
  • (C) Error
  • (D) [6,5J,2]
💬 Discuss
✅ Correct Answer: (C) Error