Programming MCQs Feed

📊 Linux
Q. What is use of ‘who’ command in Linux?
  • (A) login user
  • (B) logout user
  • (C) login password
  • (D) logout password
💬 Discuss
✅ Correct Answer: (A) login user
📊 CSS
Q. Which of the following display property value is described by used internally by browsers to create list items. Of no practical value to web designers?
  • (A) none
  • (B) group
  • (C) inline-block
  • (D) list-item
💬 Discuss
✅ Correct Answer: (D) list-item
📊 JAVA
Q. Find the value of A[1] after execution of the following program.
Code:
int[] A = {0,2,4,1,3};
for(int i = 0; i < a.length; i++){
    a[i] = a[(a[i] + 3) % a.length];
}
  • (A) 0
  • (B) 1
  • (C) 2
  • (D) 3
💬 Discuss
✅ Correct Answer: (B) 1
📊 C Programming
Q. The format identifier ‘%i’ is also used for _____ data type.
  • (A) char
  • (B) int
  • (C) float
  • (D) double
💬 Discuss
✅ Correct Answer: (B) int
📊 JAVA
Q. which among the following is not a Data Type in Java?
  • (A) short
  • (B) int
  • (C) long double
  • (D) double
💬 Discuss
✅ Correct Answer: (C) long double
📊 JAVA
Q. What is the output of the Java program below?
Code:
int b=20;
switch(b)
{
default: System.out.println("LION");
}
  • (A) No output
  • (B) LION
  • (C) Compiler error as there are no CASE statements.
  • (D) None
💬 Discuss
✅ Correct Answer: (B) LION
📊 C Programming
Q. Choose a right statement.
Code:
float var = 3.5 + 4.5;
  • (A) var = 8.0
  • (B) var = 8
  • (C) var = 7
  • (D) var = 0.0
💬 Discuss
✅ Correct Answer: (A) var = 8.0
📊 CSS
Q. Internal styles are written within the _____ element.
  • (A) <style>…</style>
  • (B) <css>…</css>
  • (C) <stylesheet>…</stylesheet>
  • (D) Both A and B.
💬 Discuss
✅ Correct Answer: (A) <style>…</style>
📊 C#
Q. A C# pointer is used to store the ___ of another type.
  • (A) Value
  • (B) Memory address
  • (C) Size of the type
  • (D) Reference of the variable
💬 Discuss
✅ Correct Answer: (B) Memory address
📊 Linux
Q. Multi-line comments can be written within the ____.
  • (A) // and //
  • (B) ## and ##
  • (C) /* and */
  • (D) /// and ///
💬 Discuss
✅ Correct Answer: (C) /* and */