Programming MCQs Feed

📊 Linux
Q. ____________ command is used to remove the directory.
  • (A) rdir
  • (B) rd
  • (C) rmdir
  • (D) None of these
💬 Discuss
✅ Correct Answer: (C) rmdir
📊 C++
Q. In the locale object, which of these objects’ information is loaded?
  • (A) secant object
  • (B) facet object
  • (C) instead object
  • (D) both instead & facet objects
💬 Discuss
✅ Correct Answer: (B) facet object
📊 Python
Q. What will the output of following python code?
Code:
list1 = [1, 2, 3, 4] list2 = [5, 6, 7, 8] print(len(list1 + list2))
  • (A) 6
  • (B) 36
  • (C) 8
  • (D) 4
💬 Discuss
✅ Correct Answer: (C) 8
📊 Linux
Q. A new user (Debbie) needs access to the companies Linux system, what must be done so that she can access the system with the userid debbie?
A. useradd debbie
B. group debbie
C. shadow debbie
D. passwd debbie
  • (A) Only A
  • (B) B and C
  • (C) A and D
  • (D) A, C and D
💬 Discuss
✅ Correct Answer: (C) A and D
📊 C++
Q. The c++ contains header file which is:
  • (A) conio.h
  • (B) iostream.h
  • (C) iostream
  • (D) stdio.h
💬 Discuss
✅ Correct Answer: (C) iostream
📊 C Programming
Q. ________ function is used to move the file position to desired location within the file
  • (A) fread
  • (B) fwrite
  • (C) fseek
  • (D) fscanf
💬 Discuss
✅ Correct Answer: (C) fseek
📊 PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$num = 5;
if ($num = $num&0)
    print $num ;
else
    print "Else statement executed...";
?>
  • (A) True
  • (B) Error
  • (C) 5
  • (D) Else statement executed...
💬 Discuss
✅ Correct Answer: (D) Else statement executed...
📊 C Programming
Q. The minimum number of temporary variables needed to swap the contents of two variables is
  • (A) 0
  • (B) 1
  • (C) 2
  • (D) 3
💬 Discuss
✅ Correct Answer: (A) 0
📊 C Programming
Q. What is the output of this program?
Code:
#include <stdio.h>
int main()
{
  printf("%d",30);
  return 0;
}
  • (A) 30
  • (B) Runtime Error
  • (C) Garbage value
  • (D) Compilation error
💬 Discuss
✅ Correct Answer: (D) Compilation error
📊 PHP
Q. Which method is used to check the validation of a email address?
  • (A) CheckMail
  • (B) CheckAddress
  • (C) ValidateMail
  • (D) validateAddress
💬 Discuss
✅ Correct Answer: (D) validateAddress