Here is the textfile:
{
"Description": "Domain ownership verification file for Office 365 - place in the website root",
"Domain": "dbestreads.blogspot.com",
"Id": "3a716a7d-e7e4-46f0-9bbe-aa19ef085077"
}
Amazon
Friday, July 10, 2020
Monday, September 19, 2016
Windows 7 ABCs: Tips, Tricks, Tweaks, and Hacks Tested For Windows 7 from A-Z
Windows 7 ABCs: Tips, Tricks, Tweaks, and Hacks Tested For
Windows 7 from A-Z
Copyright 2016
Thomas Watson
Edition License Notes
This book is authorized
for your own personal use. This book may not be re-sold or offered away to
other individuals. Much thanks to you for regarding the diligent work of the
author.
Introduction
This book is intended for technical
and non-technical Windows 7 users. This book uses Simple words, Short
sentences and Straightforward
paragraphs. The triple S and the simplest way of tweaking Windows 7. The topics
covered in this book includes an A to Z of
proven and tested tips, tricks, tweaks, and hacks for Windows 7 Operating
System of Microsoft. This book presents screen shots and step by step
discussions of making the performance of Windows 7 better, and some known
tricks and tweaks to make the system more efficient. Those familiar with
writings about the different hacking, tweaking, and tricks may notice that many
of the important ideas, concepts, and principles found in this book came from
many authoritative sources with incorporated original ideas of the author. The
author is therefore, expressing his thanks and gratitude to all those authors
whose ideas, concepts, and principles have been used to enrich the content of this
book. TO GOD BE THE GLORY!
Table of Contents
The author wishes to express his
heartfelt gratitude to the Almighty God for His grace, wisdom, and guidance and
for giving the author the determination to write this book. This book would not
have been possible without the support and help of several individuals who in
one way or another contributed and extended their valuable assistance in the
preparation and completion of this material.
The author dedicates
this book to the ALMIGHTY GOD.
This book is also
dedicated to Dennis Ritchie for
giving the author the tools to program and to Bill Gates for giving the author the reasons to program.
Tips,
Tricks, Tweaks, and Hacks from A-Z
A. Making Windows 7 Faster in exchange for Animation and Visual Effects
Windows 7 may run and execute a
lot faster if the animations and visual effects are reduced to a minimum. In
order to do this, right-click on Computer icon on Desktop and select Properties
or simple press WIN + Pause/Break keys. Now click on Advanced system settings
link in left side pane.
Another way is to open it directly
by giving sysdm.cpl command in RUN
or start menu search box as presented in figure A.1.
Figure A.1
Purchase this book @ AMAZON
Research Methods: Simple, Short, and Straightforward Way Of Learning Methods of Research
Research Methods: Simple, Short, and Straightforward Way Of Learning
Methods of Research
Copyright 2016
Sherwyn D. Allibang
Edition License Notes
This book is authorized
for your own personal use. This book may not be re-sold or offered away to other
individuals. Much thanks to you for regarding the diligent work of the author.
Introduction
This book is intended for beginners
in research. This book uses Simple
words, Short sentences and Straightforward paragraphs. The triple
S and the simplest way of learning methods of research. Research in general
refers to a search for knowledge. The topics covered in this book includes a
brief introduction to research, research approaches, research designs, data
gathering techniques, sampling, and guides and tips in writing a research paper.
This book includes data and information needed by students who are taking the
course who will eventually write their research paper. This book is full of examples
along with the discussion of each topic. Those familiar with writings about
methods of research may notice that many of the important ideas, concepts, and
principles found in this book came from many authoritative sources with
incorporated original ideas of the author. The author is therefore, expressing
his thanks and gratitude to all those authors whose ideas, concepts, and
principles have been used to enrich the content of this book. TO GOD BE THE GLORY!
Table
of Contents
What is Research?
What are the Objectives of
Research?
What Makes People do Research?
Research Approaches
Qualitative
Quantitative
Research Process
Descriptive Design
Co-relational Design
Causal-Comparative Design
Developmental Design
Interview
Observation
Questionnaire
Likert Scale
Thurstone Scale
Guttman Scale
Semantic Differential Scale
Types of sampling
Probability sampling
Non-probability sampling
Statistical tools in sampling
Slovin formula
Lynch formula
Chapter 1 - INTRODUCTION
Background of the Study
Statement of the Problem/Objective
Theoretical Framework
Conceptual Framework/Paradigm
Assumption(s)/Hypotheses
Scope and Delimitation
Significance of the Study
Definition of Terms
Chapter 2- REVIEW OF LITERATURE
AND STUDIES
Related Literature
Related Studies
Chapter 3- RESEARCH METHODOLOGY
Research Design
Sources of Data
Instrumentation and Data Collection
Tools for Data Analysis
Chapter 4- FINDINGS, PRESENTATION,
ANALYSIS, AND INTERPRETATION OF DATA
Chapter 5- SUMMARY, CONCLUSIONS, AND
RECOMMENDATIONS
The author wishes to express his
heartfelt gratitude to the Almighty God for His grace, wisdom, and guidance and
for giving the author the determination to write this book. This book would not
have been possible without the support and help of several individuals who in
one way or another contributed and extended their valuable assistance in the
preparation and completion of this material.
The author dedicates
this book to the ALMIGHTY GOD.
This chapter presents a brief
overview and the fundamentals of research.
What
is Research?
Research in general refers to a
search for knowledge. Research may be Applied
or Basic. The purpose of applied
(action) research is to solve an immediate, practical problem, while the basic
(Pure) research doesn't necessarily provide results of immediate, practical
use.
Let's look at some definition of
research from credible sources.
Merriam-Webster.
Research is a careful study that
is done to find and report new knowledge about something. It is the activity of
getting information about a subject.
OECD (2002) Frascati Manual.
Research comprises “creative work
undertaken on a systematic basis in order to increase the stock of knowledge,
including knowledge of man, culture and society, and the use of this stock of
knowledge to devise new applications.
Martyn Shuttleworth.
In the broadest sense of the word,
the definition of research includes any gathering of data, information and
facts for the advancement of knowledge.
Creswell.
“Research is a process of steps
used to collect and analyze information to increase our understanding of a
topic or issue”. It consists of three steps: Pose a question, collect data to
answer the question, and present an answer to the question.
Based from the above mentioned
definitions, when someone asks you to research on a certain topic, and then you
search for answers, and found the answers on the web, books, or other
literatures, what you have done is not research, instead, what you have done is
called literature review.
Looking at the research
definitions above, a research is an
activity conducted in order to contribute into the existing body or stock of
knowledge. For an instance, you need to determine which among the two
brands of cars is better. When, you use Google or other sources to look for
answers, and you found the answer that brand A is better than Brand B, the
activity conducted is called literature review. However, if you verified the
truthfulness of the literature, tested the two brands on the same condition,
and document the testing made, the findings, and you formulated a conclusion,
then that's the time it is called a research. Most likely, a research has
findings and conclusions, and this is how the activity contributes to the
existing body of knowledge because the conditions, the findings, the date and
time it is conducted, and the conclusions derived are new knowledge that
contributes to the existing stock of knowledge.
What
are the Objectives of Research?
The prime objectives of research
are:
1. to discover new facts;
2. to verify and test important facts;
3. to analyze an event or process
or phenomenon to identify the cause and effect relationship;
4. to develop new scientific
tools, concepts and theories to solve and understand scientific and
nonscientific problems;
5. to find solutions to
scientific, nonscientific and social problems; and
6. to overcome or solve the
problems occurring in our daily life.
What
Makes People do Research?
This is a fundamentally important
question. No person would like to do research unless there are some motivating
factors . Some of the motivations are the following:
1. to get a research degree
(Doctor of Philosophy (Ph.D.)) along with its benefits like better employment,
promotion, increase in salary, etc;
2. to get a research degree and
then to get a teaching position in a college or university or become a
scientist in a research institution;
3. to get a research or teaching
positions;
4. to solve the unsolved and
challenging problems;
5. to get joy of doing some
creative work;
6. to acquire respectability;
7. to get recognition;
8. curiosity to find out the
unknown facts of an event;
9. curiosity to find new things;
and
10. to serve the society by
solving social problems.
Research
Approaches
In any form of research, the
researcher will be required to either count things and/or talk to people.
Research approaches can be classified using this distinction which are Qualitative and Quantitative.
Qualitative.
This approach is concerned with the
quality of information as it attempt to gain an understanding of the underlying
reasons and motivations for actions. It establish how people interpret their
experiences and the world around them and provide insights into the setting of
a problem, generating ideas and/or hypotheses. Most likely, qualitative relies
on the perceptions of someone on given or observed facts.
Quantitative.
This approach is concerned with
trying to quantify things as it asks questions such as ‘how long’, ‘how many’
or ‘the degree to which’. It quantify data and generalize results from a sample
of the population of interest. Researcher may look to measure the incidence of
various views and opinions in a chosen sample or aggregate results.
To make things more clearer, let's
go back to the example about determining which among the two brand of cars is
better. Let's say, we tested both car's driving performance on the same road
condition. First, it is essential to define the car models. The car models that
should be used must be of the same year and as much as possible their release
dates is close to each other. In this process, the scope and coverage of the
research is being specified.
In qualitative approach, if the
two cars is tested by one driver, and the driver states that Brand A is better
over Brand B which is based from the driver's perception on his/her convenience
in driving, acceleration, steering, brakes, etc, and the findings and
conclusions derived are based from these, thus, the research conducted is
called qualitative approach. The problem with qualitative research is that
mostly, it relies on one's perception, hence in the example, the driver's perception
can vary from driver to driver, hence making the reliability of the research
output questionable. Typically, the data gathering tools used in qualitative
approach, includes questionnaire and interview. Now, to make the research
output more reliable, we should include quantitative approach.
In quantitative approach, we can use
a more structured questionnaire that has the same criterion but should be
quantified into numbers, having 1 as poor performance, and 5 as best
performance for each of criterion given which includes the convenience in
driving, acceleration, steering, breaks, etc. Also, we may ought to consider
more drivers as test subjects. For instance, 10 drivers undergone the testing,
and 8 out of 10 states that Brand A is better than Brand B. This gives more
reliability on the research results. If you notice, in quantitative, it covers
counting things and involves statistical treatment, hence, this may lead to a
more accurate and reliable result. Moreover, a good research may cover both
approach to make things more reliable.
Table 1.1 presents the difference
of qualitative and quantitative.
CONTINUE READING? Purchase the book @AMAZON
Friday, July 8, 2016
C++ Programming Language: Simple, Short, and Straightforward Way of Learning C++ Programming
C++ Programming Language: Simple, Short, and Straightforward Way of Learning C++ Programming
Copyright 2016 - KDP Edition
Sherwyn Allibang
Edition License
Notes
This book is authorized
for your own personal use. This book may not be re-sold or offered away to
other individuals. Much thanks to you for regarding the diligent work of the
author.
Introduction
This book is for absolute beginners
with or without prior knowledge in programming, as this book uses Simple words, Short sentences, and Straightforward
paragraphs. The triple S way of
learning C++ programming. C++ (pronounced as cee plus plus) is a
general-purpose programming language. The main object of C++ is to add
object-orientation to its predecessor C language. C++ has imperative,
object-oriented and generic programming features, while also providing
facilities for low-level memory manipulation. There are also other useful
features added to C++ such as inheritance and polymorphism. The topics covered
in this book includes brief introduction to C++ programming, variables, data
types, control structures, functions, pointers, and file management of external
files. This book starts its discussion from short history to installation of
the needed software resource and a step by step screen shots of how to write C++
programming code, compile and execute C++ programs. It presents graphical
representation of algorithms for simpler learning. This book is packed with
working and running C++ program samples and after reading this book, the reader
would be able to develop and create C++ language programs based particularly
from problems given in computer science courses, hence, adopting to other
programming language will be a lot easier.
This book is your initial step in your programming career.
This chapter presents a brief
overview of C++ programming. C++ was designed with a basis toward system
programming with high performance, efficiency and flexibility of use as its
design highlights. This chapter presents the things needed in starting C++
programming.
Brief
history of C++
The C++ programming language has a history path in 1979. Bjarne Stroustrup, a Danish computer scientist, is working
with the language called "Simula", which is a language principally
intended for simulations. The Simula 67 language underpins object-oriented
programming paradigm. Stroustup started working with "C" with
classes. C is considered as middle-level language
which has the power of Low-level language but has high-level language features
and C is considered as the predecessor of C++. Bjarne Stroustrup, at Bell Labs
designed C++ in the early 80s, as an object oriented language based on the C
language, which powered pretty much all systems software since its creation in
1972. The first C with Classes compiler was called Cfront, which was derived
from a C compiler called CPre. C++'s goal is to add object-oriented programming
into C language. The ++ operator in the C language is an operator for
incrementing a variable, which gives some insight into how Stroustrup regarded
the language. In 1985, Stroustrup's reference to the language entitled "The
C++ Programming Language" was published.
Reasons
to use C++
To start with, C++ is highly recommended
for beginning programmers in starting their programming career because C++
covers both procedural and object-oriented programming approach. Once someone
learned the concepts behind programming language with C++, adopting or
migrating to other programming language will be a lot easier whether it's
object-oriented or procedural-oriented programming, as most of the things
needed are pretty similar.
C++ has been around a while and it
has solved several industry challenges considering that it is also the primary
language that drives the mobile experience today. In addition to high
performance server and middleware, C++ is a great choice for client side
development on the two most popular mobile platforms Android and iOS and the
two most popular desktop platforms, Windows and Mac OS X. With the recent
introduction of developer tools that enable, among other things, visual design
for clients, middleware, and server side apps; C++ is extremely productive and
really makes it a great choice for modern app development, so learning the
basics of C++ will make someone be competitive in the industry's stiff
competition.
This book will bring the world of C++
programming closer to you.
Beginning
to Program in C++ Language
All the C++ programs are written
into text files with extension ".cpp" for example "hello.cpp",
where ".cpp" is the extension file name. These text files are called
source files. The source files contains the C++ source codes and will later be
transformed into a running executable file. The program development cycle of C++
language are:
1. Write the source codes into a
text editor (ex: notepad) to create the source file.
2. Compile the source file to
create the object file.
3. The object file is link into an
executable (ex: .exe for windows) file.
4. Run the program and see the
result.
Based from the program development
cycle of C++, notice that there are several things needed which includes a text
editor, a compiler, and a linker. The good news is that, for Windows users,
there is a software that comprises the three. It is called Dev-C++ which is
available at http://bloodshed.net and for
the download direct link at http://bloodshed-dev-c.en.softonic.com/download.
Dev-C++ is a C++ source code
editor, a compiler, and a linker. All the things needed in creating a C
program.
Note: You may ought to use other compilers
as the sample codes in this book will work just fine.
Chapter 2 - Our First C++ Program
This chapter presents
the "know how" of writing, compiling, and running C++ language
programs. It presents a detailed discussions on the steps to be undertaken.
Definition
of programming terms
The following terms are defined
conceptually and operationally in order to have a common understanding of the
terms used in this book.
Argument. Arguments are actual value being pass to a function.
Bug. A bug is a general term used to describe any unexpected
problem with the program during execution or when the programming is already
running.
Block. A block is composed of two or more C statements. Also called
compound statements. A block is enclosed with a pair of { } braces.
CamelCase. CamelCase is the naming convention for compound word
which uses capital letters to delimit the word parts. For example, "studName",
"studAge", and "intNum".
Clause. A section in the statement.
Code. It is the term used for statements written that make up a C
program.
Condition. A statement that evaluates to either true (non zero) or
false (zero).
Data Type. It the type of data being stored to a storage location
like variable.
Debug. This refers to the process of examining and removing errors
from a program's source code.
Expression. It is a statement that result to a numeric value.
Function. Function perform a specific task.
Label. Label is used a give details to a certain line of code in C
language, hence this labels are ignored by the compiler, thus it does not
affect the output of the program. Usually used for internal documentation.
Null. In computer programming, null is the term used for an
uninitialized, undefined, empty, or meaningless value.
Parameter. Parameters are argument declaration of a function.
Statement. A statement is a complete direction instructing the
computer to carry out some task. In C, statements are usually written one per
line, although some statements span multiple lines. This term can be
interchangeably use with code.
Syntax. Syntax is the grammar, structure, or order of the elements
in a C language or any other programming language statement. (Semantics is the
meaning of these elements.)
Variable. Variables are storage location for data in C programs.
The
components of a C++ program
Lets discuss the components of a C++ programs through a sample program.
This program prints the word "Hello World!" into the screen. The code
listings is presented below
Code listings of figure 2.1
#include<iostream>
using namespace
std;
int main()
{
//The
line below prints a string
cout<<"Hello
World!";
getchar();
return
0;
}
Line 1. #include<iostream>
This line includes a C++ library
for the use of the program. The inclusion of library in C++ program usually
comes first.
Syntax #include directive:
#include<<lib-name>>
The <lib-name> in the
syntax should be replaced with the library name. The other term for library is
"include file" because literally, a library is a separate disk file
that contains information needed by the program or the compiler.
The #include directive
instructs the C++ compiler to add the contents of library or include file
(sometimes called "Header files") into the program during
compilation. The library files usually comes with the compiler, hence in Dev-C++,
several libraries comes together with its default installation. These library
files should have a ".h" file extension.
In line 1, the library included is
the "iostream"
which stands for input/output stream.
This library is used in dealing with programs that accepts input and provides
output, hence this is the most used library. Other libraries are discussed in
the succeeding chapters of this book.
Note: Other program examples from other
sources includes the ".h" extension for its library, but take note
that the standard now no longer include the .h extension.
Line 2. using namespace std;
C++ uses namespaces to organize different names used in
programs. Every name used in the iostream standard library file is
part of a namespace called std (probably stands for
"standard"). Consequently, the cout object is really called std::cout.
The using
namespace std; statement avoids the need for putting std::
before every reference to cout, so that the cout alone can be used
in the code.
Line 3. int main()
This line defines the main body of
the program. The only component that is required in every C++ program is the main() function.
In its simplest form, the main() function consists
of the name main followed by a pair of empty parentheses ( ) and
a pair of braces { } presented in lines 4 and 9. Within the braces are
statements that make up the main body of the program. Under normal
circumstances, program execution starts at the first statement in the main()
function and terminates at the last statement in main().
Usually functions are invoked or
called by other functions, but main() is special. When the
program starts, main() is called automatically.
main() function,
like all functions, must state what kind of value it will return. The return
value type for main() in the sample program is int which
signifies integer number, but it's not necessary for a program that just prints
the word "Hello World", hence, the value 0 in line 8 is returned just to satisfy the format. Returning
values from functions is discussed in detail in the succeeding chapters of this
book
Lines 4 and 9. { }
The curly braces { } are used to
enclose the program lines that make up every C++ function including the main()
function. A group of one or more statements enclosed within braces is called a
block. Line 4 signifies the start of the content of the main function and line 9
signifies its end.
Line 5. //The line below prints a string
The //
(double slash), are called comments. Anything that follows the // becomes a
comment. Comments are text details usually used by programmers to reference a
line code statement in the source file. The comments are ignored by the
compiler, hence does not affect the output of the program. The program will
execute and run properly with or without comments. In line 5, the comments are
used to give a reference or details that the next line will print a string
on-screen.
Syntax for single-line comment:
//<string-comment>
The <string-comment> in the
syntax should be replaced with a text entries that represents the comment of
the programmer in the code. The comment can be on a single line or multi-line.
Line 5 is an example of single line comment. The multi-line comment uses the /* */ (slash asterisk asterisk slash,
wherein anything enclose inside is considered comment. It can span multiple
lines. The format is presented below.
Syntax for multi-line comment:
/*
<string-comment-string-comment
-string-comment> */
Line 6. cout<<"Hello World!";
The cout is pronounced
“C-out". cout statement is a library object stream under "iostream" library that displays
information on-screen. The cout statement can display a simple
text message or the value of one or more program variables. The cout,
followed by the << (output
redirection operator) in which whatever follows it is written on-screen. If it
is needed to print string of characters, be sure to enclose them in double
quotes ", as shown in line 6.
Syntax of cout in printing
literal text:
cout<<"<string-to-print>";
In the syntax, anything inside the
" " double quotes is considered a literal text and will be printed
on-screen. The <string-to-print> should be replaced with the text
entries to be printed on-screen. The cout statement must end with a ;
semi-colon.
Note: If line 2 using namespace std; is
omitted, the cout statement should be written as
std::cout<<"<string-to-print>";
Line 7. getchar();
The getchar() "get
character", is library function that accepts a character from the
keyboard. If the getchar() is omitted from the code, the program will run,
but upon printing the word "Hello World!", the program will
immediately terminate. This is how the display console of Dev-C++ was designed.
The program output closes immediately and may not be seen by the user. Hence
the getchar()
is used as the trigger that when the output is presented on-screen, the user
will have to press a key in the keyboard (except for space bar) before the
program terminates. The getchar() is simply used as a
terminator and is used for the rest of the sample programs in this book. The getchar()
function must end with a ; semi-colon.
Note: If you are using other compilers that
has a different display console behavior, you may ought to remove the
getchar().
Line 8. Return 0
Technically in C++, the main()
function has to return a value because most of the compiler requires it to be
declared with a return value, and it is a common tradition to declare it as int main()
indicating that it should return a integer value. The return value is usually
passed back to the operating system. Traditionally, 0 indicates that the
program is indeed successful.
Note: You don't have to return 0 explicitly, because that will happen
automatically when the main() function terminates. But keep in mind that the
main() function is the only function where omitting return is allowed. It is
also a common practice for C++ programmers to include the return 0 in the main()
function, hence for the rest of the sample programs in this book includes the
return 0 in its main() function.
Writing,
compiling, and running our first program using Dev-C++ for Windows
In writing the source file, open
the Dev-C++ and create a new source file as presented in figure 2.2.
ENJOYED READING?
Get the entire book at amazon.com
Table of Contents:
Brief history of C++
Reasons to use C++
Beginning to Program in C++
Language
Installing the Dev-C++ for Windows
Installing compiler for Linux
Self-assessment questions
Definition of programming terms
The components of a C++ program
Writing, compiling, and running
our first program using Dev-C++ for Windows
Correcting errors
Writing, compiling, and running
our first program with Linux
Compiling and running the program
on Linux
Statements
Null Statements
White spaces
Self-assessment questions
Variable
Variable Declaration and
definition
Scope of variables
Constants
Keywords
typedef declarations
Self-assessment questions
Displaying text on-screen
Accepting user input
Self-assessment questions
Array
Single-Dimensional
Multi-Dimensional Array
The C-Style Character String
Declaring and defining a string
Defining a string using input
functions
C Strings' pre-defined functions
in C++
Self-assessment questions
Expressions
Operators
Assignment Operator
Mathematical Operators
Binary
Unary
Mathematical operators precedence
level and parentheses
Relational Operators
Logical Operators
Type Casting
Pre-defined Mathematical Functions
Self-assessment questions
The if() statement
Single-alternative
Dual-alternative
Multiple-alternative
Nested if() statement
The switch() statement
Things to consider in conditional
statement:
Self-assessment questions
What is a Loop?
Counter-controlled loop
Nested for() loop statement
Condition-controlled loop
Pre-test loop
Post-test loop
The Infinite Loop
Self-assessment questions
User-defined function
User-defined function prototype
User-defined function definition
Calling a user-defined function
Things to consider in functions
Self-assessment questions
Structures
Declaring a structure
Defining a structure
Accessing Structure Members
Compound declaration and
definition of structure
Self-assessment questions
What is a class?
Creating New Types
Classes and Members
Declaring of a Class in C++
Definition of a Class member
method(s) in C++
Defining an Object of a class
Accessing Class Members
Private versus public access
controls
Constructor and destructor
Self-assessment questions
What is exceptions?
How Exceptions Are Used
The basic steps in using
exceptions
Self-assessment questions
Pointers in C++
Pointer Declaration
How pointers works?
Pointer Arithmetic
Self-assessment questions
C++ Files and Streams
Opening a File
Closing a File
Writing to a File
Reading from a File
Self-assessment questions
GET YOUR COPY NOW!
at amazon.com
Friday, June 24, 2016
C language Programming: Simple, Short, and Straightforward Way of Learning C Programming
C language Programming: Simple, Short, and Straightforward Way of Learning C Programming
Copyright 2016 - KDP Edition
Sherwyn Allibang
Edition License
Notes
This book is authorized
for your own personal use. This book may not be re-sold or offered away to
other individuals. Much thanks to you for regarding the diligent work of the
author.
Introduction
This book is for absolute beginners
with or without prior knowledge in programming, as this book uses Simple words, Short sentences, and Straightforward
paragraphs. The triple S way of
learning C language programming. The topics covered in this book includes brief
introduction to C language, variables, data types, control structures,
functions, pointers, and input and output stream to external files. This book
starts its discussion from short history to installation of the needed software
resource and a step by step screen shots of how to write C language code,
compile and execute C programs. It presents graphical representation of
algorithms for simpler learning. This book is packed with working and running C
program samples and after reading this book, the reader would be able to develop
and create C language programs based particularly from problems given in
computer science courses, hence, adopting to other programming language will be
a lot easier. This book is your first
step in your programming career.
TO GOD BE ALL THE GLORY!
The resources used in
this book are:
> Personal Computer running
Windows 7 Operating System
> Dev-C++ available at http://bloodshed.net
Other Windows OS versions can also
be used as long as it supports the above mentioned software. Also, you may ought
to use other C compilers or IDE.
NOTE: All links provided in this book are updated occasionally. If a link becomes unavailable, email
me at zherwyndbest@facebook.com
This chapter presents a brief
overview of C language. It presents the things needed in starting C language
programming.
Short
history of C Language
C is a general-purpose high level
language that was originally developed by Dennis Ritchie for the Unix operating
system. It was first implemented on the Digital Equipment Corporation PDP-11
computer in 1972. The Unix operating
system and virtually all Unix applications are written in the C language. C has
now become a widely used professional language for various reasons:
1. Easy to learn.
2. Structured language.
3. Produces efficient programs.
4. It can handle low-level
activities.
5. It can be compiled on a variety
of computers.
6. It has a low-level language
capability with the convenience of high-level programming.
C language was invented to write
an operating system called UNIX. C is a successor of B language which was
introduced around 1970. The language was formalized in 1988 by the American
National Standard Institute (ANSI). By 1973 UNIX OS almost totally written in
C. Today C is the most widely used System Programming Language. Most of the
state of the art software have been implemented using C language.
Reasons
to use C Language
To start with, I highly recommend
C language for any beginning programmers to start their programming career
because most of the high-level and other popular programming languages today is
based from C language. Once you've learned the concepts behind programming
language with C, adopting or migrating to other language will be easy as most
of the things needed are pretty similar.
C was initially used for system
development work, in particular the programs that make-up the operating system.
C was adopted as a system development language because it produces code that runs
nearly as fast as code written in assembly language. Some examples of the use
of C might be:
1. Operating Systems
2. Language Compilers
3. Assemblers
4. Text Editors
4. Print Spoolers
5. Network Drivers
6. Modern Programs
7. Data Bases
8. Language Interpreters
9. Utilities
10. C Program File
Beginning
to Program in C Language
All the C programs are written
into text files with extension ".c" for example "hello.c", where
".c" is extension file name. These text files are called source
files. The source files contains the C source codes and will later be
transformed into a running executable file. The program development cycle of C
language are:
1. Write the source codes into a
text editor (ex: notepad) to create the source file.
2. Compile the source file to
create the object file.
3. The object file is link into an
executable (ex: .exe for windows) file.
4. Run the program and see the
result.
Based from the program development
cycle of C, notice that there are several things needed which includes a text
editor, a compiler, and a linker. The good news is that, there is a software
that comprises the three. It is called Dev-C++ which is available at http://bloodshed.net and for the download
direct link at http://bloodshed-dev-c.en.softonic.com/download.
Dev-C++ is a C source code editor,
a compiler, and a linker. All the things needed in creating a C program.
Note: You may ought to use other C compilers.
Installing
the Dev-C++
Download the installer at the link
provided above and install. Figure 1.1 presents the first screen upon running the
installer.
Definition
of programming terms
The following terms are defined
conceptually and operationally in order to have a common understanding of the
terms used in this book.
Argument. Arguments are actual value being pass to a function.
Bug. A bug is a general term used to describe any unexpected
problem with the program during execution or when the programming is already
running.
Block. A block is composed of two or more C statements. Also called
compound statements. A block is enclosed with a pair of { } braces.
CamelCase. CamelCase is the naming convention for compound word
which uses capital letters to delimit the word parts. For example, "studName",
"studAge", and "intNum".
Clause. A section in the statement.
Code. It is the term used for statements written that make up a C
program.
Condition. A statement that evaluates to either true (non zero) or
false (zero).
Data Type. It the type of data being stored to a storage location
like variable.
Debug. This refers to the process of examining and removing errors
from a program's source code.
Expression. It is a statement that result to a numeric value.
Function. Function perform a specific task.
Label. Label is used a give details to a certain line of code in C
language, hence this labels are ignored by the compiler, thus it does not
affect the output of the program. Usually used for internal documentation.
Null. In computer programming, null is the term used for an
uninitialized, undefined, empty, or meaningless value.
Parameter. Parameters are argument declaration of a function.
Statement. A statement is a complete direction instructing the
computer to carry out some task. In C, statements are usually written one per
line, although some statements span multiple lines. This term can be
interchangeably use with code.
Syntax. Syntax is the grammar, structure, or order of the elements
in a C language or any other programming language statement. (Semantics is the
meaning of these elements.)
Variable. Variables are storage location for data in C programs.
The
components of a C program
Lets discuss the components of a C
programs through a sample program. This program prints the word "Hello
World!" into the screen.
Code listings of figure 2.1
#include"stdio.h"
main()
{
/*The line below prints a string*/
printf("Hello
World!");
getch();
}
Line 1. #include"stdio.h"
This line includes a C library for
the use of the program. The inclusion of library in C program usually comes
first.
Syntax #include directive:
#include"<lib-name>"
The <lib-name> in the syntax
should be replaced with the library name. The other term for library is
"include file" because literally, a library is a separate disk file
that contains information needed by the program or the compiler.
The #include
directive instructs the C compiler to add the contents of library or include
file (sometimes called "Header files") into the program during
compilation. The library files usually comes with the compiler, hence in
Dev-C++, several libraries comes together with its default installation. These
library files should have a ".h" file extension.
In line 1, the library included is
the "stdio.h" which stands for standard
input/output. This library is used in dealing with programs that accepts
input and provides output, hence this is the most used library. Other libraries
are discussed in the succeeding chapters of this book.
Line 2. main()
This line defines the main body of
the program. The only component that is required in every C program is the main()
function. In its simplest form, the main() function consists of the
name main
followed by a pair of empty parentheses ( ) and a pair of braces { }
presented in lines 3 and 7. Within the braces are statements that make up the main
body of the program. Under normal circumstances, program execution starts at
the first statement in the main() function and terminates at
the last statement in main().
Lines 3 and 7. { }
The curly braces { } are used to
enclose the program lines that make up every C function including the main()
function. A group of one or more statements enclosed within braces is called a
block. Line 3 signifies the start of the content of the main function and line
7 signifies its end.
Line 4. /*The line below prints a string*/
The /* */ (slash asterisk asterisk slash), are called
comments. Anything enclose within the /* and */ becomes a comment. Comments are
text details usually used by programmers to reference a line code statement in
the source file. The comments are ignored by the compiler, hence does not
affect the output of the program. The program will execute and run properly
with or without comments. In line 4, the comments are used to give a reference
or details that the next line will print a string on-screen.
Syntax for single-line comment:
/* <string-comment> */
The <string-comment> in the
syntax should be replaced with a text entries that represents the comment of
the programmer in the code. The comment can be on a single line or multi-line.
Line 4 is an example of single line comment. Other compilers allows // as single
line comment, which anything that follows // in the same line is considered
comment. DevC++ allows the use of // as a single line comment.
Syntax for multi-line comment:
/*
<string-comment-string-comment
-string-comment> */
Line 5. printf("Hello World!");
The printf() statement is a
library function under "stdio.h" library that displays information
on-screen. The printf() statement can display a simple text message or the
value of one or more program variables.
Syntax of printf() in printing
literal text:
printf("<string-to-print>");
In the syntax, anything inside the
" " double quotes is considered a literal text and will be printed
on-screen. The <string-to-print> should be replaced with the
text entries to be printed on-screen. The printf function must end with a ;
semi-colon.
Line 5. getch();
The getch() "get
character", is library function that accepts a character from the
keyboard. The entered character however is not displayed on-screen. If the getch()
is omitted from the code, the program will run, but upon printing the word
"Hello World!", the program will immediately terminate. The program
output closes immediately and may not be seen by the user. Hence the getch()
is used as the trigger that when the output is presented on-screen, the user
will have to press a key in the keyboard before the program terminates. The getch()
is used as a terminator for the rest of the sample programs in this book. The getch()
function must end with a ; semi-colon.
Note: The getch() and getche() functions are
not a standard C functions as they are part of the conio library, but most C
compilers supports this function including Dev-C++ and Turbo C. If you are
using other compiler (especially for Linux OS) and the program does not run,
you may ought to use getchar() instead of getch().
Writing,
compiling, and running our first program
In writing the source file, open
the Dev-C++ and create a new source file as presented in figure 2.2.
Enjoyed the sample? You may download the complete book at AMAZON.COM
Topics covered are:
Short history of C Language
Reasons to use C Language
Beginning to Program in C Language
Installing the Dev-C++
Self-assessment questions
Definition of programming terms
The components of a C program
Writing, compiling, and running
our first program
Correcting errors
Statements
Null Statements
White spaces
Self-assessment questions
Variable
Variable Declaration and
definition
Scope of variables
Constants
Keywords
Conversion specifiers of data
types
Self-assessment questions
Displaying text on-screen
puts() function
printf() function
Literal text
An escape sequence
Accepting user input
getch() function
getche() and getchar() functions
scanf() function
gets() function
Self-assessment questions
What is an Array?
Single-Dimensional
Multi-Dimensional Array
Strings
Declaring and defining a string
Defining a string using input
functions
Strings' pre-defined functions
Length of a String
Concatenation of Strings
Compare Two Strings
Copy Strings
Reversing the Order of a String
Converting Uppercase Strings to
Lowercase Strings
Converting Lowercase Strings to
Uppercase Strings
Self-assessment questions
Expressions
Operators
Assignment Operator
Mathematical Operators
Binary
Unary
Mathematical operators precedence
level and parentheses
Relational Operators
Logical Operators
Type Casting
Pre-defined Mathematical Functions
acos()
asin()
atan()
atan2()
cos()
cosh()
sin()
sinh()
tan()
tanh()
exp()
log()
log10()
pow()
sqrt()
ceil()
fabs()
floor()
fmod()
Self-assessment questions
The if() statement
Single-alternative
Dual-alternative
Multiple-alternative
Nested if() statement
The switch() statement
Things to consider in conditional
statement
Self-assessment questions
What is a Loop?
Counter-controlled loop
for() loop statement
Nested for() loop statement
Condition-controlled loop
Pre-test loop
Post-test loop
The Infinite Loop
Self-assessment questions
User-defined function
User-defined function prototype
User-defined function definition
Calling a user-defined function
Things to consider in functions:
Self-assessment questions
Structures
Declaring a structure
Defining a structure
Accessing Structure Members
Compound declaration and
definition of structure
Self-assessment questions
Pointers in C language
Pointer Declaration and definition
How pointers works?
Pointer Arithmetic
Self-assessment questions
File management in C
Defining and opening a file
Closing a File
Reading and writing a file
putc() and getc() functions
fprintf() and fscanf() functions
Deleting a File
Renaming a File
Self-assessment questions
Subscribe to:
Posts (Atom)