Tuesday, July 13, 2010

What is Polymorphism in c++ programming language

What is Polymorphism in c++ programming language. Polymorphism in OOPs.

Polymorphism is a simple concept that you understand now, as so often in life. You are a person, that person is a base rate and are a more accurate representation of that type. There are many people who inherit this kind, which you are a concrete application of this type: it has its own beliefs, attributes and qualities that go beyond just one person in general. For example, we all have a blood type, shoe size, arm length, and many other properties. But each of us add our own implementation of the MMI.

You drive a car, which has properties such as wheel size, engine size, the size of the gas tank, and other properties. The car that leads to a concrete application of the interface of the car. It has additional features such as sliding doors, logo type, number of slot CD changer, moon roof lever location, or other distinct properties that are specific to the make and model of car. In addition, the car can have certain behaviors such as opening / closing the door, trunk open, turn the wheel, and other behaviors that would be specific to a car.

In OO programming, using the example of the car, the car would be the base class, and each automaker would have its own implementation. For example, Honda has technology V-Tec, which is in its own implementation. Used Volvo diesel engines, TDI technology is. More importantly, you can add an additional level of detail between the car and the make / model of implementation, such as cars, trucks, SUV's or supertypes to provide the most relevant information.

Monday, September 28, 2009

What is a control structure? The basic for control structure in C / C++ programming languages.

What is a control structure? The basic for control structure in C / C++ programming languages.

A statement used to control the flow of execution in a program or function is called control structure. The control structures in c / c++ programming language are used to combine individual instruction into a single logical unit. The logical unit has one entry point and one exit point.

The instructions in a program can be organized in three kinds of control structure to control execution flow in c / c++ programming language. All simple or complex programs can use these control structures to implement the program logic.

These control structures are three kinds.

  • Sequence Structure
  • Selection Structure
  • Repetition Structure
learn unix c programming, c programming, programming languages

Friday, September 25, 2009

C Program execution steps in C / C++ programming language.

What necessary steps are taken to prepare a C C++ program for execution ? Execution steps of C / C++ programming language.

C program are prepared to solve different type of problems. Many steps are required to convert a problem into a solution. These steps are in C programming language

  • Creating and Editing
  • Saving
  • Compiling
  • Linking
  • Loading
  • Running

Creating and Editing a C Program in C Programming Language compiler: Writing or creating and editing source program is a first step in c language. Source code is written in c programming language according to the type of problem or requirement, in any text editor.

Saving C Program in C C++ Programming Language: Source code is saved on the secondary storage. Source code is saved as text file. The extension of file must be ".c". Example the file name is "learn c programming language.c"

Compiling C program in C Programming Language: Computer does not understand c programming language. It understands only 0 and 1 means machine language. So c programming language code is converted into machine language. The process of converting source code in to machine code is called compiling. Compiler is a program that compiles source code. Compiler also detects errors in source program. If compiling is successful source program is converted into object program. Object program is saved on disk. The extension of file is ".obj"

Linking in C programming Language: There are many built in functions available in c programming language. These functions are also called library functions. These functions are stored in different header files.

Loading program: The process of transferring a program from secondary storage to main memory for execution is called loading a program. A program called loader does loading.

Executing program: Execution is the last step. In this step program starts execution. Its instructions start working and output of the program display on the screen.

learn unix c, Learn C C++ Programming languages, C C++ Programming

Source of article: http://learnunixc-programming.blogspot.com/2009/09/c-program-execution-steps-in-c-c.html

Thursday, September 24, 2009

What is C C++ programming language Statements? Example of C language statements.

What is C C++ programming language Statements? and well definition of programming language C C++ Statements.

A statement in C programming language is an instruction for the computer to perform a task. The statements of C programming language are written in curly brackets like "{" "}". Computer performs these instructions one by one in the same sequence in which these instruction are written. Each statement in C programming language is terminated with semicolon ";"

Example of C Programming language statements:

The following example contains two statements in the body of the main() function.


void main ()

printf("Welcom to learnunixc-programming.blogspot.com");

printf("Welcom to Learn C / C++ Unix C Programming Language");


learn unix c programming language now. Start from today and learn c c++ and unix c programming languages. unix c

Difference between structured programming language and unstructured programming language. c struct

Question is that, what is difference between structured programming language and unstructured programming language?

Un-Structured Programming Languages: In unstructured programming languages or non structured programming languages, the entire logic of the program is implemented in a single module or function. The programs written in these languages are error prone, difficult to understand, modify and debug. Unstructured programming languages or non structured programming languages is difficult with the compare of structured programming languages.

Structured Programming Languages: In Structured programming languages, the entire logic of the program is divided into number of smaller modules of function. Each module is a piece of code that implements a different functionality. The main module calls other modules when they are needed to execute. It is a modular method of writing programs. It is an easy and simple technique to writhe program. The programs written in these languages are easy to understand, modify, and debug. There is also a less possibility of errors in the programs. Structured programming languages easy to manage.

learn unix c programming language, learn c c++, learn unix c

Monday, August 31, 2009

What is the basic structure of a C program, Hello program in c language.

Basic structure of C program, Hello program in C : The format of writing C program is called its structure. The basic structure of a C program is very flexible. It increases the power of the language.
It consists of following parts:

  • Preprocessor directive
  • Main() function
  • Program body (C Statements)
Hello Program (Example)

Preprocessor directive ------> #include
Main function ------> void main()

Program body ------> {
(C statements) printf("Hello World."); <--- Statement terminator

In the above c program,

First line is preorocessor directive to include a header file stdio.h. The preprocessor directives are the commands that give instructions to c preprocessor. Preprocessor is a program that modifies c source program before compilation. Ther preprocessor directives start with hash symbol #.
The second line is main function. The main() function is the place where execution of a C program starts. When the program is executed, The control enters main () function and start executing its statements.
The statements of the program are written in curly braces. The curly brace { is called opening brace and } is called closing brace. The breacs are also known as delimitoers . These statements are collectively known as the body of a pogram.
Every statement in c program is terminated whte a semi colon ( ; ). The compiler generates an error if any statment is not terminated by semi colon.

learn unix c c++

What is Input and Output statements in c and c++.

Input Statements in C programming language: The process of giving something to the computer is known as Input. The input is mostly given by keyboard. The term standard input refers to the input using keyboard. A program may need certain inputs from the user for working properly. C language provides many functions to get input from the users.

some important functions are for inputs are as follows:

  • scanf()
  • gets()
  • getch()
  • getche()
Output Statements in C programming language: The process of getting something from the computer is known as output. The output is mostly displayed on monitor. The term standard output refers to the output displayed on the monitor. The result of a program is the output of the program. C language provides many functions to display output to the user. Some impurtant functions for output are as follows:


The functions used for input and output are stored in the header file stdio.h. If a program uses for input or output function, it is necessary to include this header file in the program.

Learn unix c c++ start now..