Professional Documents
Culture Documents
1/5
DAC 11102 : Edition 1
COMPUTER PROGRAMMING Revision No. 1
Title : Lab 2a - Effective Date SEPT. 2016
An Introduction to C Revision Date SEPT. 2020
CENTRE FOR
DIPLOMA STUDIES
PRINCIPLES OF PROGRAMMING
TITLE AN INTRODUCTION TO C
PROGRAM DAA
LAB NO. 2a
Centre for Diploma Studies Page No. 2/5
DAC 11102 : Edition 1
COMPUTER PROGRAMMING Revision No. 1
Title : Lab 2a - Effective Date SEPT. 2016
An Introduction to C Revision Date SEPT. 2020
1.0 OBJECTIVES
2.0 Introduction
C is one of the most widely used programming languages of all time, and C compilers
are available for the majority of available computer architectures and operating
systems. Many later languages have borrowed directly or indirectly from C including
D, Go, Rust, Java, JavaScript, Limbo, LPC, C#, Objective-C, Perl, PHP, Python, and
Verilog
There are a few of free, open-source, cross-platform C/C++ software available online
such as Dev C++, Bloodshed C++, Microsoft Visual C++ and Code::Blocks.
By using any search engine online like Google or yahoo, search one of the software
above and download it and install it in your own computer.
The figures that will be used in this lab sheet will be from the Dev C++ 5.4.2 software.
Centre for Diploma Studies Page No. 3/5
DAC 11102 : Edition 1
COMPUTER PROGRAMMING Revision No. 1
Title : Lab 2a - Effective Date SEPT. 2016
An Introduction to C Revision Date SEPT. 2020
Dev C++ Software
1. Double click on your Dev C++ Icon and you will be prompted with the
below screen.
2. Choose File – New – Source File and you will be prompted with a screen where
you can type you C or C++ source code.
3. Type the below code.
Centre for Diploma Studies Page No. 4/5
DAC 11102 : Edition 1
COMPUTER PROGRAMMING Revision No. 1
Title : Lab 2a - Effective Date SEPT. 2016
An Introduction to C Revision Date SEPT. 2020
4. To execute or run your code you will need to go to Execute – Compile & Run or
press the keyboard button F11.
5. You will be asked to save your code like the figure below. Save your code in a
directory that you will remember. Example C:\DAE10202\ and click the Save
button
6. If there is no error in your code. You will get an output as per below screen.
3.0 QUESTION
include <studio.h>
main
{
@} \
@@}}------------
@} /
This is a Rose