15 Functions & Args 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.
A.a command that discards the first positional argument and renumbers the rest downward, handy for processing options one at a time
B.a named, reusable block of commands invoked by name, declared either with a keyword prefix or with a trailing pair of parentheses
C.a builtin that ends a function and sets its exit status to a small integer, distinct from emitting a result via standard output
D.a keyword that scopes a variable to the current function so assignments do not leak out and clobber the caller's environment
Answer + AI explanation with Pro
2. Which term means: "a named, reusable block of commands invoked by name, declared either with a keyword prefix or with a trailing pair of parentheses"?
Junior
A.Positional parameters
B.Function definition
C.Shift builtin
D.Local declaration
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.Function definition — the automatically populated arguments passed to a script or function, referenced by their ordinal number such as one, two, and three
B.Function definition — a named, reusable block of commands invoked by name, declared either with a keyword prefix or with a trailing pair of parentheses
C.Function definition — a keyword that scopes a variable to the current function so assignments do not leak out and clobber the caller's environment
D.Function definition — a command that discards the first positional argument and renumbers the rest downward, handy for processing options one at a time
Answer + AI explanation with Pro
4. What is Positional parameters?
Junior
A.a keyword that scopes a variable to the current function so assignments do not leak out and clobber the caller's environment
B.the automatically populated arguments passed to a script or function, referenced by their ordinal number such as one, two, and three
C.a builtin that ends a function and sets its exit status to a small integer, distinct from emitting a result via standard output
D.a named, reusable block of commands invoked by name, declared either with a keyword prefix or with a trailing pair of parentheses
Answer + AI explanation with Pro
5. Which term means: "the automatically populated arguments passed to a script or function, referenced by their ordinal number such as one, two, and three"?
Junior
A.Function definition
B.Local declaration
C.Return statement
D.Positional parameters
Answer + AI explanation with Pro
6. Which statement is correct?
Junior
A.Positional parameters — a command that discards the first positional argument and renumbers the rest downward, handy for processing options one at a time
B.Positional parameters — the automatically populated arguments passed to a script or function, referenced by their ordinal number such as one, two, and three
C.Positional parameters — a named, reusable block of commands invoked by name, declared either with a keyword prefix or with a trailing pair of parentheses
D.Positional parameters — a keyword that scopes a variable to the current function so assignments do not leak out and clobber the caller's environment
Answer + AI explanation with Pro
7. What is Shift builtin?
Mid
A.a named, reusable block of commands invoked by name, declared either with a keyword prefix or with a trailing pair of parentheses
B.a builtin that ends a function and sets its exit status to a small integer, distinct from emitting a result via standard output
C.a command that discards the first positional argument and renumbers the rest downward, handy for processing options one at a time
D.the automatically populated arguments passed to a script or function, referenced by their ordinal number such as one, two, and three
Answer + AI explanation with Pro
8. Which term means: "a command that discards the first positional argument and renumbers the rest downward, handy for processing options one at a time"?
Mid
A.Positional parameters
B.Return statement
C.Shift builtin
D.Function definition
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.Shift builtin — the automatically populated arguments passed to a script or function, referenced by their ordinal number such as one, two, and three
B.Shift builtin — a builtin that ends a function and sets its exit status to a small integer, distinct from emitting a result via standard output
C.Shift builtin — a command that discards the first positional argument and renumbers the rest downward, handy for processing options one at a time
D.Shift builtin — a named, reusable block of commands invoked by name, declared either with a keyword prefix or with a trailing pair of parentheses
Answer + AI explanation with Pro
10. What is Return statement?
Mid
A.the automatically populated arguments passed to a script or function, referenced by their ordinal number such as one, two, and three
B.a keyword that scopes a variable to the current function so assignments do not leak out and clobber the caller's environment
C.a builtin that ends a function and sets its exit status to a small integer, distinct from emitting a result via standard output
D.a command that discards the first positional argument and renumbers the rest downward, handy for processing options one at a time
Answer + AI explanation with Pro
11. Which term means: "a builtin that ends a function and sets its exit status to a small integer, distinct from emitting a result via standard output"?
Mid
A.Return statement
B.Function definition
C.Positional parameters
D.Shift builtin
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.Return statement — a builtin that ends a function and sets its exit status to a small integer, distinct from emitting a result via standard output
B.Return statement — a keyword that scopes a variable to the current function so assignments do not leak out and clobber the caller's environment
C.Return statement — a command that discards the first positional argument and renumbers the rest downward, handy for processing options one at a time
D.Return statement — a named, reusable block of commands invoked by name, declared either with a keyword prefix or with a trailing pair of parentheses
Answer + AI explanation with Pro
13. What is Local declaration?
Senior
A.a named, reusable block of commands invoked by name, declared either with a keyword prefix or with a trailing pair of parentheses
B.a keyword that scopes a variable to the current function so assignments do not leak out and clobber the caller's environment
C.the automatically populated arguments passed to a script or function, referenced by their ordinal number such as one, two, and three
D.a builtin that ends a function and sets its exit status to a small integer, distinct from emitting a result via standard output
Answer + AI explanation with Pro
14. Which term means: "a keyword that scopes a variable to the current function so assignments do not leak out and clobber the caller's environment"?
Senior
A.Local declaration
B.Function definition
C.Return statement
D.Shift builtin
Answer + AI explanation with Pro
15. Which statement is correct?
Senior
A.Local declaration — the automatically populated arguments passed to a script or function, referenced by their ordinal number such as one, two, and three
B.Local declaration — a builtin that ends a function and sets its exit status to a small integer, distinct from emitting a result via standard output
C.Local declaration — a command that discards the first positional argument and renumbers the rest downward, handy for processing options one at a time
D.Local declaration — a keyword that scopes a variable to the current function so assignments do not leak out and clobber the caller's environment
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 Functions & Args question come with Pro.