ITIC:Software and programming introduction - Exercises

From Juneday education
Jump to: navigation, search

Note: The below is an inclusion of the page Chapter:Programming_introduction_-_Exercises

Exercises for the Programming introduction chapter

Introduction to Programming

In what format are program source code stored?

Expand using link to the right to see a hint.

Text file format.

Java and C are examples of compiled languages. What does the compiler do with the source code?

Expand using link to the right to see a hint.

It checks it for syntactic and other kinds of errors, and transforms it to a new format which can be run. In the case of C, the source code is compiled to a binary file which can be run by the target operating system. In the case of Java, the source code is compiled to so called byte code, which can be run by a Java Virtural Machine anywhere.

What is the minimal information you must provide the compiler with, in order for it to compile your program?

Expand using link to the right to see a hint.

Where the source code to compile is. This is typically given as an argument to the compiler on the command line. There are graphical programs for developing, compiling and even running programs too, and in such cases, the compiler knows which file(s) to compile because of the context when you tell the software to compile. We recommend against using such IDEs (integrated development environments) when learning to program. We think it is wise to wait with those until you know more about the basic process of editing, compiling and running a program.

Can you name a few programming languages?

Expand using link to the right to see a hint.

Perhaps you thought of:

  • C
  • C++
  • Java
  • C#
  • Ada
  • Haskell
  • Lisp
  • Pascal
  • Python
  • JavaScript or EcmaScript
  • PHP
  • Perl

Of course, the list could go on forever and ever.

End inclusion of Chapter:Programming_introduction_-_Exercises


The next page is Setting_up_your_environment.

« PreviousBook TOCNext »