Halo

A magic place for coding

0%

Introduction

This post will give a general introduction of Stack, and some of its basic operations.

Definition

A stack is a version of a list that is particularly useful in applications involving reversing. In a stack data structure, all insertions and deletions of entries are made at one end, called the top fo the stack, which is also the only position that a user can manipulate the entries.
When it comes to the operations, we talk about push and pop. When we add an item to a stack, we usually say that we push it onto the stack. And when we remove an item, we usually say that we pop it from the stack. So, noted that the last item pushed onto a stack is always the first data to be removed from the stack. This special property is called last in first out, or LIFO.

Read more »

How to write a programme

Today, I’d like to introduce you how to compile and execute a C program. As we known, C is an advanced programming language, there are four steps for producing a C program:Preprocess, Compile, Link and Execution.
First, a corrected C file without any syntax mistake is needed. Then you can use IDE or Command-Line to compile it.

Read more »

Introduction

Say hello World

This is my personal tech blog, where I will introduce some programming knowlegdes.
I have to admit that I am not a proficient or professional programmer. Instead, I am just a novice I suppose. So if there is any technical mistakes or problem, you’re welcomed to comment or send an email to me. Your suggestions or comments will be highly valued.

First programme

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//C version
#include <stdio.h>
int main() {
printf("Hello World!\n");
return 0;
}


//C++ version
#include <iostream>
using namespace std;
int main() {
cout << "Hello World!" << endl;
return 0;
}

Now you execute the program and you can see the text on your screen. It’s simple but a good begin. Now enjoy coding!