Posts

Showing posts with the label C Programing

How To Write A Simple Program in C

Image
I  am going to share that   How To Write A Simple Program in  C Program. In which you can easily understand that how   Write A Simple Program in  C.

How to Create Basic Structure of a C Program (HINDI)

Image
I  am going to share a Basic Structure of a C Program. In which you can easily understand that how  create a basic program in C.. Every full C program begins inside a function called "main". A function is simply a collection of commands that do "something".  The main function is always called when the program first executes. From main, we can call other functions, whether they be written by us or by others or use built-in language features. To access the standard functions that comes with your compiler, you need to include a header with the #include directive. What this does is effectively take everything in the header and paste it into your program. Let's look at a working program: Example:- #include <stdio.h> int main() {     printf( "I am alive!  Beware.\n" );     getchar();     return 0; }

How to make a factorial Program in C++?

Image
This program calculates the the factorial of an integer number entered by the user. The function uses for loop to calculate the factorial and returns the number. Program terminates if a non integer number is entered. This C language program uses for loop in just a single statement to calculates the factorial of integer number. #include<conio.h> #include<iostream.h> void main(void) { int a=1,n,fn=1;                            //Variable Decileration clrscr();                                    // // For Clear Screen cout<<"Enter Your Number = ";     //For Geting any OutPut cin>>n;                                    //For Geting any Input for(a=1; a<=n; a++)   ...