Search Header Logo

C Functions

Authored by Minh Lam

Computers

University

Used 3+ times

C Functions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

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