wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Flutter_Q1

Total questions: 21

Worksheet time: 9mins

Name
Class
Date
1.

what is the output of this code?

int x =5.2;

print(x);

a)

5

b)

5.2

c)

Error

d)

5.0

2.

var x = 14.9;

what is the type of variable x?

a)

Boolean

b)

String

c)

Int

d)

double

3.

Fill the gaps.

___Declaring an integer

and printing it___

int x = 42;

print(x);

a)

//.........//

b)

<----...................----->

c)

/*............*/

d)

?-------------?

4.

what is the output of this code?

const R = 3.1;

R=5;

print(R);

a)

3.1

b)

5

c)

Error

d)

3

5.

which one print 10?

a)

int num =9;

print ("the number is $num + 1");

b)

int num =9;

print ("the number is ${num + 1}");

c)

int num =9;

print ("the number is num +1");

d)

int num =9;

print ("the number is " + (num +1));

6.

var a ="4";

var b ="2";

print(a+b);

what is the output of this code?

(a)  

7.

Which operator is used to determine the remainder?

a)

*

b)

/

c)

%

d)

+

8.

var a = 9;

var b = 5;

print("a>b");

what is the output of this code?

a)

true

b)

Error

c)

a>b

d)

9>5

9.

var a = 9;

var b = 5;

print(a>b && 4>7);

what is the output of this code?

a)

9>5 && 4>7

b)

a>b && 4>7

c)

false

d)

Error

10.

var a = 9;

a++;

++a;

print(a--);

what is the output?

(a)  

11.

what is the output of this code?

var name="ali";

var out = name??"ahmed";

print(out);

a)

name

b)

ahmed

c)

ali

d)

Error

12.

what is the output of this code?

var a =15;

var b = 12;

a>b ? print(a):print(b);

(a)  

13.

Type casting is when you assign a value of one data type to another type.

a)

False

b)

True

14.

Which operator can be used to compare two values?

a)

==

b)

=

c)

><

d)

<>

15.

How do you start writing an if statement ?

a)

if x>y {

b)

if x > y then:

c)

if (x > y)

d)

if x > y:

16.

How do you start writing a while loop?

a)

while (x > y)

b)

while x > y:

c)

x > y while {

d)

while x > y {

17.

Dart is an open source programming language developed by ......?

a)

Microsoft

b)

Google

c)

Oracle

18.

what is the alternative of x=x+5?

a)

x=+5;

b)

x=y+5;

c)

x+=5;

d)

5=+x;

19.

if you initialize a variable as var,once assigned type cannot change?

a)

true

b)

false

20.

Var x = 9 as double; print (x);

What is the output of this code?

(a)  

21.

Var x = 9.0 as double; print (x);


What is the output of this code?

(a)