What is the output of the following code? [code]warning(“a”) [/code]

What is the output of the following code?
Code:
warning(“a”)
A. Warning: a
B. Error in the code
C. Syntactical Error
D. Logical Error
 
Answer: c
Explanation: There is a syntactical error in the above code. The input should be present within a pair of single inverted commas- to signify the warning message as a string. The output would’ve been option Warning: a in that case.
 

Tìm kiếm

Back
Top