Computer Programming


Basic principles of procedural programming.


Objectives

Aim of the course is to help the student understand that a computer can serve as an instrument to solve problems, through its ability to execute fast operations and functions. Then the student will be able to analyze a problem into algorithmic steps which in turn will translate into computer language instructions. Additionally, the student will learn a procedural computer language like C, to use as a means for problem solving.


Prerequisites

Good command of mathematics (mathematical analysis and algebra) through attendance of course: Mathematics. Be familiar with introductory Computer Science concepts, by attending the course: Computer Science Fundamentals.


Syllabus

Introduction: Introduction to computer programming, computer languages, compilers. A simple C language program. #include, #define. Simple arithmetic operations and scanf, printf. Format commands. Arithmetic, comparative and logical operators. Type cast. Program flow control: if, switch. Repetition commands for, while and do-while. The commands “break” and “continue” in repetition loops. Nested commands. In the case of nested ifs, which “if” does an “else” pair with? Number and character arrays: number arrays of one or more dimensions. When to use and advantages. Manipulating with repetition commands (for). Overflowing. Character arrays – strings. String manipulation functions strcpy, strcat, strcmp, strlen. The file “string.h”. NULL. Pointers: pointer declaration. Operators & and *. Dynamic allocation and de-allocation of memory with malloc and free – advantages. Operator sizeof. • Functions: function libraries. Function declaration and definition. Function prototype. The type of the returned value, the type “void”. The “return” command. Arguments and parameters. “By value” and “by reference” function call. Array or pointer as a function argument. Structures: structure definition and variables of type structure. Advantages. Structures as function arguments. Arrays and pointers of type structure. Structures in a structure. Files: text and binary files. File open, read, write and close (fopen, fclose, fsanf, fprintf, fread, fwrite). Step by step use of the above in computer programs to solve problems.

COURSE DETAILS

Level:

Type:

Undergraduate

(A+)


Instructors: Dimitrios Syndoukas
Department: Department of Business Administration (Grevena)
Institution: TEI of Western Macedonia
Subject: Computer and Information Sciences
Rights: CC - Attribution-NonCommercial-NoDerivatives

Visit Course Page

SHARE THIS COURSE
RELATED COURSES