Unit 4 : Function 2

Unit 4 : Function 2

University

8 Qs

quiz-placeholder

Similar activities

2024 - Struktur Data Quiz 1

2024 - Struktur Data Quiz 1

University

10 Qs

Python Week 1 & 2

Python Week 1 & 2

University

10 Qs

PYTHON BASICS PART 1

PYTHON BASICS PART 1

University

10 Qs

Visual Basic 2010

Visual Basic 2010

8th Grade - University

10 Qs

CS100||MsWord

CS100||MsWord

University

10 Qs

DSA quiz 3 set 1

DSA quiz 3 set 1

University

10 Qs

CBA Excel 1

CBA Excel 1

University

10 Qs

Quiz - CSE

Quiz - CSE

University

10 Qs

Unit 4 : Function 2

Unit 4 : Function 2

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Norhamimi Hamdan

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'main' function in a C program?

To execute loops

To define global variables

To serve as the entry point of the program

To declare functions

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to call a function named 'first'?

first{}

call first;

execute first;

first();

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for defining a function in C?

return_type function_name(parameters) { // body }

function_name(parameters) { // body }

function_name return_type(parameters) { // body }

function_name(parameters) return_type { // body }

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between function arguments and parameters?

Arguments are always integers, parameters can be any type

There is no difference

Parameters are declared in the definition function, arguments are passed to it

Arguments are declared in the function, parameters are passed to it

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of variable can be accessed by all functions in a program?

Dynamic variable

Static variable

Global variable

Local variable

6.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Determine local variable?

declare outside the functions

declare inside the function body

All function can use

the variable only can be use inside the function body.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a recursive function?

A function that is defined inside another function

A function that cannot return a value

A function that calls itself

A function that calls another function

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers