Skip to content

Tag Archives: Functions

The substr() is a built-in function in PHP that is used to extract a part of string. Syntax: substr(string_name, start_position, string_length_to_cut) Parameters: The substr() function… Read More
We have learned about some basic string manipulation functions available in PHP in the article PHP | String . In this article, we will learn… Read More
DATABASE() Function The DATABASE() Function in MySQL returns the name of the default or current database. The string or name returned by DATABASE() function uses… Read More
The BIN() function in MySQL is used to convert a decimal number to its binary equivalent.The BIN() function is equivalent to the CONV() function written… Read More
While performing operations on numbers we might sometimes want to use 32-bit numbers. JavaScript internally uses 64-bit floating point numbers and not 32-bit. So checking… Read More
A function is a block of code written in a program to perform some specific task. We can relate functions in programs to employees in… Read More
time.time() returns ________ (A) the current time (B) the current time in milliseconds (C) the current time in milliseconds since midnight (D) the current time… Read More
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.pop(1)? (A) [3, 4, 5, 20, 5, 25, 1, 3]… Read More
What is the output of the following program : import re sentence = 'horses are fast' regex = re.compile('(?P<animal>\w+) (?P<verb>\w+) (?P<adjective>\w+)') matched = re.search(regex, sentence)… Read More
Which of the following is the use of id() function in python? (A) Id returns the identity of the object (B) Every object doesn’t have… Read More
What is called when a function is defined inside a class? (A) Module (B) Class (C) Another Function (D) Method Answer: (D) Explanation: Quiz of… Read More
What is the output of the following program : y = 8 z = lambda x : x * y print (z(6)) (A) 48 (B)… Read More
What is the output of the following segment : chr(ord('A')) (A) A (B) B (C) a (D) Error Answer: (A) Explanation: ord() function converts a… Read More
What is the output of the following code : L = ['a','b','c','d'] print("".join(L)) (A) Error (B) None (C) abcd (D) [‘a’,’b’,’c’,’d’] Answer: (C) Explanation: “”… Read More
What will be the output of the following code : print type(type(int)) (A) type ‘int’ (B) type ‘type’ (C) Error (D) 0 Answer: (B) Explanation:… Read More