Tagged: turbo c program

understanding c programming 45

Understanding the program in C

Let us learn the above program in detail. Line 1 thru 4: This is the comments in the program. It is called multiline comment. The text written within /*…*/ are ignored by the compiler. Line 5: This is another way to comment a text or statement. It is called single line comment. The entire line following the tag // is ignored by the compiler. Line 6 and 7: #include is known as pre- processor directives. It tell the compiler to include text from another file, stuffing it right into your source code. is a file name enclosed within angle...

C Programming Examples 20

C Programming Examples

In this section you will find some useful C Programs. These programs have been written and tested in Turbo C. In case of any queries, do post a comment. Program to add two numbers using function (Pass by value method) Program to add two numbers using function (Pass by Reference) Progarm to calculate Factorial of a given number Program to generate Fibonacci series Arithmetic calculator using switch statement Addition of Array elements Search first occurrence of element in an array Sort array in ascending order Sort array in descending order Reverse a given Number Calculate Length of a String (without...