Special Variables interview questions

18 Special Variables questions from the Bash bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is Exit code variable?

Junior
  1. A.the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
  2. B.the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
  3. C.the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
  4. D.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star

Answer + AI explanation with Pro

2. Which term means: "the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark"?

Junior
  1. A.Background PID variable
  2. B.Exit code variable
  3. C.Argument count variable
  4. D.Quoted all-arguments array

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.Exit code variable — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
  2. B.Exit code variable — the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
  3. C.Exit code variable — the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
  4. D.Exit code variable — the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang

Answer + AI explanation with Pro

4. What is Script name variable?

Junior
  1. A.the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
  2. B.the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
  3. C.the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
  4. D.the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero

Answer + AI explanation with Pro

5. Which term means: "the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero"?

Junior
  1. A.Script name variable
  2. B.Quoted all-arguments array
  3. C.Exit code variable
  4. D.Joined all-arguments string

Answer + AI explanation with Pro

6. Which statement is correct?

Junior
  1. A.Script name variable — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
  2. B.Script name variable — the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
  3. C.Script name variable — the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
  4. D.Script name variable — the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero

Answer + AI explanation with Pro

7. What is Argument count variable?

Mid
  1. A.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
  2. B.the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
  3. C.the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
  4. D.the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero

Answer + AI explanation with Pro

8. Which term means: "the special parameter that expands to how many positional arguments were supplied, read as dollar-hash"?

Mid
  1. A.Quoted all-arguments array
  2. B.Joined all-arguments string
  3. C.Background PID variable
  4. D.Argument count variable

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.Argument count variable — the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
  2. B.Argument count variable — the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
  3. C.Argument count variable — the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
  4. D.Argument count variable — the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang

Answer + AI explanation with Pro

10. What is Quoted all-arguments array?

Mid
  1. A.the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
  2. B.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
  3. C.the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
  4. D.the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang

Answer + AI explanation with Pro

11. Which term means: "the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at"?

Mid
  1. A.Exit code variable
  2. B.Argument count variable
  3. C.Joined all-arguments string
  4. D.Quoted all-arguments array

Answer + AI explanation with Pro

12. Which statement is correct?

Mid
  1. A.Quoted all-arguments array — the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
  2. B.Quoted all-arguments array — the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
  3. C.Quoted all-arguments array — the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
  4. D.Quoted all-arguments array — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark

Answer + AI explanation with Pro

13. What is Joined all-arguments string?

Senior
  1. A.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
  2. B.the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
  3. C.the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
  4. D.the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang

Answer + AI explanation with Pro

14. Which term means: "the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star"?

Senior
  1. A.Exit code variable
  2. B.Background PID variable
  3. C.Script name variable
  4. D.Joined all-arguments string

Answer + AI explanation with Pro

15. Which statement is correct?

Senior
  1. A.Joined all-arguments string — the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
  2. B.Joined all-arguments string — the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
  3. C.Joined all-arguments string — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
  4. D.Joined all-arguments string — the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero

Answer + AI explanation with Pro

16. What is Background PID variable?

Mid
  1. A.the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
  2. B.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
  3. C.the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
  4. D.the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero

Answer + AI explanation with Pro

17. Which term means: "the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang"?

Mid
  1. A.Argument count variable
  2. B.Background PID variable
  3. C.Exit code variable
  4. D.Script name variable

Answer + AI explanation with Pro

18. Which statement is correct?

Mid
  1. A.Background PID variable — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
  2. B.Background PID variable — the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
  3. C.Background PID variable — the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
  4. D.Background PID variable — the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Special Variables question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers