C Language Array Quiz

C Language Array Quiz

University

19 Qs

quiz-placeholder

Similar activities

Playing with C

Playing with C

University

20 Qs

EC8393_FDS_MODEL EXAM_3_PART B

EC8393_FDS_MODEL EXAM_3_PART B

University

15 Qs

CCE-III Programming in C Language

CCE-III Programming in C Language

University

20 Qs

Pointers in C

Pointers in C

University

24 Qs

Pointers

Pointers

University

20 Qs

Arrays and pointers quiz

Arrays and pointers quiz

University

20 Qs

Array Addresses 2024

Array Addresses 2024

University

20 Qs

Lập trình C++

Lập trình C++

University

18 Qs

C Language Array Quiz

C Language Array Quiz

Assessment

Quiz

Computers

University

Medium

Created by

Fidel Romasanta

Used 7+ times

FREE Resource

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is right way to Initialize array?

int num[6] = { 2, 4, 12, 5, 45, 5 };

int n{} = { 2, 4, 12, 5, 45, 5 };

int n{6} = { 2, 4, 12 };

int n(6) = { 2, 4, 12, 5, 45, 5 };

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An array elements are always stored in ________ memory locations.

sequential

Random

Sequential and Random

None of the above

3.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

What is the result of the code below?

int a[]={11,13,56,20,5};

printf("%d",a[2]);

garbage value

13

56

20

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

How to accesses the seventh element in array "myArr" with 100 elements?

myArr[6]

myArr[7]

myArr{6}

myArr{7}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An array Index starts with _____.

-1

0

1

2

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the minimum and maximum Indexes of array "int myArr[9];"

-1, 8

0, 8

1,9

None of the above

7.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

What is the output of this code fragment?

int a[2][3] = { {1,1,1},{2,2,2}};

printf("%d", a[1][1]);

1

Error

2

0

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?