0% found this document useful (0 votes)
36 views

Programming ENGG1035: PA Res, Wilfredo G. STUB 1970

I. This document discusses the history and features of the Turbo C/C++ programming language, including its introduction in the 1980s, support for object-oriented programming in C++, and ability to compile with ANSI C standards. II. It also covers basic C programming concepts like data types, operators, program structure with #include, main(), and code between curly brackets, and header files used in Turbo C like conio.h, ctype.h, iostream.h, and stdio.h. III. A brief history of flowcharts is also provided, noting their introduction in 1921 and common symbols like ovals, arrows, rectangles, and diamonds to represent program

Uploaded by

Miguel Brazas
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Programming ENGG1035: PA Res, Wilfredo G. STUB 1970

I. This document discusses the history and features of the Turbo C/C++ programming language, including its introduction in the 1980s, support for object-oriented programming in C++, and ability to compile with ANSI C standards. II. It also covers basic C programming concepts like data types, operators, program structure with #include, main(), and code between curly brackets, and header files used in Turbo C like conio.h, ctype.h, iostream.h, and stdio.h. III. A brief history of flowcharts is also provided, noting their introduction in 1921 and common symbols like ovals, arrows, rectangles, and diamonds to represent program

Uploaded by

Miguel Brazas
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

PROGRAMMING ENGG1035

PAÑARES, WILFREDO G. STUB 1970


DEV C ++
\‘ Single quote character

COURSE CONTENT \o Null


I Data Types \v Vertical tab
II Operators
A Relational \a Alert
B Logical
III Turbo C++ Source Code Structure \o Octal Constant
IV Examples \x Hexadecimal constant

INTRODUCTION Arithmetic Operators


 Turbo C was first introduced by Borland in the mid-1980s Operator Action
 Become of the most widely used C compilers - Subtraction, also unary minus
 Known for its speed of compilation and efficiency of the + Addition
code that it produces * Multiplication
 Important feature of Turbo C is that it compiles with ANSI / Division
C standards.
% Modulus Division
 C++ allows object-oriented programming (OOP)
 C is a Middle-Level Language -- Decrement
 Allows the manipulation of bits, bytes, and addresses the ++ Increment
basic elements with which the computer function
32 KEYWORDS AS DEFINED BY THE ANSI RELATIONAL & LOGICAL OPERATORS
STANDARDS Relational Operators
Auto Double Int struct Operator Action
Break Else Long switch > Greaterthan
Case Enum Register Typedef >= Greaterthan or equal
Char extern Return Union < Less than
<= Less than or equal
Const Float Short Unsigned
== Equal
Continue For signed Void
!= Not Equal
Default Goto Sizeof Volatile
do if static while TURBO C++ SOURCE CODE STRUCTURE

#include<studio.h> Library
DATATYPES main() Main function
 There are five atomic data types in C: character, integer,
{ Left curly bracket or brace
floating point, double floating point, and valueless
TYPE BIT WIDTH RANGE Printf(“Hello World\n”);
Char 8 0-255 } Right curly bracket or brace
int 16 -32768 to 32767
Source Code - the text of a program that user can read;
float 32 3.4E-38 to 3.4E+38 commonly thought of as the program. The source code is a
double 64 1.7E-308 to 1.7E+308 input into a compiler.
void 0 valueless Linker - a program that links separately compiled functions
together into one program. It combines the functions in the
OPERATORS standard C library with the code that you wrote. The output of
Logical Manipulation the linker is an executable program.
Code Meaning
\b Backspace Library - the file containing the standard functions that can be
used by your program. These functions include all I/O
\f Form feed operations as well as other useful routines.
\n Newline
Compile Time - the even that occur while your program is
\r Carriage return being compiled. A common occurrence during compile time is
a syntax error.
\t Horizontal tab
\” Double quote

BRAZAS, JOSHUA MIGUEL |BSCE 2 1


PROGRAMMING ENGG1035
PAÑARES, WILFREDO G. STUB 1970
Run Time - the events that occur while your program is

Turbo C/C++ Header Files process or program in various


CONIO.H Screen handling function fields
CTYPE.H Chracter handling function (ANSI C)
IOSTREAM.H Defines I/O stream class (C++) HISTORY OF F LOWCHARTS
STDIO.H Declaration for standard I/O streams (ANSI C) Flowcharts were introduced by Frank B. Gilberth in 1921,
and they were called “Process Flow Charts” at the
STRING.H String handling (ANSI C)
beginning. Allan H. Mogensen is credited with training
TIME.H System time function (ANSI C) business people on the use of Flowcharts.
GRAPHICS.H Graphiics functions
SYMBOL NAME FUNCTION
executing
An oval represents a start
Start/end or end point
#include - is know as a preprocessor directive, it tells the
Arrows A line is a connector that
compiler to “include” another program or file along with your
source code. shows relationships
between the representative
#include<stdio.h> - tells the compiler to use the file STDIO.H, shapes
which contains standard I/O, commands required by most C Input/Output A parallelogram represents
programs. input or ouput

main() - identifies the name of the function Process A rectangle represents a


process
{ } - the curly brackets or braces enclose the functions. Decision A diamond indicates
Everything between { and } is part of the function main() decision
printf - is a C language instruction, part of the programming
language that eventually tells the computer what to do.

printf (“ “); - the parentheses enclose text,or a “string” of the Start


text. Everything in the double quote is part of printf’s text string.

\n - means new line


TURBO C++ SOURCE CODE RULES Declare variables num1,num2 and sum
 Braces come in pairs
 All statements end up with a semicolon except for
reserved key words
 Must have a main function Read num1 and num2
 C is done mostly in lowercase. It’s a case sensitive
language
 Declare variable before you use them
Sum a+b
H OW DOES SYSTEM FLOW CHARTS HELPS ?

Display sum

A flowchart is a type of diagram


that represents an algorithm,
workflow or process, showing the Stop
steps as boxes of various kinds,
and their order by connecting
them with arrows. This WHAT ARE THE CORRECT WAYS TO WRITE A I DENTIFIER
diagrammatic representation NAME ?
illustrates a solution model to a
given problem. Flowcharts are Correct Incorrect
used in analyzing, designing, count 1count
documenting or managing a test123 hi!there

BRAZAS, JOSHUA MIGUEL |BSCE 2 2


PROGRAMMING ENGG1035
PAÑARES, WILFREDO G. STUB 1970
high_balance high…balance

Function Purpose
Name/Example
print(“text”) To display information on the screen
scanf(“%d”,%i) Used to read information from
keyboard
Display Manipulation
%d Integer( whole number)
%f Float
%.2f Float w/ 2 decimal space
%s String
%c Character

WHAT ARE printf, scanf, %d, %f, %.2f, %s, and %c ?


EXAMPLE - %D AND %S

#include<stdio.h>
void main()
{
char name[20]
Int age;

printf(“What is your name?\n”);


scanf(“%s”, &name);
printf(“\n Hello, %s glad to meet you.”,
name);
printf(“\n How old are you %s”, name);
scanf(“%d”, &age);
printf(“\n &s age is %d”, name, age);

BRAZAS, JOSHUA MIGUEL |BSCE 2 3


PROGRAMMING ENGG1035
PAÑARES, WILFREDO G. STUB 1970

BRAZAS, JOSHUA MIGUEL |BSCE 2 4

You might also like