Example C Program for factorial

Example C Program factorial

What is factorial of a number? Factorial is denoted by the symbol ‘!’. For example, factorial of a number 4 is denoted as 4!. Factorial of a number is defined as the product of “the number and all integers less than that number except zero and negative integers”. Natural numbers ( non-negative integers ) which are greater than zero are used for factorial concept. Factorial Example: Zero factorial (0!) = 1 one factorial (1!) = 1 Two factorial (2!) = 2*1 = 2 Three factorial (3!) = 3*2*1 = 6 Four factorial…

Read More

C program to find prime number using for loop

C program to find prime number using for loop

What is prime number? A number is considered as prime number when it satisfies the below conditions. It should be whole number It should be greated than 1 It should have only 2 factors. They are, 1 and the number itself. Example for prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23 etc. Why 4, 6, 8, 9, 10, 12, 14, 15, 16 etc are not prime numbers? Because, the number 4 can be factored as 2*2 and 1*4. As per the rule of prime number, there should be…

Read More

Structure of C Program with Examples

Structure of C Program with Examples

In this post, I am going to explain Basic Structure of C Program for learners. Please remember below commands and syntax to write C program. Commands Description #include <stdio.h> This is a header file. that includes input and output related function int main() This is the main function from where execution of any C program starts. { This indicates the beginning of the main function. /*_some_comments_*/ whatever written inside the command “/*   */” section. won’t be considered for compilation and execution. printf(“Hello World! “); printf command prints the output onto…

Read More

Introduction To C Programming

Introduction To C Programming

Introduction To C Programming C is a middle level programming language developed at AT & T’s Bell Laboratories of USA in 1972 by Dennis Ritchie.  Any programming Language can be divided in to two categories. Problem oriented (High level language) Machine oriented (Low level language) But C is considered as a Middle level Language. C is modular, portable, reusable.Compiler: Before we start C programming, we need to have a compiler to compile and run our programs. There are certain online compilers like https://ide.geeksforgeeks.org/, http://ideone.com/ or http://codepad.org/ that can be used to start C without installing a compiler. Windows: There are…

Read More

Overview of Programming Languages

Programming Languages are very important thing for software industries. This is the basic one, without programming language you can’t do any thing about development. In this article I will explains the importance of programming languages. What is Programming Language? Normally, if we need to communicate someone we used to speak some human understandable Language like English, Tamil, Hindi etc… Similarly, Programming Language is one kind of language for computers. It is intermediate between human and computers. Programming is one type of Language. There are many types of programming Languages we…

Read More