1. Introduction to C Language in Tamil || Tamil Pro Techniques ||
Summary
TLDRThis video tutorial introduces the C programming language, highlighting its origins by Dennis Ritchie in 1972 and its classification as a low-level language. It covers the importance of header files for function utilization, such as 'stdio.h' for input/output operations and 'conio.h' for console-specific functions like 'getch' and 'clrscr'. The tutorial demonstrates creating a basic C program in Turbo C, emphasizing the structure of the 'main' function, the necessity of semicolons, and the use of 'getch' to prevent the output screen from disappearing. It also illustrates the consequences of omitting header files, showing errors that arise when 'printf', 'clrscr', and 'getch' functions are not supported due to missing 'stdio.h' and 'conio.h'.
Takeaways
- 📘 The C language is a programming language used for communication with the system.
- 👤 C language was founded by Dennis Ritchie in 1972.
- 🔧 C is considered a low-level programming language.
- 🖥️ C language is platform-dependent and works on specific platforms.
- 📚 It was standardized by ANSI in 1989.
- 📝 Header files in C are essential as they contain functions used in the program.
- 📑 The '#include' directive is used to add header files to a C program.
- 🔑 'stdio.h' is the standard input-output header file, and 'conio.h' is for console input-output.
- 🔠 The 'main' function is the entry point of every C program, enclosed in braces.
- 💬 The 'printf' function is used for printing output in C programs.
- ⏏️ The 'getch' function is used to pause the output until a key is pressed by the user.
- 🔄 The 'clrscr' function clears the screen to display only the current output.
- ⚠️ If the header file 'stdio.h' is not included, the 'printf' function will not work.
- 🛑 Errors will occur if 'conio.h' is not included, as it contains 'clrscr' and 'getch' functions.
Q & A
What is the purpose of a programming language?
-A programming language is used to communicate with a system, allowing humans to give instructions that the system can understand and execute.
What is C language?
-C language is a low-level programming language that was founded by Dennis Ritchie in 1972, used for a variety of programming tasks and known for its efficiency and portability.
Why is the C language considered a low-level language?
-C language is considered low-level because it provides facilities for direct memory access and manipulation, allowing for system-level programming and close interaction with the hardware.
What does ANSI stand for and why is it significant in the context of C language?
-ANSI stands for the American National Standards Institute. It is significant because in 1989, ANSI standardized the C language, ensuring consistency and compatibility across different platforms.
What are header files in C programming and why are they important?
-Header files in C programming contain declarations of functions and variables that can be used in a program. They are important because they allow the program to access pre-defined functions and constants without having to redefine them.
What does the '#include' directive do in C programming?
-The '#include' directive in C programming is used to include the contents of a header file into the current program, making the functions and constants declared in that header file available for use.
What is the main function in C and why is it necessary?
-The main function is the entry point of a C program. It is necessary because every C program must have a main function where the execution of the program begins.
Why do we need to terminate each line of code in a C program with a semicolon?
-Each line of code in a C program must be terminated with a semicolon to indicate the end of a statement. This is a syntactical requirement for the compiler to correctly parse the code.
What is the purpose of the 'getch' function in C programming?
-The 'getch' function is used to wait for a single character input from the user. It is often used to prevent the console window from closing immediately after the program execution, allowing the user to see the output before the window closes.
What happens if you remove the 'stdio.h' header file from a C program that uses the 'printf' function?
-If you remove the 'stdio.h' header file from a C program that uses the 'printf' function, the program will not compile successfully because the prototype for 'printf' is not included, resulting in a compilation error.
Why is the 'clrscr' function used in C programming?
-The 'clrscr' function is used to clear the contents of the screen in a console application, allowing the program to display only the current output without the previous content remaining on the screen.
What errors would occur if the 'conio.h' header file is removed from a program that uses 'clrscr' and 'getch' functions?
-Removing the 'conio.h' header file would result in compilation errors for the 'clrscr' and 'getch' functions because their prototypes and implementations are stored in the 'conio.h' header file.
Outlines
📝 Introduction to C Language and Programming Basics
The first paragraph introduces the C programming language, explaining it as a low-level language created by Dennis Ritchie in 1972 and standardized by ANSI in 1989. It discusses the importance of programming languages for communication with systems and mentions other languages like C++ and Java. The speaker guides viewers on how to start a basic C program using Turbo C, emphasizing the necessity of including header files such as 'stdio.h' for standard input/output functions and 'conio.h' for console input/output functions. The paragraph also covers the structure of a C program, including the main function, code blocks, and the use of the 'printf' function for output. It highlights the use of 'getch' to prevent the output screen from disappearing quickly and 'clrscr' to clear the screen, illustrating these concepts with a practical example.
🔍 Understanding the Role of Header Files in C Programming
The second paragraph delves deeper into the significance of header files in C programming. It demonstrates what happens when 'stdio.h' is removed, causing the 'printf' function to fail during execution, and underscores the need for including the appropriate header files for functions to work correctly. The paragraph also shows the consequences of removing 'conio.h', which leads to errors since 'clrscr' and 'getch' functions are part of this header file. The speaker encourages continuous watching of the video for further understanding and invites viewers to ask questions in the comments, ensuring they grasp the concept of header files and their role in a C program.
Mindmap
Keywords
💡Turbo C
💡Programming Language
💡C Language
💡Header Files
💡Void Main
💡Printf Function
💡Getch Function
💡Clrscr Function
💡ANSI Standard
💡Curly Braces
Highlights
Introduction to C language and its purpose for communication with the system through programming.
Overview of various programming languages including C, C++, and Java.
Historical context of C language, founded by Dennis Ritchie in 1972.
C language is a low-level language with platform dependencies.
Standardization of C language by ANSI in 1989.
Demonstration of writing a basic C program using Turbo C.
Explanation of header files and their importance in C programming.
Adding header files using #include directive for accessing functions.
Introduction to stdio.h and conio.h header files and their contents.
Understanding the main function and its role in a C program.
Use of printf function for printing output in C programs.
Requirement of semicolon to terminate each line of code in C.
Using getch function to pause the output and wait for user input.
Demonstration of output behavior with and without getch function.
Purpose of clrscr function to clear the screen in C programs.
Error handling when header files are not included in the program.
Importance of including stdio.h for using printf function.
Consequences of removing conio.h and its impact on clrscr and getch functions.
Encouragement for viewers to watch the video continuously and ask doubts in the comments.
Transcripts
hello friends
in last video we learn about how to download and install turbo c
in this video we are going to learn about what is C language
basically language is used for communication purpose
in that way ,to communicate with the system we use language called programming language
there are lot of programming language
example c, c++ java etc.
ok now we learn what is C Language
it was founded by Dennis ritchie in 1972
it is a low level language
and also it depend some platform to work
it works on some specific platform
and in 1989 it was standardized by ANSI
ok we do some basic program in c
run your turbo c
start turbo c
give file ->New
first we have to add our header files
Because header files have some contents or functions.
if the header files are not given, the contents or the function will not work
There are so many header file,and each contains different function
which functions you are going to use in the program add a respective header files
now i am adding two header files
By the use of #include we add a header file , it to our program
stands for Standard input output .header
there are some contents are stored in this header file
stands for Console input output.header
it also having some contents, we will see in this program
each program have its main function
so i am giving void main
the braces denotes the fuction
program coding are entered in the the curly braces
it is called as code blocks
we write some basic codings
i am using printf function for printing purpose
what you have to print in the output that message will be in double codes
the message i am going to print is
This is My first video
Ok we given the meassage
In C program each line is teriminate with
semicolon
each and every line in the code block have to end with semicolon
then only it run successfully
now i run the program
there is no error for me
but the output screen does not display[ it disappears in a fraction of seconds]
so for this
we use getch fuction
this function, wait for getting a single character from the user
now i am run the program
there is two output
the first is doesn't appear
the second is appears because of using getch
so the console(output) wait for a single key from the user
if we give some key it exits the output
i hope you may understand, that why we are giving getch function
if i want to clear the last output and print the current output
we have use clrscr -> clear Screen funtion
now it show only the current output
now i am give some character
it exits
let see what happen, if i remove the header file stdio.h
i removed this header file
if i run the program
the printf function will not work during the execution
because the function stored in stdio.h header file
now i am run the program
it shows an error
printf function should have a prototype
if we want to use printf function in our program
we must include the respective header file
now i am removing conio.h
let see what happens
if i run ,my clrscr and getch function will not work
so i am run the program
it show 2 error
because the clrscr and getch functions were stored in the conio.h header file
so i am giving that
i hope ,you understand
that why are we giving header files
purpose of giving void main,clrscr,getch
continuously watch the video
drop your doubt in the comment
thank you
浏览更多相关视频
printf and scanf functions in C
C_01 Introduction to C Language | C Programming Tutorials
NASM Assembly programming Tutorial 01
Lecture 21 Preprocessor Command #include in C Language Hindi
جلسه اول - دوره آموزش زبان برنامه نویسی C | سطح مقدماتی - متوسط
C_64 Strings in C- part 3 | printf and puts function in C
5.0 / 5 (0 votes)