Go Developer (Go Data Types)

0.0(0)
Studied by 1 person
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/10

flashcard set

Earn XP

Description and Tags

Step by step guide to becoming a Go developer in 2023

Last updated 5:00 PM on 1/25/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

11 Terms

1
New cards

What are Data Types?

Data type specifies the size and type of variable values.

2
New cards

Go is statically typed:

Variable type defined can only store data of that type.

3
New cards

Go has three basic data types:

  • bool: represents a boolean value and is either true or false.

  • Numeric: represents integer types, floating point values, and complex types.

  • string: represents a string value.

4
New cards

Fill the blanks in the snippet:
var a **** = true
var b *** = 5
var c ******* = 3.14
var d ****** = "Hi!"

bool
int
float32
string

5
New cards

Fill the blanks: A ******* data type is declared with the **** keyword and can only take the values **** or *****.

boolean, bool, true, false

6
New cards

The default value of a boolean data type is *****.

false

7
New cards

Signed integers, declared with one of the int keywords, can store?:

both positive and negative values.

8
New cards

Go has five keywords/types of signed integers:

  • int

  • int8

  • int16

  • int32

  • int64

9
New cards

Unsigned integers, declared with one of the uint keywords?:

Can only store non-negative values.

10
New cards

The float data types are used to store?:

Positive and negative numbers with a decimal point.

11
New cards

The string data type is used to store?:

A sequence of characters (text). String values must be surrounded by double quotes.