DSA Studio
Search
Home
Sign in
Semantic Analysis Checkpoint
Scopes, const rules, returns, and call arity.
1. Redeclaring a name in the same scope is:
an error
allowed and shadows immediately
ignored
only allowed for const
2. Assigning to a const should:
raise a semantic error
silently convert to var
be ignored
always succeed
3. A return statement at top level is:
an error
converted into exit(0)
allowed but ignored
required
4. If a function expects 2 args and is called with 1, analysis should:
report arity mismatch
insert a default value
ignore the call
accept it silently
5. Name one rule checked during semantic analysis.
Submit quiz
Auto-advance on pass