LearnThatStack Ace your next interview
Blockchain Technologies
Solidity.
40 Qs 6 free
Change topic Change
Drill · questions

All questions

of 40
Beginner 9
01

What is Solidity and what is it used for?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Solidity is a high-level, object-oriented programming language specifically designed for writing smart contracts on Ethereum and other blockchain platforms. It's statically typed and supports inheritance, libraries, and complex user-defined types.

Solidity is primarily used for:

  • Creating smart contracts for decentralized applications (DApps)
  • Implementing token standards (ERC-20, ERC-721, ERC-1155)
  • Building decentralized finance (DeFi) protocols
  • Creating decentralized autonomous organizations (DAOs)
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

02

Explain the difference between `uint` and `int` in Solidity.

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain
  • uint represents unsigned integers (positive numbers and zero only)
  • int represents signed integers (positive, negative, and zero)

Both come in different sizes: uint8 to uint256 and int8 to int256. The default uint is equivalent to uint256, and int is equivalent to int256.

uint256 public positiveNumber = 100; // Can only store 0 to 2^256 - 1
int256 public anyNumber = -50;       // Can store -2^255 to 2^255 - 1
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

03

What are the main components of a smart contract?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

The main components include:

  • State variables: Store data permanently on the blockchain
  • Functions: Define contract behavior and interactions
  • Events: Enable logging and external notifications
  • Modifiers: Reusable code for function validation
  • Constructor: Initializes contract state during deployment
contract Example {
    uint256 public value; // State variable
    
    constructor(uint256 _initialValue) { // Constructor
        value = _initialValue;
    }
    
    modifier onlyPositive(uint256 _value) { // Modifier
        require(_value > 0, "Value must be positive");
        _;
    }
    
    function setValue(uint256 _value) public onlyPositive(_value) { // Function
        value = _value;
        emit ValueChanged(_value); // Event
    }
    
    event ValueChanged(uint256 newValue); // Event
}
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

04

What is the difference between `public`, `private`, `internal`, and `external` visibility modifiers?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain
  • public: Accessible from anywhere (internally, externally, and by derived contracts)
  • private: Only accessible within the same contract
  • internal: Accessible within the same contract and derived contracts
  • external: Only accessible from outside the contract (not internally)
contract VisibilityExample {
    uint256 public publicVar;     // Auto-generates getter
    uint256 private privateVar;   // Only this contract
    uint256 internal internalVar; // This contract + derived
    
    function externalFunc() external {} // Only external calls
    function publicFunc() public {}     // Internal + external calls
    function internalFunc() internal {} // This contract + derived
    function privateFunc() private {}   // Only this contract
}
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

05

Explain the concept of gas in Ethereum and how it relates to Solidity.

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Gas is the computational cost required to execute operations on the Ethereum network. Every operation in Solidity has a gas cost, and users must pay gas fees to execute transactions.

Key concepts:

  • Gas Limit: Maximum gas a transaction can consume
  • Gas Price: Amount of Ether willing to pay per unit of gas
  • Gas Used: Actual gas consumed by the transaction

Different operations have different gas costs:

  • Simple operations (addition): ~3 gas
  • Storage operations (SSTORE): ~5,000-20,000 gas
  • Contract creation: ~32,000 gas + deployment code
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

06

What are events in Solidity and why are they important?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Events are a way for smart contracts to communicate that something has happened on the blockchain. They are stored in the transaction logs and can be accessed by external applications.

Benefits:

  • Cost-effective logging mechanism
  • Enable dApp frontend notifications
  • Facilitate blockchain indexing and searching
  • Provide audit trail for contract interactions
contract Token {
    event Transfer(address indexed from, address indexed to, uint256 value);
    
    function transfer(address to, uint256 amount) public {
        // Transfer logic here
        emit Transfer(msg.sender, to, amount);
    }
}
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

07

What are mappings and how do they work?

Part of Pro
08

What is the difference between arrays and mappings?

Part of Pro
09

Explain the difference between `view`, `pure`, and regular functions.

Part of Pro
Intermediate 18
10

What is the difference between `msg.sender` and `tx.origin`?

Part of Pro
11

Explain the difference between `require`, `assert`, and `revert`.

