Skip to content

Latest commit

 

History

History
22 lines (21 loc) · 1.25 KB

File metadata and controls

22 lines (21 loc) · 1.25 KB

Instruction: open a new project in Vscode called Exam3 and implement the folowing code Please implement your Answers with code

  1. What is a function in Dart?
  2. How do you declare a function in Dart?
  3. What is the purpose of the main() function in Dart?
  4. Explain the difference between a named function and an anonymous function.
  5. What is a return type in Dart functions?
  6. How can you pass parameters to a Dart function?
  7. Describe the difference between positional and named parameters.
  8. What is the significance of the arrow (=>) syntax in Dart functions?
  9. How do you define default parameter values in Dart functions?
  10. Explain the concept of optional parameters in Dart functions.
  11. What is the purpose of the void keyword in Dart functions?
  12. How can you define a function inside another function in Dart? What is this called?
  13. What is a higher-order function in Dart?
  14. Explain the difference between functions and methods in Dart.
  15. How do you use the return keyword in Dart functions?
  16. What is a function signature, and why is it important?
  17. How can you make a function in Dart asynchronous?
  18. Describe the use of the async, await, and Future keywords in asynchronous functions.
  19. How do you call a function defined in another Dart file?