Posted  by 

Sample Coding For Dev C

C projects for beginners. Use these project as sample code for making board game program like Tic-Tac-Toe, Snake and ladder, Hangman. Data handling projects using object oriented design Bank, Library and Student database projects for project idea. Jan 02, 2015  C/C software developer offering more than four years of full life cycle experience including planning and assessment, requirements definition, features and functionality design and development, coding, testing, QA, implementation, product. C language is a direct descendant of C programming language with additional features such as type checking, object oriented programming, exception handling etc. You can call it a “better C”. It was developed by Bjarne Stroustrup.

  1. Dev Mountain Coding
  2. Sample Program For Dev C++
  3. Sample Program Using Dev C++
  4. Sample Coding For Dev College
  • C Programming Tutorial
  • C Programming useful Resources
  • Selected Reading

An if statement can be followed by an optional else statement, which executes when the Boolean expression is false.

Syntax

The syntax of an if..else statement in C programming language is −

Please bear in mind that the use of the software might be restricted in terms of time or functionality. The software is licensed as trial. Fabfilter pro q free download

If the Boolean expression evaluates to true, then the if block will be executed, otherwise, the else block will be executed.

C programming language assumes any non-zero and non-null values as true, and if it is either zero or null, then it is assumed as false value.

Flow Diagram

Example

When the above code is compiled and executed, it produces the following result −

If..else if..else Statement

An if statement can be followed by an optional else if..else statement, which is very useful to test various conditions using single if..else if statement.

Can 3utools remove icloud lock. When using if..else if.else statements, there are few points to keep in mind −

Dev Mountain Coding

  • An if can have zero or one else's and it must come after any else if's.

  • An if can have zero to many else if's and they must come before the else.

  • Once an else if succeeds, none of the remaining else if's or else's will be tested.

Syntax

The syntax of an if..else if..else statement in C programming language is −

Example

When the above code is compiled and executed, it produces the following result −

Dev
c_decision_making.htm

Most common quiestion is:

Is there any C++ GUI API?

My answer is MANY.

There are many API's for making GUI applications.
Here are some.

1. WinAPI: (C based)(MFC is C++ based)
Its a great API and the best solution if you are windows programmer. First code will look a bit difficult, but later (after making few apps.) you will see its not so rusty. I like it, because you can do almost everything with it (in windows). The only bad thing is, that you cannot make applications for Linux with it.
Tutorial:
'>http://www.winprog.org/tutorial/index.html
2. Qt4 / Qt3 (C++ based)
This is a nice API, for making GUI applications. It works under Linux, Windows and Mac OS X. Its really easy to learn and use. But, until you dont buy licenced version, you will need to add tons of -dll s, to run your application. Qt compiler doesnt work in Vista. And, Qt4 API has a bit complicated way, to get buttons to work, if button holds some more complicated operations(actually you have to make your own SLOT's).
Tutorial:
http://sector.ynet.sk/qt4-tutorial/
http://doc.trolltech.com/4.2/examples.html
3.GTK+ (C based)
Sorry, but I never tryed it, so Google might help you.
Tutorial:
http://www.gtk.org/tutorial/


Some examples:

WinAPI
Simple message box:

Simple window:


QT4
Simple Message Box:

Note: Use MsgBox for making message boxes


Simple Window:


GTK+

Simple window:

I hope this post will help anyone!


  • 3 Contributors
  • forum 3 Replies
  • 85,088 Views
  • 9 Years Discussion Span
  • commentLatest Postby sreenivasulaLatest Post

jan10241887

I also think newbies dont know for C++ IDE's. (Developing Enviroviment).

I will make a short description of some

1. Visual Studio 2005 (Visual C++)
This is a beautiful IDE for making console and win32 GUI applications. You can also compile DirectX10 or 9 projects as well. I didn't test it for compiling Qt or GTK+ applications yet.
Affcourse as a Microsoft product isn't free, but it seems to be really safe and stable IDE for Windows Applications.
I really like it, and I recommend it to everyone.

More info '>HERE

2. Code::Blocks
Great for compiling WinAPI, Qt, GTK+, WXWidgets, Ogre, D, C++ console, C console and other projects. I found some bugs, and sometimes there are problems to compile.
It's one of the best FREE IDE's.

Sample Program For Dev C++

Information and download '>HERE

3. Dev-C++
This IDE, written in Delphi is the right place for beginners. It isn't perfect and it allows you 'holes' and 'bugs' in your program.Thats why its good for beginners. VS2005 wouldnt compile most of the code, which Dev-C++ does.

Information and Download '>HERE

SOME LINUX IDE's:
-Code::Blocks
-Anjuta IDE
-QDevelop

Ah, and dont take care about all off my opinions. I prefer VS2005, but If you dont have a money, than choose Code::Blocks or Dev-C++.

Sample Program Using Dev C++


I hope moderators will make this topic sticky (read me)

I hope this helps

Sample Coding For Dev College

Sample

BTW: Sorry for my grammatic mistakes.