Lab Manual 1 (Code Blocks)
Lab Manual 1 (Code Blocks)
What is IDE?
IDE stands for integrated development environment. It is a software application that provides
comprehensive facilities to computer programmers for software development. An IDE normally
consists of a source code editor, build automation tools and a debugger
There are number of IDEs available for compilation of C/C++ code, here we use Code Block.
It is easily available on net. Following are some links from you may download it:
While you are in UMT you may copy it from the following network link.
Visit IPC Lab. Logon to your student account and type \\punjab command in “Run” in Windows
and browse to the specific folder (path given below).
Software
Programming & Development
C & C++
Code Block
Sample Lab Tasks
Sample Lab Task 1
11-After Installation click on OK and Finish then a dialogue box will appear on new
Window click ok again
12-Now program is Installed Click on New Project and Select console application on right corner
and press Go
13-Now Click on C language and press Next
14-Fill the blank spaces by adding a project name and proper path and click next
15- on next window just click finish
16- On next page on left corner click on source and then this window will appear
17-Now look at the tool bar above you will see a gear and play sign together under wxSmith
option click on it or simply press F9.
If this window appears it means your application is successfully installed.
Explanation:
The parentheses after main indicate that main is a program building block called a
function. C programs contain one or more functions, one of which must be main. As we
discussed above that every program in C begins executing at the function main.
return 0 is included at the end of every main function. The keyword return is one of
several means. We will use it to exit a function. When the return statement is used at the
end of main as shown here, the value 0 indicates that the program has terminated
successfully. We will discuss the reasons for including this statement later. For now,
simply include this statement in each program, or the compiler might produce a warning
on some systems.
The "curly braces" { and } signal the beginning and end of functions and other code
blocks. These are also called delimiters.
Write five C++ statements to print the asterisk pattern as shown below using printf?
Sample Output:
*****
Task 2:
Write a c program to print her/his name, id, address, phone number to display the text on the
screen like that?
Sample Output:
Task 3:
Modify the task 2 and print your Program, Batch and Course name.
Sample Output: