Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the output of the following?

Answer»

What is the output of the following?
t = {'HELLO', 2018, 'world'} Print( table.remove(t, 2) )
CHOOSE the Correct ANSWER from below LISTS
(1)Error
(2)world
(3)hello
(4)2018

Answer:-(4)2018

2.

By default, the trigonometric function of a standard library of Lua takes angle values in ____________.

Answer»

By default, the trigonometric function of a standard LIBRARY of Lua takes angle values in ____________.
CHOOSE the Correct answer from below LISTS
(1)Must be specified every TIME
(2)Degrees
(3)RADIANS
(4)No default unit

Answer:-(3)Radians

3.

In which state is a coroutine after a return?

Answer»

In which state is a coroutine after a return?
CHOOSE the Correct ANSWER from below lists
(1)Normal
(2)Dead
(3)Suspended
(4)RUNNING

Answer:-(4)Running

4.

The status of a coroutine may be found using ______________.

Answer»

The status of a coroutine MAY be found USING ______________.
Choose the Correct answer from below lists
(1)coroutine.status
(2)coroutine.Status
(3)coroutine.getStatus
(4)coroutine.get_status

Answer:-(1)coroutine.status

5.

There are no explicit file handlers in the complex IO model.

Answer»

There are no explicit file HANDLERS in the COMPLEX IO model.
Choose the Correct answer from below LISTS
(1)True
(2)FALSE

Answer:-(2)False

6.

The function used to continue a coroutine is ______________

Answer»

The function USED to continue a coroutine is ______________
CHOOSE the CORRECT answer from below lists
(1)start
(2)continue
(3)resume
(4)unpause

Answer:-(3)resume

7.

What is the output of 3/2?

Answer»

What is the OUTPUT of 3/2?
CHOOSE the Correct answer from below LISTS
(1)3.5
(2)1
(3)None of the OPTIONS
(4)1.5

Answer:-(4)1.5

8.

The function used to generate random numbers in Lua is __________.

Answer»

The function used to GENERATE random NUMBERS in LUA is __________.
Choose the Correct answer from below LISTS
(1)math.rand
(2)math.randno
(3)math.random
(4)math.randn

Answer:-(3)math.random

9.

What will be the output of for i=1,5,3 do print(i) end?

Answer»

What will be the output of for i=1,5,3 do print(i) END?
Choose the Correct answer from below lists
(1)14
(2)15
(3)123
(4)12345

Answer:-(1)14

10.

How many files can be handled at a time in a simple IO model of Lua?

Answer»

How many FILES can be handled at a time in a simple IO model of Lua?
Choose the CORRECT answer from below lists
(1)1
(2)2
(3)3
(4)0

Answer:-(2)2

11.

Modules are stored in tables in Lua.

Answer»

Modules are STORED in TABLES in Lua.
Choose the CORRECT ANSWER from below lists
(1)True
(2)False

Answer:-(1)True

12.

Break statements are used to exit a function.

Answer»

Break statements are USED to exit a function.
Choose the Correct ANSWER from below lists
(1)True
(2)False

Answer:-(2)False

13.

How many states can a coroutine be in?

Answer»

How many states can a COROUTINE be in?
Choose the Correct ANSWER from below lists
(1)4
(2)5
(3)6
(4)3

Answer:-(1)4

14.

There are three versions of for loop in Lua.

Answer»

There are three versions of for LOOP in Lua.
Choose the CORRECT answer from below LISTS
(1)False
(2)True

Answer:-(1)False

15.

If a,b=1, what will be the value of b?

Answer»

If a,b=1, what will be the value of b?
CHOOSE answer from below OPTIONS
(1)NONE of the options
(2)0
(3)nil
(4)null

Answer:-(3)nil

16.

Which of the following is a valid variable name in Lua?

Answer»

Which of the following is a VALID variable NAME in Lua?
Choose answer from below options
(1)function
(2)34dollars
(3)amt%
(4)count_variable

Answer:-(4)count_variable

17.

If a, b = 1, 2, 3, what will be the value of a and b?

Answer»

If a, B = 1, 2, 3, what will be the value of a and b?
Choose answer from below options
(1)error
(2)1 and 2
(3)None of the options
(4)2 and 3

Answer:-(2)1 and 2

18.

Which is the string concatenation operator in Lua?

Answer»

Which is the string CONCATENATION operator in LUA?
CHOOSE ANSWER from below options
(1). (dot)
(2)..
(3)...
(4).s.

Answer:-(2)..

19.

What is the output of 2^10?

Answer»

What is the output of 2^10?
CHOOSE the CORRECT answer from below lists
(1)200
(2)210
(3)1024
(4)102

Answer:-(3)1024

20.

When a coroutine is created, it is in a suspended state.

Answer»

When a COROUTINE is created, it is in a suspended state.
Choose the CORRECT answer from below LISTS
(1)False
(2)TRUE

Answer:-(2)True

21.

Invocation of a coroutine is termed as _____________.

Answer» INVOCATION of a COROUTINE is termed as _____________.
Choose the Correct ANSWER from below lists
(1)run
(2)None of the OPTIONS
(3)RESUME
(4)call

Answer:-(3)resume
22.

Which function is present in the standard library of Lua?

Answer»

Which function is present in the standard library of Lua?
CHOOSE the Correct answer from below lists
(1)math.sec
(2)math.tan
(3)NONE of the options
(4)math.cosec

Answer:-(2)math.tan

23.

The following are data types in Lua, except ___________.

Answer»

The FOLLOWING are data TYPES in LUA, except ___________.
CHOOSE answer from below OPTIONS
(1)All
(2)int
(3)number
(4)userdata

Answer:-(2)int

24.

How many logical operators are there in Lua?

Answer»

How many logical operators are there in LUA?
Choose ANSWER from below options
(1)2
(2)4
(3)0
(4)3

Answer:-(4)3

25.

In which state is a coroutine after a yield()?

Answer»

In which state is a coroutine after a yield()?
Choose the Correct answer from below LISTS
(1)Normal
(2)Running
(3)SUSPENDED
(4)Dead

Answer:-(1)Normal

26.

There is no multi-line comment in Lua.

Answer»

There is no multi-line COMMENT in Lua.
Choose answer from below OPTIONS
(1)FALSE
(2)True

Answer:-(1)False

27.

Which of the following functions may be used to print the output in Lua?

Answer»

Which of the following functions MAY be USED to print the output in Lua?
Choose answer from below options
(1)None of the options
(2)print
(3)Both the options
(4)io.write

Answer:-(2)print

28.

How many data types are there in Lua?

Answer»

How many data types are there in Lua?
Choose ANSWER from below options
(1)9
(2)7
(3)6
(4)8

Answer:-(4)8