Characters
Special characters called escape sequences are used to represent printable characters, such, as newline and tab.
- \n: Newline character.
- \t: Tab character.
- \”: Double quote character.
- \’: Single quote character.
- \\: Backslash character.
#include <iostream>
int main() {
printf("Hello, world!\nThis is a new line.\n");
printf("Tabbed \t text.\n");
printf("Double quote: \"\n");
printf("Single quote: \'\n");
printf("Backslash: \\n");
return 0;
}
#include <stdio.h>
int main() {
printf("Hello, world!\nThis is a new line.\n");
printf("Tabbed\ttext.\n");
printf("Double quote: \"\n");
printf("Single quote: \'\n");
printf("Backslash: \\n");
return 0;
}
public class Main {
public static void main(String[] args) {
System.out.println("Hello, world!\nThis is a new line.\n");
System.out.println("Tabbed\ttext.\n");
System.out.println("Double quote: \"\n");
System.out.println("Single quote: \'\n");
System.out.println("Backslash: \\n");
}
}
print("Hello, world!\nThis is a new line.")
print("Tabbed\ttext.\n")
print("Double quote: \"\n")
print("Single quote: \'\n")
print("Backslash: \\n")
console.log("Hello, world!\nThis is a new line.");
console.log("Tabbed\ttext.");
console.log("Double quote: \"");
console.log("Single quote: \'");
console.log("Backslash: \\");
Output
Hello, world! This is a new line. Tabbed text. Double quote: " Single quote: ' Backslash: \n
How to Start Coding
In this ever-evolving digital landscape, the ability to code is not just a valuable asset but a gateway to creative expression and innovation. This brief guide will outline practical steps and essential principles to guide aspiring learners on their path to mastering the art of coding.
Table of Content
- Introduction, to Basic Syntax. Hello World
- Understanding Data Types
- Variables and Constants
- Keywords
- Operators
- Decision Making statements
- Loops
- Numbers
- Characters
- Arrays
- Strings- Basic String Concepts
- Functions
Contact Us