You are on page 1of 15

Git Questions.

1. What is Git?
a) A programming language
b) A version control system
c) A text editor
d) An operating system

**Answer: b) A version control system**

2. Which command is used to initialize a new Git repository?


a) git init
b) git create
c) git start
d) git new

**Answer: a) git init**

3. What is a repository in Git?


a) A collection of software packages
b) A remote server used for collaboration
c) A folder that holds your project and its history
d) A type of version control

**Answer: c) A folder that holds your project and its history**

4. How do you stage changes for a commit in Git?


a) git add
b) git commit
c) git stage
d) git push

**Answer: a) git add**


5. What is a branch in Git?
a) A forked version of a repository
b) A separate copy of a file
c) A new programming language
d) A parallel line of development

**Answer: d) A parallel line of development**

6. Which command is used to create a new branch in Git?


a) git branch
b) git new-branch
c) git create-branch
d) git checkout

**Answer: a) git branch**

7. How do you view the commit history in Git?


a) git history
b) git log
c) git show
d) git status

**Answer: b) git log**

8. What is a merge conflict in Git?


a) A disagreement between developers
b) A conflict between different file formats
c) A problem that occurs during a merge operation
d) A conflict between branches

**Answer: c) A problem that occurs during a merge operation**


9. What is the purpose of the `git clone` command?
a) To create a new repository
b) To copy files to a different folder
c) To duplicate a branch
d) To copy a remote repository to your local machine

**Answer: d) To copy a remote repository to your local machine**

10. How can you undo the last commit (but keep the changes) in Git?
a) git undo
b) git revert
c) git reset
d) git remove

**Answer: c) git reset**

11. What is the purpose of the `.gitignore` file in Git?


a) To store sensitive information
b) To define which files should be included in the repository
c) To specify files to be ignored in version control
d) To list all the commits in the repository

**Answer: c) To specify files to be ignored in version control**

12. Which command is used to fetch changes from a remote repository in Git?
a) git fetch
b) git pull
c) git update
d) git clone

**Answer: a) git fetch**


13. What is the purpose of the `git status` command?
a) To show the status of the local repository
b) To display a list of available Git commands
c) To check the status of a remote repository
d) To revert changes in the repository

**Answer: a) To show the status of the local repository**

14. How do you create a new commit in Git?


a) git create
b) git commit
c) git save
d) git add

**Answer: b) git commit**

15. What is the purpose of the `git pull` command?


a) To push changes to a remote repository
b) To merge changes from a remote repository into the current branch
c) To create a new branch
d) To discard changes in the working directory

**Answer: b) To merge changes from a remote repository into the current branch**

16. How do you create and switch to a new branch in Git?


a) git checkout -b new-branch
b) git new-branch
c) git branch create new-branch
d) git branch -n new-branch

**Answer: a) git checkout -b new-branch**


17. What is the purpose of the `git remote` command?
a) To list all the files in a repository
b) To create a new remote repository
c) To show information about a remote repository
d) To remove a remote repository

**Answer: c) To show information about a remote repository**

18. How can you revert a commit that has been pushed to a remote repository?
a) git revert
b) git reset
c) git undo
d) git remove

**Answer: a) git revert**

19. What is the purpose of the `git checkout` command?


a) To create a new branch
b) To switch between different branches
c) To push changes to a remote repository
d) To delete a branch

**Answer: b) To switch between different branches**

20. What is the primary purpose of version control in software development?


a) To track the number of lines of code in a project
b) To prevent developers from collaborating on the same project
c) To manage changes to code and collaborate with others
d) To automatically generate documentation for the project

**Answer: c) To manage changes to code and collaborate with others**


Flutter Questions.
1. What is Flutter?
a) A programming language
b) A version control system
c) A mobile development framework
d) An operating system

Answer: c) A mobile development framework

2. What is a widget in Flutter?


a) A mobile app design
b) A user interface element
c) A programming language
d) A database schema

Answer: b) A user interface element

3. Which file is used to define app metadata and dependencies in a Flutter project?
a) pubspec.yaml
b) main.dart
c) config.xml
d) app.json

Answer: a) pubspec.yaml

4. What is the purpose of the StatefulWidget class in Flutter?


a) It defines a static UI component
b) It manages dynamic data and UI state
c) It handles HTTP requests
d) It controls app navigation

Answer: b) It manages dynamic data and UI state


5. What is the primary function of hot reload in Flutter?
a) It reloads the entire app
b) It compiles the code
c) It refreshes the UI without restarting the app
d) It updates the app's version number

Answer: c) It refreshes the UI without restarting the app

6. How do you navigate to a new screen (route) in Flutter?


a) Using the navigate() function
b) Using the goTo() method
c) Using the Navigator class
d) Using the switchRoute() function

Answer: c) Using the Navigator class

7. What is the purpose of the async keyword in Dart and Flutter?


a) It defines a new function
b) It marks a function as asynchronous
c) It imports external libraries
d) It defines a global variable

Answer: b) It marks a function as asynchronous

8. Which widget is used to create a column layout in Flutter?


a) Row
b) Grid
c) Column
d) Stack

Answer: c) Column
9. How do you apply custom styles (e.g., fonts, colors) to widgets in Flutter?
a) Using the style property
b) Using the applyStyle() method
c) Using the TextTheme class
d) Using the color property

Answer: c) Using the TextTheme class

10. What is the purpose of the main() function in a Flutter app?


a) It defines the app's layout
b) It runs the app and initializes the root widget
c) It handles user input
d) It defines the app's metadata

Answer: b) It runs the app and initializes the root widget

11. Which widget is used to display a piece of text in Flutter?


a) TextWidget
b) TextView
c) TextDisplay
d) Text

**Answer: d) Text**

