DAY 4 - Arrays & String Assessment _14 June 24

Quiz
•
Professional Development
•
University
•
Medium
KVCH CORPORATE
Used 1+ times
FREE Resource
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
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
Similar Resources on Wayground
14 questions
3. Arrays Q (Java Introduction)

Quiz
•
University
10 questions
DAY 2 - C& C++ Assessment _11th & 12th June 24

Quiz
•
University
11 questions
UC_TM04_Strings_Pointers

Quiz
•
University - Professi...
14 questions
LAB 2 Quiz

Quiz
•
University
10 questions
Python Basics Assessment

Quiz
•
University
10 questions
Arrays - 2D

Quiz
•
University
15 questions
DAY 7 Pointer Structure & Union - 18th June 2024

Quiz
•
University
5 questions
Python - Numpy Quiz 1

Quiz
•
University - Professi...
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade