Posts

C-INPUT AND OUTPUT FUNCTIONS

Image
  1. C-Output [print text]. printf()  function is used to print the output or display the output. Example: #include <stdio. h >  //Header file int   main()  //Main function  {   printf( "Hello World!" );//Output statement    return   0 ; } Output: Hello World! 2. C-Input [Get text]. scanf()  function is used to get input from the user. Example: #include<stdio.h> int main() {     int a;     char c;     float f;    printf("Enter a integer value ,character, float value:\n");    scanf("%d%c%f",&a,&c,&f);    printf("Integer value:%d\nCharacter:%c\nFloat value:%f",a,c,f);    return 0; } Output:     Enter a integer value, character, float value:  10 s 9.13 Integer value:10 Character:s Float value:9.13 Note:  printf()  and  scanf()  are built-in functions present in  stdio.h  header file. Points to remem...

C programming Structure

Image
C PROGRAMMING INTRODUCTION TO THE C PROGRAMMING:                                  C programming  is a general-purpose, procedural, imperative computer programming language.   It was initially developed by Dennis Ritchie   at the Bell Telephone Laboratories  as a system programming language to write operating system.   DENNIS RITCHIE Before we study the basic building blocks of the C programming language, let us look at a bare minimum C program structure so that we can take it as a reference. A C program basically consists of the following parts − Preprocessor Commands Functions Variables Statements & Expressions Comments   Consider the above as structure of C - Programming, #include is a preprocessor command which includes all the methods of the header file  stdio.h ,   .h is the extension for header file .  a,b are global variables whose scope is ...