Flutter Full Course
Module 1: Introduction to Flutter
Q1. What is Flutter?
Answer:
Flutter Google ka open-source UI toolkit hai jiska use Android, iOS, Web, Windows, macOS aur Linux applications banane ke liye kiya jata hai.
Q2. Who developed Flutter?
Answer:
Flutter ko Google ne develop kiya hai.
Q3. Which programming language is used in Flutter?
Answer:
Flutter me Dart programming language use hoti hai.
Q4. What is Dart?
Answer:
Dart ek object-oriented programming language hai jise Google ne Flutter ke liye develop kiya hai.
Q5. What are the advantages of Flutter?
Answer:
- Single Codebase
- Fast Development
- Hot Reload
- Beautiful UI
- Cross Platform Support
- Strong Community
Q6. What is Hot Reload?
Answer:
Hot Reload feature code changes ko bina app restart kiye instantly reflect karta hai.
Q7. What is Hot Restart?
Answer:
Hot Restart app ko restart karta hai aur state reset ho jati hai.
Q8. Flutter is developed by which company?
Options:
A. Microsoft
B. Apple
C. Google
D. Amazon
Answer:
C. Google
Q9. Flutter is used for?
Options:
A. Android Apps
B. iOS Apps
C. Web Apps
D. All of the Above
Answer:
D. All of the Above
Q10. Which language does Flutter use?
Options:
A. Java
B. Kotlin
C. Dart
D. Python
Answer:
C. Dart
Interview Questions
Q11. Why should we choose Flutter?
Answer:
Flutter ek single codebase provide karta hai jisse Android aur iOS dono apps develop ki ja sakti hain. Isse development time aur cost dono kam ho jate hain.
Q12. What is Widget in Flutter?
Answer:
Flutter me har UI element Widget hota hai.
Examples:
- Text
- Button
- Image
- Container
Q13. Why is Flutter faster than React Native?
Answer:
Flutter direct native code me compile hota hai aur JavaScript Bridge use nahi karta, isliye performance better hoti hai.
Q14. What platforms are supported by Flutter?
Answer:
- Android
- iOS
- Web
- Windows
- macOS
- Linux
Q15. What is the Flutter Engine?
Answer:
Flutter Engine rendering, animation aur graphics handle karta hai.
Practical Questions
Q16. Install Flutter command?
flutter doctor
Q17. Create New Project?
flutter create myapp
Q18. Run Flutter Project?
flutter run
Q19. Check Connected Devices?
flutter devices
Q20. Upgrade Flutter?
flutter upgrade
MCQ Practice
Q21. Flutter uses which rendering engine?
A. Blink
B. Skia
C. Gecko
D. Chromium
Answer: B. Skia
Q22. Flutter is:
A. Database
B. Framework
C. IDE
D. Browser
Answer: B. Framework
Q23. Flutter was initially released in?
A. 2015
B. 2016
C. 2017
D. 2018
Answer: C. 2017
Q24. Which command creates a Flutter project?
A.
flutter start
B.
flutter create projectname
C.
flutter new
D.
flutter init
Answer: B
Q25. Flutter supports:
A. Android
B. iOS
C. Web
D. All
Answer: D
Assignment
Task 1
Install Flutter SDK
Task 2
Run:
flutter doctor
Task 3
Create Project:
flutter create first_app
Task 4
Run Application
flutter run
Task 5
Write a blog:
"What is Flutter and Why Should We Learn Flutter?"
Module 2: Dart Programming Language (Part 1)
Dart Flutter ki backbone hai. Flutter seekhne se pehle Dart ko strong banana bahut zaroori hai.
Chapter 1: Introduction to Dart
Q1. What is Dart?
Answer:
Dart ek object-oriented programming language hai jise Google ne develop kiya hai.
Q2. Why is Dart used in Flutter?
Answer:
- Fast Compilation
- Easy Syntax
- Object-Oriented
- Cross Platform Support
- Hot Reload Support
Q3. Dart is a?
A. Database
B. Framework
C. Programming Language
D. IDE
Answer: C. Programming Language
Q4. Which company developed Dart?
A. Microsoft
B. Apple
C. Google
D. IBM
Answer: C. Google
Chapter 2: Variables
Q5. What is a Variable?
Answer:
Variable data store karne ke liye use hota hai.
Example:
String name = "Rahul";
int age = 25;
Q6. Declare a String Variable.
Answer:
String city = "Delhi";
Q7. Declare an Integer Variable.
Answer:
int num = 100;
Q8. Declare a Double Variable.
Answer:
double price = 99.99;
Q9. Which keyword automatically detects datatype?
A. data
B. auto
C. var
D. value
Answer: C. var
Q10. Example of var?
var name = "Flutter";Chapter 3: Data Types
Q11. Name common Dart Data Types.
Answer:
- int
- double
- String
- bool
- List
- Set
- Map
Q12. Integer Example
int age = 20;
Q13. Double Example
double salary = 50000.50;
Q14. Boolean Example
bool isLogin = true;
Q15. String Example
String name = "Amit";
Q16. Which datatype stores true/false values?
A. int
B. String
C. bool
D. double
Answer: C. bool
Chapter 4: Input and Output
Q17. Print Statement
print("Hello Flutter");
Q18. Output of:
print(10 + 20);Answer:
30
Q19. Import package for user input?
import 'dart:io';
Q20. User Input Example
import 'dart:io';
void main() {
print("Enter Name:");
String? name = stdin.readLineSync();
print("Name: $name");
}Chapter 5: Operators
Q21. Arithmetic Operators
Answer:
- /
- %
Q22. Addition Example
int a = 10;
int b = 20;
print(a + b);
Q23. Modulus Operator Output
print(10 % 3);Answer:
1
Q24. Increment Operator
a++;
Q25. Decrement Operator
a--;
MCQs
Q26.
int a = 10;
int b = 5;
print(a + b);Output?
A. 10
B. 15
C. 5
D. Error
Answer: B. 15
Q27.
print(20 ~/ 3);Output?
A. 6
B. 6.66
C. 7
D. Error
Answer: A. 6
Q28. Which operator is used for multiplication?
A. %
B. /
C. *
D. +
Answer: C. *
Q29. Which operator gives remainder?
A. /
B. %
C. *
D. +
Answer: B. %
Q30. Which datatype stores decimal values?
A. int
B. bool
C. double
D. String
Answer: C. double
Interview Questions
Q31. Difference between var and dynamic?
Answer:
var
var name = "Flutter";
Datatype automatically decide ho jata hai.
dynamic
dynamic value = "Hello";
value = 10;
Datatype runtime me change ho sakta hai.
Q32. Difference between int and double?
Answer:
int a = 10;
double b = 10.5;
int = whole number
double = decimal number
Q33. What is null safety in Dart?
Answer:
Null safety null related errors ko compile time par detect karti hai.
Example:
String? name;
Q34. What is final keyword?
final country = "India";
Value ek baar assign hogi.
Q35. What is const keyword?
const pi = 3.14;
Compile-time constant.
Practical Assignments
Program 1: Sum of Two Numbers
import 'dart:io';
void main() {
print("Enter First Number:");
int a = int.parse(stdin.readLineSync()!);
print("Enter Second Number:");
int b = int.parse(stdin.readLineSync()!);
print("Sum = ${a + b}");
}
Program 2: Area of Rectangle
import 'dart:io';
void main() {
print("Length:");
int l = int.parse(stdin.readLineSync()!);
print("Width:");
int w = int.parse(stdin.readLineSync()!);
print("Area = ${l * w}");
}
Program 3: Simple Interest
import 'dart:io';
void main() {
int p = 1000;
int r = 5;
int t = 2;
double si = (p * r * t) / 100;
print(si);
}Module 2: Dart Programming Language (Part 2)
Chapter 6: If Else Statement
Q36. What is If Statement?
Answer:
If statement kisi condition ko check karne ke liye use hota hai.Syntax
if(condition){
// code
}
Q37. Check Positive Number
void main() {
int num = 10;
if(num > 0){
print("Positive Number");
}
}Output
Positive Number
Q38. Check Negative Number
void main() {
int num = -5;
if(num < 0){
print("Negative Number");
}
}
Q39. Even Odd Program
void main() {
int num = 20;
if(num % 2 == 0){
print("Even");
}else{
print("Odd");
}
}
Q40. Largest of Two Numbers
void main() {
int a = 20;
int b = 10;
if(a > b){
print("A is Greater");
}else{
print("B is Greater");
}
}Chapter 7: Nested If Else
Q41. What is Nested If?
Answer:
Jab ek if ke andar doosra if likha jata hai use Nested If kehte hain.
Q42. Largest of Three Numbers
void main() {
int a = 10;
int b = 40;
int c = 30;
if(a > b){
if(a > c){
print(a);
}
}else{
if(b > c){
print(b);
}else{
print(c);
}
}
}
Q43. Grade Program
void main() {
int marks = 85;
if(marks >= 90){
print("A+");
}else if(marks >= 80){
print("A");
}else if(marks >= 70){
print("B");
}else{
print("Fail");
}
}
Chapter 8: Switch Case
Q44. What is Switch Case?
Answer:
Multiple conditions check karne ke liye Switch use hota hai.
Q45. Day Program
void main() {
int day = 2;
switch(day){
case 1:
print("Monday");
break;
case 2:
print("Tuesday");
break;
case 3:
print("Wednesday");
break;
default:
print("Invalid Day");
}
}
Q46. Calculator using Switch
void main() {
int a = 10;
int b = 5;
String op = "+";
switch(op){
case "+":
print(a+b);
break;
case "-":
print(a-b);
break;
case "*":
print(a*b);
break;
case "/":
print(a/b);
break;
}
}
Chapter 9: For Loop
Q47. What is Loop?
Answer:
Repeated execution ke liye Loop use hota hai.
Q48. Print 1 to 10
void main() {
for(int i=1;i<=10;i++){
print(i);
}
}
Q49. Print Table of 5
void main() {
for(int i=1;i<=10;i++){
print("5 x $i = ${5*i}");
}
}
Q50. Sum of Numbers
void main() {
int sum = 0;
for(int i=1;i<=10;i++){
sum += i;
}
print(sum);
}Chapter 10: While Loop
Q51. While Loop Syntax
while(condition){
// code
}
Q52. Example
void main() {
int i = 1;
while(i<=5){
print(i);
i++;
}
}
Q53. Reverse Counting
void main() {
int i = 10;
while(i>=1){
print(i);
i--;
}
}Chapter 11: Do While Loop
Q54. Syntax
do{
// code
}while(condition);
Q55. Example
void main() {
int i = 1;
do{
print(i);
i++;
}while(i<=5);
}
Chapter 12: Break and Continue
Q56. Break Example
void main() {
for(int i=1;i<=10;i++){
if(i==5){
break;
}
print(i);
}
}
Q57. Continue Example
void main() {
for(int i=1;i<=10;i++){
if(i==5){
continue;
}
print(i);
}
}Important Coding Questions
Q58. Find Factorial
void main() {
int num = 5;
int fact = 1;
for(int i=1;i<=num;i++){
fact *= i;
}
print(fact);
}Output
120
Q59. Check Prime Number
void main() {
int n = 13;
bool prime = true;
for(int i=2;i<n;i++){
if(n%i==0){
prime = false;
break;
}
}
print(prime ? "Prime" : "Not Prime");
}
Q60. Fibonacci Series
void main() {
int a = 0;
int b = 1;
print(a);
print(b);
for(int i=1;i<=8;i++){
int c = a+b;
print(c);
a=b;
b=c;
}
}
Q61. Reverse Number
void main() {
int num = 1234;
int rev = 0;
while(num>0){
int rem = num%10;
rev = rev*10 + rem;
num ~/= 10;
}
print(rev);
}
Q62. Palindrome Number
void main() {
int num = 121;
int temp = num;
int rev = 0;
while(num>0){
int rem = num%10;
rev = rev*10 + rem;
num ~/=10;
}
if(temp==rev){
print("Palindrome");
}else{
print("Not Palindrome");
}
}MCQs
Q63. Which statement is used for decision making?
A. Loop
B. Array
C. If
D. Function
✅ Answer: C
Q64. Which loop runs at least one time?
A. For
B. While
C. Do While
D. None
✅ Answer: C
Q65. Which keyword exits loop?
A. stop
B. end
C. break
D. exit
✅ Answer: C
Q66. Which keyword skips current iteration?
A. break
B. continue
C. skip
D. pass
✅ Answer: B
Q67. Output?
for(int i=1;i<=3;i++){
print(i);
}A. 1 2 3
B. 1 2
C. 2 3
D. Error
✅ Answer: A
Q68. Output?
int i=1;
while(i<=3){
print(i);
i++;
}A. 1 2 3
B. 1 2
C. Error
D. Infinite
✅ Answer: A
Q69. Output?
print(10%3);A. 3
B. 1
C. 0
D. 10
✅ Answer: B
Q70. Which loop is best when iterations are known?
A. While
B. Do While
C. For
D. Switch
✅ Answer: C
Interview Questions
Q71. Difference between While and Do While?
While
- Condition pehle check hoti hai.
- Zero times run ho sakta hai.
Do While
- Condition baad me check hoti hai.
- Kam se kam ek baar run hota hai.
Q72. Difference between Break and Continue?
Break
- Loop ko completely stop kar deta hai.
Continue
- Current iteration skip karta hai.
Q73. What is Infinite Loop?
while(true){
print("Flutter");
}
Ye kabhi stop nahi hoga.
Q74. What is Nested Loop?
for(int i=1;i<=3;i++){
for(int j=1;j<=3;j++){
print("$i $j");
}
}
Comments
Post a Comment