Programming MCQs Feed

📊 PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$n  =  'n' ;
print $n * 8;
?>
  • (A) n
  • (B) 8
  • (C) 0
  • (D) 1
💬 Discuss
✅ Correct Answer: (B) 8
📊 HTML
Q. To draw on the canvas, authors must first obtain a reference to a context using the ______________ method of the canvas interface element.
  • (A) getContext
  • (B) getImageData
  • (C) restore
  • (D) toDataURL
💬 Discuss
✅ Correct Answer: (A) getContext
📊 PHP
Q. What will be the output of the following PHP code?

Code:
<?php
function Increment(){
    static $num = 0;
    echo "$num";
    $num++;
}

Increment();
Increment();
Increment();
?>
  • (A) 000
  • (B) 111
  • (C) 011
  • (D) 012
💬 Discuss
✅ Correct Answer: (D) 012
📊 CSS
Q. Which of the following function creates a CSS gradient image that can be used anywhere an image URL is required, including background-image, border-image, and list-style properties?
  • (A) animation
  • (B) canvas
  • (C) color
  • (D) gradient
💬 Discuss
✅ Correct Answer: (D) gradient
📊 C++
Q. Which of the following statements allows you to overload a function in C++?
  • (A) Type and number of arguments
  • (B) Type
  • (C) Number of arguments
  • (D) None of the above
💬 Discuss
✅ Correct Answer: (A) Type and number of arguments
📊 SQL Server
Q. Which of the following lies between the host machine (Windows OS) and SQL Server?
  • (A) Storage Engine
  • (B) SQL OS
  • (C) Query Executor
  • (D) Query Optimizer
💬 Discuss
✅ Correct Answer: (B) SQL OS
📊 SQL Server
Q. Which of the following operating system is Supported by IA-64 Edition?
  • (A) Windows Server 2003 SP2 64-bit x64 Standard
  • (B) Windows Server 2003 SP2 64-bit x64 Enterprise
  • (C) Windows Server 2003 SP2 64-bit x64 Datacenter
  • (D) Windows Server 2003 R2 SP2 64-bit Itanium Datacenter
💬 Discuss
✅ Correct Answer: (D) Windows Server 2003 R2 SP2 64-bit Itanium Datacenter
📊 MySQL
Q. In MySQL, which command is used to modify the table values
  • (A) Select
  • (B) Update
  • (C) Alter
  • (D) Modify
💬 Discuss
✅ Correct Answer: (B) Update
📊 C++
Q. Which function is used to write a single character to console in C++?
  • (A) cout.put(ch)
  • (B) cout.putline(ch)
  • (C) write(ch)
  • (D) printf(ch)
💬 Discuss
✅ Correct Answer: (A) cout.put(ch)
📊 Linux
Q. Which is the default file system type of Linux.
  • (A) etx
  • (B) ext2
  • (C) etx3
  • (D) mimix
💬 Discuss
✅ Correct Answer: (C) etx3