OnlineGDB is online IDE with C compiler. Quick and easy way to compiler c program online. It supports g compiler for c. In order to implement DFS on a huge graph in Dev c on a Windows 7 machine, I needed to increase the default stack size of 1 MB to 16 MB. I accomplished the same by creating a bat file in the folder as that of project with the text as.
The sizeof is a keyword, but it is a compile-time operator that determines the size, in bytes, of a variable or data type. The sizeof operator can be used to get the size of classes, structures, unions and any other user defined data type. Dev-C is a free full-featured integrated development environment (IDE) distributed under the GNU General Public License for programming in C and C. It is written in Delphi. It is bundled with, and uses, the MinGW or TDM-GCC 64bit port of the GCC as its compiler. Dev-C 4 Dev-C is a full-featured integrated development environment (IDE), which is able to create Windows or console-based C/C programs using the Mingw compiler system (version MSVCRT 2.95.2-1 included with this package), or the Cygwin compiler.
- C++ Basics
- C++ Object Oriented
- C++ Advanced
- C++ Useful Resources
- Selected Reading
While writing program in any language, you need to use various variables to store various information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.
You may like to store information of various data types like character, wide character, integer, floating point, double floating point, boolean etc. Based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory.
Primitive Built-in Types
C++ offers the programmer a rich assortment of built-in as well as user defined data types. Following table lists down seven basic C++ data types −
Type | Keyword |
---|---|
Boolean | bool |
Character | char |
Integer | int |
Floating point | float |
Double floating point | double |
Valueless | void |
Wide character | wchar_t |
Several of the basic types can be modified using one or more of these type modifiers −
- signed
- unsigned
- short
- long
The following table shows the variable type, how much memory it takes to store the value in memory, and what is maximum and minimum value which can be stored in such type of variables.
Type | Typical Bit Width | Typical Range |
---|---|---|
char | 1byte | -127 to 127 or 0 to 255 |
unsigned char | 1byte | 0 to 255 |
signed char | 1byte | -127 to 127 |
int | 4bytes | -2147483648 to 2147483647 |
unsigned int | 4bytes | 0 to 4294967295 |
signed int | 4bytes | -2147483648 to 2147483647 |
short int | 2bytes | -32768 to 32767 |
unsigned short int | 2bytes | 0 to 65,535 |
signed short int | 2bytes | -32768 to 32767 |
long int | 8bytes | -2,147,483,648 to 2,147,483,647 |
signed long int | 8bytes | same as long int |
unsigned long int | 8bytes | 0 to 4,294,967,295 |
long long int | 8bytes | -(2^63) to (2^63)-1 |
unsigned long long int | 8bytes | 0 to 18,446,744,073,709,551,615 |
float | 4bytes | |
double | 8bytes | |
long double | 12bytes | |
wchar_t | 2 or 4 bytes | 1 wide character |
The size of variables might be different from those shown in the above table, depending on the compiler and the computer you are using.
Following is the example, which will produce correct size of various data types on your computer.
This example uses endl, which inserts a new-line character after every line and << operator is being used to pass multiple values out to the screen. We are also using sizeof() operator to get size of various data types.
When the above code is compiled and executed, it produces the following result which can vary from machine to machine −
typedef Declarations
You can create a new name for an existing type using typedef. Following is the simple syntax to define a new type using typedef −
For example, the following tells the compiler that feet is another name for int −
Now, the following declaration is perfectly legal and creates an integer variable called distance −
Enumerated Types
An enumerated type declares an optional type name and a set of zero or more identifiers that can be used as values of the type. Each enumerator is a constant whose type is the enumeration.
Creating an enumeration requires the use of the keyword enum. The general form of an enumeration type is −
Here, the enum-name is the enumeration's type name. The list of names is comma separated.
For example, the following code defines an enumeration of colors called colors and the variable c of type color. Finally, c is assigned the value 'blue'.
Dev C++ File Size
By default, the value of the first name is 0, the second name has the value 1, and the third has the value 2, and so on. But you can give a name, a specific value by adding an initializer. For example, in the following enumeration, green will have the value 5.
Here, blue will have a value of 6 because each name will be one greater than the one that precedes it.
Its is a featured-packed IDE i-e Integrated development environment which is designed by Bloodshed Software to create and debug apps that are based know on one of the most popular programming language known as C++. Although, there are many other upgraded C++ development tools that have been introduced in the virtual market over the years numerous users around the globe still prefer to use Dev-C++ for development purposes. This is because the IDE platform Dev-C++ has always proven itself to be a highly intuitive and reliable developing tool that provides developers with extensive access to all the features that are required to perform in-depth debugging and powerful development. Most of all, it promises a stable and error-free developing environment for developers so they can develop apps as small as the size of short school projects and as big as a massive business project. It is targeted for public and internal use both.
One for all
Dev-C++ is designed to cater to newbies and pros alike. Either a user is a novice and wants to use the environment to make a small size school project, or a professional level developer and programmer who want a stable and smart environment which is small enough to use the least resources of his or her computer, Dev-C++ is a perfect developing tool for both types of users because it possesses all the tools that are required to develop small and big size apps.
Customizable interface
Once the program is installed in a host computer, users will notice a very user-friendly highly customizable interface. Users can customize it in any way to fit their requirements and projects. The main app window resembles the structure of every other high quality modern Integrated development environment. The top is laced with a row of various dropdown menus along with the tabs that give access to the many built-in features on just a click. A large area with three vertically arranged tabs is there to manage classes, projects and Debug listings. Users can start to program there apps on the main project area on an interface that are adorned with supporting tabs. The overall interface is simple and classic because the options are displayed in a very straightforward way for the ease of new and old users.
Dev C 5.11
Multi-lingual
The IDE is for developers from all around the globe because it provides the users with the option of 25 languages to chose from. Users can pick one of the 25 languages as per their preference.
Source files integration
Dev-C++ is an IDE that empowers its users to develop a project with as many source files integrated into it as they require.
Writing options
This program gives many options to its users in terms of writing styles. The keywords and C elements can be highlighted while the user is writing on the project. The writing is done in a classic color scheme where the comments appear in green color while the compiler error appears in red.
External tools
Dev-C++ users can also make use of Devpak extensions and can also add external tools for the IDE. The available external tools will help the users to enhance the feel, look, and responsiveness of their IDE. Moreover, with these tools, users can also customize the IDE as per their liking.
Highly customizable configurations
Users can extensively customize the app along with the current project in this IDE. App Options window has Browsto customize Fonts, Genera, Code Insertion, Colours Autosave, and Class Browsing. The Environment Options have tabs for the configuration of external programs, directories, CVS support, and File Associations.
All in all, DEV-C++ is designed to be compatible with all Windows operating systems and includes all the standard and useful features such as advanced code completion, syntax highlighting, and insight, debugging, profiling, style formatting, and editable shortcuts. It’s the best choice of an IDE for small to a good size project development.
Dev-C++ Gallery
×