Skip to main content

Posts

printf() and scanf() in C

  printf() and scanf() in C The printf() and scanf() functions are used for input and output in C language. Both functions are inbuilt library functions, defined in stdio.h (header file). printf() function The  printf() function  is used for output. It prints the given statement to the console. The syntax of printf() function is given below: 1.                                printf( "format string" ,argument_list);   The  format string  can be %d (integer), %c (character), %s (string), %f (float) etc.

Basic C Language Notes

  First C Program Before starting the abcd of C language, you need to learn how to write, compile and run the first c program. To write the first c program, open the C console and write the following code: 1.       #include <stdio.h>      2.      int  main() {    { 3.      printf( "Hello C Language" );     4.      return  0;    5.      }   #include <stdio.h>  includes the  standard input output  library functions. The printf() function is defined in stdio.h . int main()  The  main() function is the entry point of every program  in c language. Compilation process in c What is a compilation? The compilation is a process of converting the source code into object code. It is done with the help of the compiler. The compiler che...

Features of C Language

  Features of C Language C is the widely used language. It provides many  features  that are given below. Simple Machine Independent or Portable Mid-level programming language structured programming language Rich Library Memory Management Fast Speed Pointers Recursion Extensible 1) Simple C is a simple language in the sense that it provides a  structured approach  (to break the problem into parts),  the rich set of library functions ,  data types , etc. 2) Machine Independent or Portable Unlike assembly language, c programs  can be executed on different machines  with some machine specific changes. Therefore, C is a machine independent language. 3) Mid-level programming language Although, C is  intended to do low-level programming . It is used to develop system applications such as kernel, driver, etc. It  also supports the features of a high-level language . That is why it is known as mid-level languag...

History of C Language

  History of C Language History of C language  is interesting to know. Here we are going to discuss a brief history of the c language. C programming language  was developed in 1972 by Dennis Ritchie at bell laboratories of AT&T (American Telephone & Telegraph), located in the U.S.A. Dennis Ritchie  is known as the  founder of the c language . It was developed to overcome the problems of previous languages such as B, BCPL, etc. Initially, C language was developed to be used in  UNIX operating system . It inherits many features of previous languages such as B and BCPL. Let's see the programming languages that were developed before C language. Language Year Developed By Algol 1960 International Group BCPL 1967 Martin Richard B 1970 Ken Thompson Traditional C 1972 Dennis Ritchie ...