Quiz on Modularity and Functions

Quiz on Modularity and Functions

University

20 Qs

quiz-placeholder

Similar activities

DSA (QUIZ 6) Hashing, Graphs, Advanced Graph Algorithms, and DP

DSA (QUIZ 6) Hashing, Graphs, Advanced Graph Algorithms, and DP

University

20 Qs

Quiz-I (C++ Programming)

Quiz-I (C++ Programming)

University

20 Qs

Java MCQs on Syntax and Semantics

Java MCQs on Syntax and Semantics

University

20 Qs

Programming and Flowchart Quiz

Programming and Flowchart Quiz

University

22 Qs

Python Parithabangal 2.0

Python Parithabangal 2.0

University

25 Qs

Pop Quiz - R Programming - Revision for All Chapter

Pop Quiz - R Programming - Revision for All Chapter

University

25 Qs

Week 3-4

Week 3-4

University

25 Qs

CMDP2063 Unix and C Programming

CMDP2063 Unix and C Programming

University

15 Qs

Quiz on Modularity and Functions

Quiz on Modularity and Functions

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Abhishek Swami

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is one main advantage of modular programming?

Increases execution time

Reduces the number of functions

Avoids use of loops

Makes code reusable and easier to debug

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a disadvantage of modularity?

Difficult to maintain

Slows down debugging

Increased memory overhead due to function calls

Code readability decreases

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

Hello

HelloHello

Hello\nHello

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, a variable declared inside a function is:

Always global

Local by default

Static

None of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

10 10

5 10

5 5

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to access a global variable inside a function?

local

nonlocal

global

var

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

10

20

Error

0

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?