C Programming - Array MCQs

C Programming - Array MCQs

University

40 Qs

quiz-placeholder

Similar activities

Data Structures and Algorithms Quiz

Data Structures and Algorithms Quiz

University

42 Qs

Lập trình mạng ( cơ bản + pipe )

Lập trình mạng ( cơ bản + pipe )

University

45 Qs

7 класс

7 класс

7th Grade - University

38 Qs

STS Informatika Kelas 8 Semester 1

STS Informatika Kelas 8 Semester 1

9th Grade - University

43 Qs

Quiz de Programação Orientada a Objetos

Quiz de Programação Orientada a Objetos

University

40 Qs

C# Programming Quiz

C# Programming Quiz

University

36 Qs

MODULE 6 Decision Control and Switch Case

MODULE 6 Decision Control and Switch Case

University

39 Qs

INFORMATIKA10 PG

INFORMATIKA10 PG

10th Grade - University

40 Qs

C Programming - Array MCQs

C Programming - Array MCQs

Assessment

Quiz

Information Technology (IT)

University

Medium

Created by

PRIYADHARSHNI S

Used 4+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An array is:

A collection of different data types

A collection of variables of same data type

A dynamic list

A structure

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The index of the first element of an array in C is:

1

-1

0

Depends on compiler

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The correct way to declare an array of 10 integers is:

int arr(10);

int arr[10];

array int arr[10];

int arr[] = 10;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of: int arr[5] = {1,2,3}; printf("%d", arr[4]);

3

4

0

Garbage value

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will sizeof(arr) return for: int arr[5];

5

10

20

Depends on values

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these initializes all elements to 0?

int arr[5] = {0};

int arr[5];

int arr[5] = {1};

int arr[] = {1,2};

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does arr[2] access in: int arr[3] = {1, 2, 3};

1

2

3

Compilation 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?