wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Flutter_Q5

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

main(){ h1(); }

h1() =>"hi"+"text";

What is the output of this code?

a)

hi text

b)

error

c)

hi

d)

No Output

e)

Null

2.

main(){ sum(2,5,2); }

int sum ({x,y,z}) {print(x+y+z);}

What is the output of this code?

a)

9

b)

x+y+z

c)

null

d)

error

3.

main() { sum(x:2,z:"5",y:8); }

sum ({x,y,String z}) {print(x+y);}

What is the output of this code?

a)

error

b)

10

c)

null

4.

can we pass to a function an argument string list only?

a)

true

b)

false

5.

can we put a lamda function in variable?

a)

true

b)

false

6.

main(){ print(div(12,3) );}

var div = (x,y)=>x/y;

What is the output of this code?

a)

error

b)

4

c)

null

d)

none from above

7.

can we pass a function as an argument in another function?

a)

true

b)

false

8.

line 1 main()

line 2 { human h1=new human();

line 3 human h2=human();}

line 4 class human{var name;}

Is there an error?

a)

Yes at line 3

b)

Yes at line 2

c)

Yes at line 4

d)

No error

9.

is there an error in making a function inside class?

a)

yes there is an error

b)

no there is no error

10.

can we make a function inside a class its name same as the class name?

a)

true

b)

false