CompTIA IT Fundamentals+ (ITF+) Study Guide by Quentin Docter
Author:Quentin Docter [Docter, Quentin]
Language: eng
Format: epub
ISBN: 9781119513094
Publisher: Wiley
Published: 2018-07-31T14:30:00+00:00
There are dozens of compiled languages a programmer can choose from, but unless there is a specific need, the programmer is likely going to go with one of the more common ones. In days past, the choices might have been Fortran, BASIC, or Pascal. Now, Java, C, C++ (pronounced C plus plus), and C# (pronounced C sharp) are the most popular. The Linux and Windows kernels are written in C. The rest of Windows is written mostly in C++, with a bit of custom assembly thrown in for good measure.
Let’s take a look at the source code for “Hello, world!” in Java, which is the most popular programming language in use today:
public class HelloWorld { public static void main(String[] args) { // Prints “Hello, world!” in the terminal window. System.out.println(“Hello, world!”); } }
Compare and contrast the Java code to assembly. A few things might jump out. First, the program is a lot shorter. Second, the syntax is different. Java uses braces (the { and }) to indicate code blocks. Notice that for every open brace, there is a corresponding close brace. Single-line comments in Java are preceded with two slashes (//) instead of a semicolon. Even little things—assembly uses single quotes around the words that you want to print while Java uses double quotes—are different. As for the rest of the context, don’t worry about understanding it all right now. Again, the point is to just get a feel for what some basic code looks like.
The next stop on your tour of compiled languages is C++. Let’s look at source code for your new favorite program:
// Header file #include<iostream> using namespace std; // the main function is where the program execution begins int main() { // the message to the world cout<<“Hello, world!”; return 0; }
There are a few similarities to Java. C++ and Java are both derivatives of the C language, so it makes sense that they would share some features. For example, comments start with two slashes, and braces are present to create blocks of code. Other things that you might have noticed are that both use a main function, double quotes for text, and a semicolon to end a statement.
Finally, take a look at the same program written in C#. C# is also a derivative of C, so some of this code might start to look familiar to you:
using System; namespace HelloWorld { Class Program { // the main function - also known as a method Static void Main(string[] args) { // the message to the world Console.WriteLine(“Hello, world!”); Console.ReadLine(); } } }
The indentation used in programming, in most cases, does not affect the functionality of the program. It’s there to make it easier for the developer (or other people looking at the code) to read. In the C# example, the indentation makes it easy to see that there are three open braces and three corresponding close braces. Again, for the IT Fundamentals+ (ITF+) exam, don’t worry about being able to read or write code in a specific language.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
TCP IP by Todd Lammle(2639)
MCSA Windows Server 2016 Study Guide: Exam 70-740 by William Panek(2313)
The KCNA Book by Nigel Poulton(1973)
Red Hat Certified Specialist in Services Management and Automation EX358 Exam Guide by Eric McLeroy(1950)
Networking A Beginner's Guide by Bruce Hallberg(1933)
31 Days Before Your CompTIA A+ Exams (Shanette Luellen's Library) by Benjamin Patrick Conry(1665)
Unity Certified Programmer: Exam Guide by Philip Walker(1490)
MCSA Windows Server 2016 Study Guide: Exam 70-741 by William Panek(1479)
PHP 7 Zend Certification Study Guide by Andrew Beak(1453)
Healthcare Information Security and Privacy (All-In-One) by Sean Murphy(1370)
CompTIA A+ Certification Guide (220-901 and 220-902) by Matthew Bennett(1338)
Microsoft Security, Compliance, and Identity Fundamentals Exam Ref SC-900 by Dwayne Natwick(1304)
RHCSA & RHCE Red Hat Enterprise Linux 7: Training and Exam Preparation Guide (EX200 and EX300), Third Edition by Asghar Ghori(1303)
Designing and Implementing Microsoft Azure Networking Solutions by David Okeyode(1296)
Essential Office 2016 by Wilson Kevin(1254)
Mobile Computing Deployment and Management by Robert J. Bartz(1253)
Essential Office 2016 (Computer Essentials) by Kevin Wilson(1227)
The Tao of Network Security Monitoring by Richard Bejtlich(1195)
CCNA Cisco Certified Network Associate Practice Labs and Simulations by Shwergho Smith(1149)