Search Header Logo

LZECE431_WK10A

Authored by Dr Zaini

Computers

University

Used 2+ times

LZECE431_WK10A
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of this code?

a) Value after squareByValue: 5

b) Value after squareByValue: 10

c) Value after squareByValue: 25

d) Compilation error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of this code?

a) Value after squareByPointer: 5

b) Value after squareByPointer: 10

c) Value after squareByPointer: 25

d) Compilation error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the above code?

a) Value after squareByReference: 5

b) Value after squareByReference: 10

c) Value after squareByReference: 25

d) Compilation error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the above code?

a) Value at index 0 after modifyArrayByValue: 1

b) Value at index 0 after modifyArrayByValue: 10

c) Value at index 0 after modifyArrayByValue: 2

d) Compilation error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the above code?

a) Value at index 0 after modifyArrayByReference: 1

b) Value at index 0 after modifyArrayByReference: 10

c) Value at index 0 after modifyArrayByReference: 2

d) Compilation error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does the above C++ code do?

a) Reads data from the file "data.txt"

b) Appends data to the file "data.txt"

c) Creates and writes "Hello, File Processing!" to the file "data.txt"

d) Opens the file "data.txt" for reading

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the purpose of the above C++ code?

a) Reads a single character from the file "numbers.txt"

b) Reads an integer from the file "numbers.txt" and prints it

c) Appends an integer to the file "numbers.txt"

d) Creates a new file "numbers.txt"

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?