
Arrays in C

Quiz
•
Computers
•
University
•
Hard
Satheesh D
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an array in C programming?
A method for sorting data
A type of function
A collection of different data types
A sequential collection of similar data items
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is a single-dimensional array declared in C?
size array_name[datatype];
datatype array_name[size];
array_name[size] datatype;
datatype[size] array_name;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index range for an array of size n?
0 to n
1 to n-1
0 to n-1
1 to n
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a method to store values in an array?
Initialization
Declaration
Function calling
Memory allocation
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the scanf() function do in C?
Declares variables
Prints output to the screen
Allocates memory for arrays
Reads input from the keyboard
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the NULL character in strings?
To allocate memory
To store the length of the string
To initialize the string
To indicate the end of the string
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize a string in C?
char str[] = 'Hello';
char str[5] = 'Hello';
char str[5] = "Hello";
char str[] = "Hello";
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
Data Structures Quiz 1

Quiz
•
12th Grade - University
10 questions
Quiz 8: Arrays&Vector

Quiz
•
University
15 questions
Bootcamp Day 3 - Java Array

Quiz
•
University
20 questions
js DOM

Quiz
•
12th Grade - Professi...
13 questions
Array of Structure

Quiz
•
University
10 questions
Coding Basics

Quiz
•
5th Grade - University
20 questions
C - Strings

Quiz
•
University
10 questions
Java Arrays

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University