Installing and Getting Started With Dev C++ IDE
Installing and Getting Started With Dev C++ IDE
net/dev-cpp/devcpp-
4.9.9.2_setup.exe.
- Class Browser
- Code Completion
- Function Listing
- Project Manager
- Makefile creation
- Tool Manager
- Print support
Files created
The files of the project are saved when the source code file is saved. The remaining files of the project
are saved when the application is compiled and stored in the project folder.
To run a program, the source code must be compiled and linked. Dev-C++ performs the complete
process by clicking the Compile button (or Ctrl + F9).
As a result of the link process, an executable program is created. To run this program, we have to click
the Run button (Ctrl + F10). Alternatively, we can find the executable program (.exe) in the project folder
and double-click on it.
int main()
{
std::cout << "Hello World!";
}
The function named main is a special function in all C++ programs; it is the function called when
the program is run. The execution of all C++ programs begins with the main function, regardless
of where the function is actually located within the code.
This statement has three parts: First, std::cout, which identifies the standard character output
device (usually, this is the computer screen). Second, the insertion operator (<<), which
indicates that what follows is inserted into std::cout. Finally, a sentence within quotes ("Hello
world!"), is the content inserted into the standard output.
Notice that the statement ends with a semicolon (;). This character marks the end of the
statement, just as the period ends a sentence in English. All C++ statements must end with a
semicolon character. One of the most common syntax errors in C++ is forgetting to end a
statement with a semicolon.
To run a program, the source code must be compiled and linked. Dev-C++ performs the complete
process by clicking the Compile button (or Ctrl + F9).
As a result of the link process, an executable program is created. To run this program, we have to click
the Run button (Ctrl + F10). Alternatively, we can find the executable program (.exe) in the project folder
and double-click on it.
Exercise Lab 1
Name
Registration Number
Task 1: Write lines of code to print your name. Write the code below with ourput. [2]
#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or
input loop */
return 0;
Task 2: Write the code to print pattern of estericks given below in console.
*
**
***
****
*****
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or
input loop */
cout<<"*"<<endl;
cout<<"**"<<endl;
cout<<"***"<<endl;
cout<<"****"<<endl;
cout<<"*****"<<endl;
return 0;
}
Task 3: Write Set of steps to Degree Completion. Note* you are required to write all the cases
starting from admission process to the end semester.
Conditions:
-Student can take admission if marks in test are equal or more than 50%
-Student can add courses up to 18 credit hours at max
-Student must register all courses of current semester having all the
prerequisites clear
-Student can only withdraw course if his or her marks are less than 50% in mid
term exam as per his/her will. Student can only withdraw at most 2 courses.
-if Student CGPA is <2 then student will drop out.
-Student can only register a course if prerequisite is clear.