12. Which widget is used to create a clickable button in Flutter?


a) Button
b) Clickable
c) RaisedButton
d) ClickButton

**Answer: c) RaisedButton**
13. Which widget is used to create a layout with rows and columns in Flutter?
a) GridLayout
b) LinearLayout
c) ColumnLayout
d) Row and Column

**Answer: d) Row and Column**

14. Which widget is used to display images in Flutter?


a) ImageView
b) ImageDisplay
c) ImageWidget
d) Image

**Answer: d) Image**

15. What is the purpose of the `Container` widget in Flutter?


a) To create a decorative box
b) To hold text only
c) To create a clickable area
d) To display images

**Answer: a) To create a decorative box**

16. Which widget is used to create a scrollable list of items?


a) ScrollList
b) ListWidget
c) ListView
d) ScrollableList

**Answer: c) ListView**
17. What is the purpose of the `TextField` widget in Flutter?
a) To display text only
b) To create a text input field
c) To display a clickable link
d) To display images

**Answer: b) To create a text input field**

18. Which widget is used to create a card-like interface in Flutter?


a) CardView
b) CardWidget
c) Container
d) Card

**Answer: d) Card**

19. What is the primary purpose of the `Icon` widget in Flutter?


a) To display images
b) To create clickable buttons
c) To display icons in the app's UI
d) To show a progress indicator

**Answer: c) To display icons in the app's UI**

20. Which widget is used to create a circular loading spinner in Flutter?


a) LoadingSpinner
b) CircularProgressIndicator
c) ProgressCircle
d) CircularLoader

**Answer: b) CircularProgressIndicator**
21. What is the purpose of the `DropdownButton` widget in Flutter?
a) To display a list of options as a dropdown menu
b) To create clickable buttons
c) To display images
d) To show a progress indicator

**Answer: a) To display a list of options as a dropdown menu**

22. Which widget is used to create a slider input in Flutter?


a) SliderWidget
b) ValueSlider
c) RangeSlider
d) Slider

**Answer: d) Slider**

23. What is the purpose of the `Switch` widget in Flutter?


a) To display a clickable link
b) To create a card-like interface
c) To toggle between two states
d) To show a progress indicator

**Answer: c) To toggle between two states**

24. Which widget is used to display a date and time picker in Flutter?
a) DateTimePicker
b) DatePicker
c) TimePicker
d) DateTimeWidget

**Answer: a) DateTimePicker**
25. What is the primary purpose of the `SnackBar` widget in Flutter?
a) To display images
b) To show a temporary message at the bottom of the screen
c) To create a clickable button
d) To show a progress indicator

**Answer: b) To show a temporary message at the bottom of the screen**

26. Which widget is used to create a tabbed navigation interface?


a) TabWidget
b) TabBarView
c) TabbedView
d) TabBar

**Answer: d) TabBar**

27. What is the purpose of the `Stepper` widget in Flutter?


a) To display a clickable button
b) To create a linear series of steps
c) To show a progress indicator
d) To display images

**Answer: b) To create a linear series of steps**

28. Which widget is used to create a radio button group in Flutter?


a) RadioButtonGroup
b) RadioGroup
c) RadioButtons
d) RadioListTile

**Answer: d) RadioListTile**
29. What is the purpose of the `FloatingActionButton` widget in Flutter?
a) To display images
b) To create a card-like interface
c) To show a progress indicator
d) To create a circular action button

**Answer: d) To create a circular action button**

30. Which widget is used to create a bottom navigation bar in Flutter?


a) BottomNavigationBar
b) BottomNavView
c) TabBar
d) BottomNav

**Answer: a) BottomNavigationBar**

31. What is the purpose of the `ExpansionPanel` widget in Flutter?


a) To display a panel with expandable content
b) To create a card-like interface
c) To show a progress indicator
d) To toggle between two states

**Answer: a) To display a panel with expandable content**


32. Which widget is used to create a scrollable area that expands as needed?
a) ScrollableView
b) ScrollView
c) FlexibleView
d) SingleChildScrollView

**Answer: d) SingleChildScrollView**
33. What is the primary purpose of the `PopupMenuButton` widget in Flutter?
a) To display images
b) To create a dropdown menu triggered by a button
c) To create a card-like interface
d) To show a progress indicator

**Answer: b) To create a dropdown menu triggered by a button**

34. Which widget is used to create a circular avatar image?


a) CircleImage
b) CircularAvatar
c) AvatarImage
d) CircleAvatar

**Answer: d) CircleAvatar**

35. What is the purpose of the `DataTable` widget in Flutter?


a) To create a table of data
b) To display images
c) To show a progress indicator
d) To create a card-like interface

**Answer: a) To create a table of data**

36. Which widget is used to create a search input field with an associated button?
a) SearchField
b) SearchBar
c) SearchWidget
d) TextField with IconButton

**Answer: d) TextField with IconButton**

37. What is the purpose of the `ClipRRect` widget in Flutter?


a) To display a rounded rectangle image
b) To create a card-like interface
c) To clip a child widget with rounded corners
d) To show a progress indicator

**Answer: c) To clip a child widget with rounded corners**

38. Which widget is used to create a progress indicator in Flutter?


a) LoadingIndicator
b) ProgressSpinner
c) CircularProgressIndicator
d) ProgressBar

**Answer: c) CircularProgressIndicator**

39.What is the primary purpose of the `RichText` widget in Flutter?


a) To display images
b) To create styled and formatted text with multiple styles
c) To show a progress indicator
d) To create a card-like interface

**Answer: b) To create styled and formatted text with multiple styles**

40. Which widget is used to create a grid of items with a fixed number of columns?
a) GridView
b) GridList
c) GridLayout
d) ColumnGrid

**Answer: a) GridView**

You might also like