Log In
0% completed
All Lessons
Free Lessons (5)
Getting Started With D
The Hello World Program
writeln and write
Challenge: Fix the Code
Solution: Fix the Code
Compilation of D Code
Quiz
Variables and User Input
Fundamental Types
Assigning Values to Variables
auto and typeof
Challenge: Output Variable Values in a Statement
Solution: Output Variable Values in a Statement
Standard Input and Output Streams
Reading from the Standard Input
Quiz
Arithmetic and Logical Operations on Data Types
Logical Expressions
Challenge: Fix the Code
Solution: Fix the Code
Integers
Basic Arithmetic Operations on Integers
Advanced Arithmetic Operations on Integers
Challenge: Find Remainder and Quotient of an Integer
Solution: Find Remainder and Quotient of an Integer
Detecting Overflow and Truncation in Integers
Floating Point Types
Overflow and Truncation in Floating Point Types
Floating Point Types Usage and Limitations
Challenge: Find Twice and One Fifth of a Floating Point Value
Solution: Find Twice and One Fifth of a Floating Point Value
Quiz
Conditional Statements and Loops
if Statement
Chaining if-else Statements
Challenge: Fix the Code
Solution: Fix the Code
Ternary Operator ?:
Lazy Operators
while Loop
Name Scopes
for Loop
Challenge: Print a Parallelogram Pattern
Solution: Print a parallelogram pattern
do-while Loop
Quiz
Arrays, Characters and Strings
Arrays
An Array Example
Array Initialization and Basic Array Operations
Associative Arrays
Challenge: Sort and Reverse Elements of an Array
Solution: Sort and Reverse Elements of an Array
Slices and Other Array Features
Slices: Termination of Sharing
Operations on All Elements
Multi-dimensional Arrays
Challenge: Halve the Elements of the Array
Solution: Halve the Elements of the Array
Characters: Introduction
Characters: Types and Literals
Characters: The std.uni Module
Characters: D's Unicode Problems and Support
Strings
String Length, Literals and Comparison
Challenge: Print Part of a String
Solution: Print Part of a String
Quiz
File Handling in D
Redirecting the Standard Input and Output Streams
Files
std.stdio.File struct
Challenge: Write the Contents of a File to Another File
Solution: Write the Contents of a File to Another File
Quiz
Literals and enum
Integer and Floating Point Literals
Challenge: Fix the Code
Solution: Fix the Code
Character and string Literals
enum
Quiz
Formatted Output and Input
Formatted Output
Format Specifiers: Format_Character
Format Specifiers: Width, Separator, Precision and Flags
Format Specifiers: Formatted Element Output
Format Specifiers: Positional Parameters and Format
Challenge: Convert a Floating Point Value into a Percentage Value
Solution: Convert a Floating Point Value into a Percentage Value
Formatted Input
Challenge: Print the Number of the Month from a Given Date
Solution: Print the Number of the Month from a Given Date
Quiz
foreach Loop and switch-case Statement
foreach Loop
foreach Loop Properties
Challenge: Swap Keys with Values of an Associative Array
Solution: Swap Keys with Values of an Associative Array
switch and case
Challenge: Build a Calculator Application
Solution: Build a Calculator Application
Quiz
Functions
Introduction
How Functions Work?
Improved Code Quality
Challenge: displayMenu() Function
Solution: displayMenu() Function
Quiz
Immutability
Immutability
Immutable Parameters
Should a Parameter be const or immutable?
Immutability of the Slice Versus the Elements
Quiz
Value Types and Reference Types
Value Types
Reference Variables
Reference Types
Value Types vs Reference Types
Quiz
Function Parameters
Function Parameters
Referenced Variables As Parameters
Parameter Qualifiers: in, out, const and immutable
Parameter Qualifiers: ref, auto ref and inout
Parameter Qualifiers: lazy, scope and shared
Function Parameters: Summary
Challenge: Fix the Code
Solution: Fix the Code
Lvalues and Rvalues
Quiz
Program Environment
The Return Value of main( )
Parameters of main( )
Command-Line Options and the std.getopt Module
Environment Variables and Starting Other Programs
Quiz
Exceptions and scope
Exceptions
The throw Statement
The try-catch Statement to Catch Exceptions
The finally Block
Exception Properties
Kinds of Errors
scope
Quiz
assert and enforce Statements
Types of assert
Properties of assert
enforce and the Use of assert-enforce
Challenge: Fix the Code
Solution: Fix the Code
Challenge: Fix the Code
Solution: Fix the Code
Quiz
Unit Testing
Cause and Discovery of the Bugs
Unit Testing
Testing for Exceptions
Test-Driven Development
Challenge: Make the Unit Test Pass
Solution: Make the Unit Test Pass
Quiz
Contract Programming
in Blocks for Preconditions
out Blocks and Expression-based Contracts
in Blocks Versus enforce Checks
Challenge: Maintain Total Points
Solution: Maintain Total Points for Two Football Teams
Quiz
Programming in D: The Ultimate Guide for Software Engineers
/
...
/
Challenge: Make the Unit Test Pass
Challenge: Make the Unit Test Pass
Here is a coding challenge to write a unit test.
We'll cover the following...
Problem statement
Challenge
Problem statement
#
...