Week 4 - Compound Types in C/C++

Week 4 - Compound Types in C/C++

University

20 Qs

quiz-placeholder

Similar activities

C++ Quiz-1

C++ Quiz-1

University

15 Qs

Programación Básica Prácticas Tema 2

Programación Básica Prácticas Tema 2

University

19 Qs

Think it through

Think it through

University - Professional Development

16 Qs

BS TEST2

BS TEST2

University

20 Qs

Pointers in C

Pointers in C

University

24 Qs

Recap C++

Recap C++

University

20 Qs

No Strings Attached

No Strings Attached

University

20 Qs

Test Final

Test Final

University

20 Qs

Week 4 - Compound Types in C/C++

Week 4 - Compound Types in C/C++

Assessment

Quiz

Computers

University

Medium

Created by

Hai Nguyen

Used 6+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which code is correct to create an array of 20 shorts?

short arr[20];

short int[20];

int arr[20];

int arr[] = {20};

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Find all correct initializations of array.

int yam[3] = {20,30,40};

int yam[] = {20,30,40};

int yam[3] {20,30,40};

int yam[] {20,30,40};

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is the following code correct?

int my_array[4] = {1, 2, 3};

Correct

Incorrect

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is the following code correct?

int my_array[3];

my_array[3] = {1, 2, 3};

Correct

Incorrect

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is the following code correct?

int yam[4] = { 2, 4, 6, 8 };

int yell[4] = { 1, 3, 5, 7 };

yell = yam;

Correct

Incorrect

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Select all answers that declare an array of 4 integers and set all element values to 0

int yam[4] = { };

int yam[4] { };

int yam[4] = {0};

int yam[] = {0};

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output?

hi65

hiA

hi

Error

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?