DAY  4 - Arrays & String Assessment _14 June 24

DAY 4 - Arrays & String Assessment _14 June 24

University

10 Qs

quiz-placeholder

Similar activities

IT_SUBBOTNIK_2

IT_SUBBOTNIK_2

University - Professional Development

7 Qs

Multithreading

Multithreading

University

10 Qs

LTC++(C1+C2)

LTC++(C1+C2)

University

15 Qs

Python Básico

Python Básico

University

13 Qs

INTRODUCCION A LA PROGRAMACION

INTRODUCCION A LA PROGRAMACION

6th Grade - University

10 Qs

Measurement and Setting Down Dimensions - Nr 9.

Measurement and Setting Down Dimensions - Nr 9.

12th Grade - University

15 Qs

P2TL SESI-3

P2TL SESI-3

University

10 Qs

Kuis Berhadiah :D

Kuis Berhadiah :D

University

15 Qs

DAY  4 - Arrays & String Assessment _14 June 24

DAY 4 - Arrays & String Assessment _14 June 24

Assessment

Quiz

Professional Development

University

Practice Problem

Medium

Created by

KVCH CORPORATE

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

30 sec • 1 pt

How do you declare a one-dimensional array of integers with 10 elements in C?

int array[10];

int array(10);

int array{10};

int array;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

is the index of the last element in a one-dimensional array with 5 elements?

4

5

0

1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the element at the second row and third column of a two-dimensional array arr?

arr[2][3]

arr[1][2]

arr[3][2]

arr[2, 3]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following C code snippet?

1

2

3

Compilation error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to initialize a two-dimensional array in C?

int arr[2][3] = {{1, 2, 3}, {4, 5, 6}};

int arr[2, 3] = {1, 2, 3, 4, 5, 6};

int arr{2, 3} = {1, 2, 3, 4, 5, 6};

int arr[2][3] = {1, 2, 3, 4, 5, 6};

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a string in C?

char str[10];

string str;

char str;

str[10] = char;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to initialize a string with the value "Hello"?

char str[] = "Hello";

char str[] = {'H', 'e', 'l', 'l', 'o'};

char str[5] = "Hello";

char str[5] = {'H', 'e', 'l', 'l', 'o'};

Create a free account and access millions of resources

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?