Beruflich Dokumente
Kultur Dokumente
Basic C concepts
What is a preprocessor?
What is a directive?
What is a header?
It is the entity that preprocesses certain required file before the program starts
e.g. #include is a preprocessing directive. Because it activates the header files in <> brackets which are
needed for program to run. #include<stdio.h> preprocesses the header file stdio.h which loads standard
input output library in the program.
Date: 09/19/2013
Prepared by Rohit Dashrathi
What is printf?
What is scanf?
Syntax: scanf("%d",&variable);
%d : scans if the input value entered is integer or not
&variable: points the input value entered to a variable
A function may or may not return a value. A return statement returns a value to the calling function and
assigns to the variable.
return void: Used in case when program does not want an output value.
return 0: it signifies that the program execution was successful. returns an error code in case of an error.