NIELIT O Level Exam

Which of the following functions does not throw an error?

Which of the following functions does not throw an error?

निम्नलिखित में से कौन सा फंक्शन एरर नहीं देता है?

A. ord()

B. ord(‘ ‘)

C. ord(”)

D. ord(“”)




Correct Answer is :

B. ord(‘ ‘)



Explanation
The function ord() accepts a character. Hence ord(), ord(”) and ord(“”) throw errors. However the function ord(‘ ‘) does not throw an error because in this case, we are actually passing a blank space as an argument. The output of ord(‘ ‘) is 32 (ASCII value corresponding to blank space).
Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad