C Functions

C Functions

University

10 Qs

quiz-placeholder

Similar activities

Chapter 9 Computing II

Chapter 9 Computing II

University

13 Qs

Functions

Functions

University

15 Qs

Arrays and Functions

Arrays and Functions

University

12 Qs

Quiz6: Functions

Quiz6: Functions

University

10 Qs

C programming

C programming

University

15 Qs

Java Method

Java Method

University

15 Qs

C Program Array and strings

C Program Array and strings

University

10 Qs

Recursion

Recursion

University

8 Qs

C Functions

C Functions

Assessment

Quiz

Computers

University

Hard

Created by

Minh Lam

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Choose correct statement about Functions in C Language.

A Function is a group of c statements which can be reused any number of times

Every Function has a return type

Every Function may not return a value

All the above

2.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

In function declaration, which parts are needed?

Function's name

Return type

Parameters (if any)

Call a function

Answer explanation

A function declaration must include the function's name, a return type, and parameters (if any).

Calling a function is a statement, not a part of function declaration.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where do we put the function declaration?

Behind main()

Above #include<stdio.h>

Above main()

Inside main()

Answer explanation

The function declaration must be put above main(). Otherwise, the compiler returns errors.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The default return type of a function is....

float

double

int

char

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Choose a correct statement about C Function?

A function always returns a value

A function can return one or more values. For example: return 0, 1, 2;

void is the default return type

void means "no return values"

Answer explanation

A function may not return any value. In this case, we use void as the return type. For example: void kiemtra(int n)

A function CANNOT return more than 1 value.

int is the default return type.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Determine output:

XIN CHAO LOP DHDI17ATT

LOP DHDI17ATTXIN CHAO

LOP DHDI17ATT

LOP DHDI17ATT XIN CHAO

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Choose a correct statement about C Function?

The name of the function is "kiemtra"

The function does not return any value

"n" is the parameter of the function

All the above

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?