C programming language – Statement and Header File
C programming has some important things which are statement and header file also library function etc. Header files are stdio.h, conio.h etc. Statements are comment statement, input statement, output statement etc. Library functions are getch(), clrscr(), printf(), scanf() etc.
A Comment statement has no relation with programming language. Sometimes our programming code is so big then we use comment statement. As a result next time we can remember easily why we can use those line. Comement statement is block two style-
- #include<stdio.h> //this is a header file
- #include<conio.h> /*used for clrscr() and getch()*/
- int main(void)
- int x=0;
- clrscr ();
- printf(“enter the number of x=”);
- scanf(“%d”, &x); //take a x input in the output screen.
- printf(“\n%d is x number”, x);
- getch ();
- return (0);
enter the number of x= 8
**Note: Blod sentences are comment statement. These sentences are not working in that program. Here we use line number because help for describing this programming code.
printf() uses for output-statement funatement. printf() is a libratry function. Show the output for many library function.
Scanf() is a input library function. scanf() function uses except input variable from keyboard. Such as scanf(“ %F_S “, &variableName);
Here F_S is formate specefier and variableName is any right variable name. & is called address operator. But string variable is not need address operator.
Programming language have many header file. But now we will learn two type header file. Such as- stdio.h and conio.h. If we used any library function then must be need to add header file before main() function as a prototype. Here the above-mention program stdio.h and conio.h are header file. #include directive statement uses for header file in the C program.
Previous Post: C Programming Language – scanf library function
Incoming search terms:
- chittagong clinic list