Posts

Showing posts with the label c program

First C Program

Image
Your First C Program Here, is a Hello World program in C #include<stdio.h> //Pre-processor directive void main() //main function declaration { printf("Hello World"); //to output the string on a display getch (); //terminating function } Here is the code explanation: Pre-processor directive #include is a pre-processor directive in 'C.' #include <stdio.h> , stdio is the library where the function printf is defined . printf is used for generating output. Before using this function, we have to first include the required file, also known as a header file (.h). You can also create your own functions, group them in header files and declare them at the top of the program to use them. To include a file in a program, use pre-processor directive #include <file-name>.h File-name is the name of a file in which the functions are stored. Pre-processor directives are always placed at the beginning of the program. The main function The

C Programming Source Code : Index-1

Index-1     Index-2     1.     C program to calculate any kindof equation |  View  | ------------------------------------------------------------------- 2.     C program to count vowel,consonant, arithmetic operator, special character, word and sentence from amultiple line string  |  View  | ---------------------------------------------------------------------------------------------------------------------- 3.     C program to count vowel,consonant, arithmetic operator, special character, word and sentence |  View  |  ---------------------------------------------------------------------------------------------------------------------- 4.     C program to read a string from a file and write it to the another file  |  View  | ------------------------------------------------------------------------------------------------------------ 5.     C program to read a string from a file  |  View  | ----------------------------------------------------------------------------