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

C++ Compiler: EECE 1313 - LAB 1 26 SEPTEMBER 2016 Name: Matric No.

This document provides instructions for a computer science lab assignment. It explains that computers understand binary while humans understand natural languages, so programming languages like C++ were created as an intermediate language. It describes how a C++ compiler works, preprocessing the source code, compiling it into object files, and linking with libraries to create an executable file. It lists 4 exercises for students: 1) print "HELLO WORLD", 2) display a table with a single cout statement, 3) accept and sum two numbers, and 4) accept a character and display its ASCII value. Students are instructed to submit their work at the end of the lab session.

Uploaded by

zarif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

C++ Compiler: EECE 1313 - LAB 1 26 SEPTEMBER 2016 Name: Matric No.

This document provides instructions for a computer science lab assignment. It explains that computers understand binary while humans understand natural languages, so programming languages like C++ were created as an intermediate language. It describes how a C++ compiler works, preprocessing the source code, compiling it into object files, and linking with libraries to create an executable file. It lists 4 exercises for students: 1) print "HELLO WORLD", 2) display a table with a single cout statement, 3) accept and sum two numbers, and 4) accept a character and display its ASCII value. Students are instructed to submit their work at the end of the lab session.

Uploaded by

zarif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

EECE 1313 LAB 1

26 SEPTEMBER 2016

NAME:

MATRIC NO.:

A computer cannot understand our language that we use in our day to day
conversations, and likewise, we cannot understand the binary language that
the computer uses to do its tasks. It is therefore necessary for us to write
instructions in some specially defined language like C++ which is like natural
language and after converting with the help of compiler the computer can
understand it.

C++ Compiler
A C++ compiler is itself a computer program whichs only job is to convert
the C++ program from our form to a form the computer can read and
execute. The original C++ program is called the source code, and the
resulting compiled code produced by the compiler is usually called
an object file.
Before compilation the p reprocessor performs preliminary operations on
C++ source files. Preprocessed form of the source code is sent to compiler.
After compilation stage, object files are combined with predefined libraries by
a linker, sometimes called a binder, to produce the final complete file that
can be executed by the computer. A library is a collection of pre-compiled
object code that provides operations that are done repeatedly by many
computer programs.
EXERCISE

1. Write a program to print HELLO WORLD on screen.

2. Write a program to display the following output using a single cout statement.
Subject Marks
Mathematics 90
Computer 77
Chemistry 69

3. Write a program which accept two numbers and print their sum.
4. Write a program which accepts a character and display its ASCII value.

*PLEASE SUBMIT YOUR WORK AT THE END OF THE LAB SESSION

You might also like