Programming MCQs Feed

📊 C++
Q. Which of these functions is used for incrementing the iterator by a certain value?
  • (A) move()
  • (B) prev()
  • (C) advance()
  • (D) next()
💬 Discuss
✅ Correct Answer: (C) advance()
📊 Linux
Q. Linux operating system is virus free.
  • (A) true
  • (B) false
  • (C) may be
  • (D) none of these
💬 Discuss
✅ Correct Answer: (B) false
📊 HTML
Q. Main container for tr, td and th is
  • (A) group
  • (B) table
  • (C) data
  • (D) all of the above
💬 Discuss
✅ Correct Answer: (B) table
📊 C Programming
Q. What is the output of C program with structures?
Code:
int main()
{
    struct tree
    {
        int h;
        int rate;
    };
    struct tree tree1={0};
    printf("%d ",tree1.rate);
    printf("%d",tree1.h);
    return 0;
}
  • (A) 0 0
  • (B) -1 -1
  • (C) NULL NULL
  • (D) Compiler error
💬 Discuss
✅ Correct Answer: (A) 0 0
📊 PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$p = 50;
$q = 60;
if ($p > $q && 1||1)
    print "Executed...." ;
else
    print "Not Executed....";
?>
  • (A) Not Executed....
  • (B) True
  • (C) Executed....
  • (D) False
💬 Discuss
✅ Correct Answer: (C) Executed....
📊 C Programming
Q. What is the size of an int data type?
  • (A) 4 Bytes
  • (B) 8 Bytes
  • (C) Depends on the system/compiler
  • (D) Cannot be determined
💬 Discuss
✅ Correct Answer: (C) Depends on the system/compiler
📊 C Programming
Q. In Implicit type conversion, If an operand of long int is present then the other operand will be converted to ?
  • (A) long int
  • (B) float
  • (C) unsigned long int
  • (D) unsigned int
💬 Discuss
✅ Correct Answer: (A) long int
📊 PHP
Q. what is the output of below program?
Code:
<?php
$a = 0;

if($a > 1 );
{
  echo "Sun";   
}

echo "Moon";

?>
  • (A) SunMoon
  • (B) Sun
  • (C) Moon
  • (D) Error
💬 Discuss
✅ Correct Answer: (A) SunMoon
📊 Microsoft Word
Q. In a document what is the maximum number of columns that can be inserted in MS Word Table?
  • (A) 15
  • (B) 35
  • (C) 63
  • (D) 65
💬 Discuss
✅ Correct Answer: (C) 63