Part of Pro
12

Explain the difference between storage, memory, and calldata.

Part of Pro
13

Explain fixed-size vs dynamic arrays in Solidity.

Part of Pro
14

What are function modifiers and how are they used?

Part of Pro
15

What are function overloading and function selectors?

Part of Pro
16

What is the fallback function and receive function?

Part of Pro
17

How does inheritance work in Solidity?

Part of Pro
18

What are interfaces and how are they different from abstract contracts?

Part of Pro
19

Explain the `virtual` and `override` keywords.

Part of Pro
20

What is the difference between `transfer`, `send`, and `call` for sending Ether?

Part of Pro
21

What are some gas optimization techniques in Solidity?

Part of Pro
22

Explain storage slots and how variables are packed.

Part of Pro
23

What are libraries and how do they differ from contracts?

Part of Pro
24

How do you handle errors and exceptions in Solidity?

Part of Pro
25

What are some testing strategies for smart contracts?

Part of Pro
26

How do you debug smart contracts?

Part of Pro
27

What are oracles and why are they needed?

Part of Pro
Expert 13
28

What is the reentrancy attack and how can it be prevented?

Part of Pro
29

What are some common security vulnerabilities in smart contracts?

Part of Pro
30

What are proxy patterns and why are they used?

Part of Pro
31

What is inline assembly and when would you use it?

Part of Pro
32

Explain the CREATE and CREATE2 opcodes.

Part of Pro
33

What are delegate calls and how do they work?

Part of Pro
34

What is the diamond pattern (EIP-2535)?

Part of Pro
35

What are meta-transactions and how do they work?

Part of Pro
36

Explain flash loans and their implementation.

Part of Pro
37

What are state channels and how do they work?

Part of Pro
38

What is MEV (Maximum Extractable Value) and how does it affect smart contracts?

Part of Pro
39

How do you implement access control patterns beyond simple ownership?

Part of Pro
40

What are the latest developments in Solidity and Ethereum that developers should know about?

Part of Pro

No matches

Try a different filter or search term.

Pro · $10/mo

34 of 40 Solidity answers are gated.

Full answers, code samples, AI explanations - simpler, deeper, or as an interactive diagram. Cancel anytime.

  • Full answers + code
  • AI explain - simpler, deeper, or visualized
  • 1,000 AI credits / month
  • Cancel anytime

Change topic

Pick a different technology or stack. Your current topic stays put until you choose a new one.

Technologies
No technologies match “”.
Cross-cutting topics
No topics match “”.
By role
Stacks & frameworks

MEAN

MongoDB, Express, Angular, Node.js

MERN

MongoDB, Express, React, Node.js

LAMP

Linux, Apache, MySQL, PHP

Django

Python Full-Stack Development

Ruby on Rails

Convention over Configuration

JAM

JavaScript, APIs, and Markup

Serverless on AWS

Serverless Architecture on AWS

Cross-cutting topics 43 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.

Flutter Mobile

Flutter Cross-Platform Mobile Development

Cross-cutting topics 44 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.

Spring Boot

Enterprise Java Development

.NET

Microsoft Ecosystem

Vue

Vue.js, Vite, TypeScript, Tailwind, Node.js

Go Backend

Golang, gRPC, PostgreSQL, Redis, RabbitMQ

FastAPI

Python, FastAPI, SQLAlchemy, PostgreSQL

React Native

React, TypeScript, Redux, Firebase

iOS Native

Swift, SwiftUI, UIKit, Firebase

Android Native

Java, Jetpack Compose, Firebase

Web3 / Ethereum

Solidity, Ethereum, Hardhat, Foundry

DevOps / Platform

Docker, Kubernetes, Terraform, CI/CD

Core SWE Interview Prep

Data structures, algorithms, OS, concurrency, networking, git
Big-O & Complexity Analysis Arrays, Strings & Hash Tables Linked Lists, Stacks & Queues Trees, BSTs & Heaps Graphs Sorting, Searching & Recursion Operating Systems Concurrency & Multithreading Networking for Developers Git & Version Control API Design 45 Distributed Systems Fundamentals 34

Cross-cutting topics 43 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.


Cross-cutting topics 45 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.