Programming MCQs Feed

📊 C Programming
Q. If both numerator and denominator of a division operation in C language are integers, then we get.?
  • (A) Expected algebraic real value
  • (B) Unexpected integer value
  • (C) Compiler error.
  • (D) None of the above
💬 Discuss
✅ Correct Answer: (B) Unexpected integer value
📊 PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$v  =  'Hello';
echo "Wor$ld";
?>
  • (A) Hello
  • (B) World
  • (C) ld
  • (D) Wor$ld
💬 Discuss
✅ Correct Answer: (D) Wor$ld
📊 C#
Q. Which is the first line of a C# program?
  • (A) using System;
  • (B) using system;
  • (C) using Namespace;
  • (D) namespace MyApplication
💬 Discuss
✅ Correct Answer: (A) using System;
📊 PHP
Q. How many variable scopes are there in PHP?
  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4
💬 Discuss
✅ Correct Answer: (C) 3
📊 C++
Q. Which of the following is accessed by a member function of a class?
  • (A) The object of this class
  • (B) Public part of the class
  • (C) Private part of the class
  • (D) All members of the class
💬 Discuss
✅ Correct Answer: (D) All members of the class
📊 C++
Q. Which operator requires three operands?
  • (A) Bitwise
  • (B) Ternary
  • (C) Binary
  • (D) Unary
💬 Discuss
✅ Correct Answer: (A) Bitwise
📊 Linux
Q. A record consists of
  • (A) Datas
  • (B) Fields
  • (C) Folders
  • (D) Files
💬 Discuss
✅ Correct Answer: (B) Fields
📊 SQL Server
Q. All aggregate functions except __________ ignore null values in their input collection.
  • (A) Sum
  • (B) Avg
  • (C) Count(*)
  • (D) Count(attribute)
💬 Discuss
✅ Correct Answer: (D) Count(attribute)
📊 MySQL
Q. What is the size of the BIT type?
  • (A) variable
  • (B) 3
  • (C) 2
  • (D) 1
💬 Discuss
✅ Correct Answer: (A) variable
📊 C++
Q. Which of the following is called insertion/put to operator?
  • (A) <<
  • (B) >>
  • (C) >
  • (D) <
💬 Discuss
✅ Correct Answer: (A) <<