NEW
Font size
WorksheetsFlutter intro and Dart quiz
Total questions: 15
Worksheet time: 12mins
What is a variable in Dart?
A place to store a value
A type of function
A type of class
A reserved keyword
How do you declare a variable in Dart?
variable variableName;
declare variableName;
var variableName;
let variableName;
Which of the following is NOT a built-in data type in Dart?
int
float
String
bool
How do you define a list in Dart?
Array myList = [1, 2, 3];
Set myList = {1, 2, 3};
List<int> list = [1,2,3];
None of these
How do you define a function in Dart that returns an integer?
void myFunction() { return 10; }
int myFunction() { return 10; }
function myFunction() { return 10; }
return myFunction() { 10; }
What is the purpose of the 'void' keyword in a function definition?
To specify the function returns an integer
To declare a variable
To indicate the function does not return a value
To create a loop
Which of the following is the correct way to call a function named calculateSum that takes two integer parameters?
calculateSum(5, 10);
calculateSum = (5, 10);
calculateSum(5 10);
calculateSum[5, 10];
What is the correct syntax for an if statement in Dart?
if condition {
// code
}
if (condition) {
// code
}
if: condition { // code }
None of these
What is the output of the following code?
Greater than 5
Less than or equal to 5
Error
None of the above
Which of the following is a valid for loop syntax in Dart?
for i in 1..10 { // code }
for (var i = 0; i < 10; i++) { // code }
foreach (var i in 10) { // code }
loop (var i = 0 to 10) { // code }
What is Flutter?
A programming language
A cross-platform UI toolkit
A database management system
An operating system
Which language is primarily used to write Flutter applications?
Java
Swift
Dart
JavaScript
What is the Flutter SDK?
A software development kit for building Android apps only
A software development kit for building iOS apps only
A software development kit for building natively compiled applications for mobile, web, and desktop from a single codebase
A software development kit for building backend services
How do you install the Flutter SDK on Windows?
Using a package manager like Homebrew
Downloading the installation package from the official Flutter website and extracting it to a desired location and set environmental variable
Installing it from the Microsoft Store
Using the apt-get command
What is the output of the following code?
0 1 2
1 2 3
0 1 2 3
1 2
