Array - Recap

Array - Recap

University

10 Qs

quiz-placeholder

Similar activities

QUIZ 3: SECURITY TOOLS and  VULNERABILITY ANALYSIS

QUIZ 3: SECURITY TOOLS and VULNERABILITY ANALYSIS

University

11 Qs

REVIEW UTS 2 SISDIG

REVIEW UTS 2 SISDIG

University

10 Qs

Quizzi bài 29 Tin học 10

Quizzi bài 29 Tin học 10

10th Grade - University

10 Qs

Kiểm tra nhanh lớp 10

Kiểm tra nhanh lớp 10

10th Grade - University

10 Qs

Pengenalan Kecerdasan Buatan

Pengenalan Kecerdasan Buatan

11th Grade - University

15 Qs

Webinar SECOMP 2025

Webinar SECOMP 2025

University

10 Qs

Quiz Meet 3 Mini SC Programing

Quiz Meet 3 Mini SC Programing

University

10 Qs

Quiz on Basics of C

Quiz on Basics of C

University

10 Qs

Array - Recap

Array - Recap

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Divina 2908

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How do you initialize an array in C?

a) int arr[3] = (1,2,3);

b) int arr(3) = {1,2,3};

c) int arr[3] = {1,2,3};

d) int arr(3) = (1,2,3);

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What are the different ways to initialize an array with all elements as zero?

a) int array[5] = {};

b) int array[5] = {0};

c)int a = 0, b = 0, c = 0;

  int array[5] = {a, b, c};

d) All of the mentioned

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

. What are the elements present in the array of the following C code?

int array[5] = {5};

a)5, 5, 5, 5, 5

b) 5, 0, 0, 0, 0

c) 5, (garbage), (garbage), (garbage), (garbage)

d) (garbage), (garbage), (garbage), (garbage), 5

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following C statements will calculate the correct size of an array of 10 integers?

(Assuming the declaration as int a[10];)

a) sizeof(a[10]);

b) sizeof(*a);

c) sizeof(a);

d) sizeof(&a);

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the index of the last element in an array of size n in C?

 n

n+1

n-1

0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

#include <stdio.h>

int main() {

int arr[] = {10, 20, 30, 40, 50};

printf("%d", *(arr + 2));

return 0;

}

10

30

50

20

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not valid for accessing an array element?

arr[i]

*(arr + i)

i[arr]

arr * i

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?