Search Header Logo

I 4 test 3

Authored by Lawrence Nelson

Computers

12th Grade

Used 3+ times

I 4 test 3
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

46 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A function adds a list of numbers and returns the sum. The function head is:

int sum(int list)

void sum(int list)

void sum(int *a, int b)

int sum(int *a, int b)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A function adds a list of numbers and returns the sum. The function head is:

float sum(float list)

void sum(float list)

void sum(int *a, int b)

float sum(float *a, int b)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

This loops through a string:

for (int i=0; i<100; i++)

for (char a= 0; a < 100; a++)

for (int i=0; str[i]!='\0'; i++)

for (int i=0; i!='\0'; i++)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider a void function called stuff(). Which of the following is a legal call to stuff()?

stuff();

int x = stuff()

cout << stuff();

stuff() = 8;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider a function called stuff(). Stuff takes an integer and returns a Boolean. Which of the following is a legal call to stuff()?

stuff();

if (stuff(8) == False)

cout << stuff();

stuff(2) = true;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A function called stuff() takes an integer and changes its value. A possible function head is:

int stuff()

void stuff(int a)

int & stuff()

void stuff(int &a)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A function called stuff() changes the values in a list. A possible function head is:

int stuff()

void stuff(char *a)

int * stuff()

void stuff(int &a, int b)

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?