C programming language for beginners | Techwood Academy | Skillshare

C programming language for beginners

Techwood Academy

C programming language for beginners

Techwood Academy

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
26 Lessons (2h 21m)
    • 1. Overview of this C programming course

    • 2. Section 1-History of C Language

    • 3. Section 2-How to Install Code-Block ?

    • 4. Section 3-First-Program -Hello World

    • 5. Section 3-Datatypes and variables

    • 6. Section 4-i)Operators(Arithmetic)

    • 7. Section 4-ii)Assignment Operator

    • 8. Section 4-iii)Logical operators

    • 9. Section 4-iv)Unary operators

    • 10. Section 5- If and If else statement

    • 11. Section 6-Loops theory part

    • 12. Section 6-i)While loop

    • 13. Section 6-ii)Do while loop

    • 14. Section 6-ii)How to Use For loop?

    • 15. Section 7-What is a Function ?

    • 16. Section 7- How to write a Function ?

    • 17. Section 8-How to use Strings ?

    • 18. Section 8-Program using Strcpy

    • 19. Section 8-Strlen,Strcat,Strmp

    • 20. Section 9- What is an Array ??

    • 21. Section 9- Declare Initialize and Access using Array's

    • 22. Section 9-Arrays and Functions

    • 23. Section 10-Pointers Theory and Program

    • 24. Project 1)Delete a file and automate

    • 25. Project 2)ATM Project Overview

    • 26. Project 2)ATM Project Using a C Program

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

C language is considered as the mother language of all the modern programming languages because most of the compilers, JVMs(Java Virtual Machines), Kernels, etc. are written in C language, and most of the programming languages follow C syntax, for example, C++, Java, C#,PHP, Javascript, Python.. etc.

It provides the core concepts like the array, strings, functions, file handling, etc. that are also being used in many languages like C++, Java, C#,PHP, Javascript, Python.. etc.

In Today's world as of 2019, Java, javascript and Python are the most demanding programming languages in IT industry, If you are good enough in C programming Language, it will be easy to learn  Java, javascript and Python, in addition it will be easy to enter into software industry by knowing  Java, javascript and Python.

What you’ll learn:

  • Understand the basics of the C Programming Language from scratch.
  • Learn C core programming concepts like Datatypes, Variables,Statements,Loops, Functions,Strings,Arrays and Pointers
  • By the end of this course, you should be able to understand the concepts and write a C program on your own.
  • Learn one of the most popular and widely used languages in the Software Industry.

Who this course is for:

  • Students
  • New Developers who are yet to start their career in the software company
  • Experienced Software Developers who want to refresh their basics in C
  • College Students who are preparing for exams can also refer this course

Meet Your Teacher

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Your creative journey starts here.

  • Unlimited access to every class
  • Supportive online creative community
  • Learn offline with Skillshare’s app

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.



1. Overview of this C programming course: 2. Section 1-History of C Language : decision. We will see the introduction off. C language sees a programming language developed at 80 and de Bolivar face off your sin itis Alberto. It was designed on written by a man named Dennis Ritchie Guy it was the report. Or come the problems off three off previous languages. Just be B and B. CPL Okay, so this two languages it was used different off for 1965 to 1970. So later he was developed. Uh, no, I not overcome the problems we face in this world. Programming language on the C language is country as a mother. Language off the modern programming language because most of the compilers jbm job Erbitux Admissions Colonel Sex A torrid NC language on most of the programming languages for lows. See syntax, for example, C plus plus Java sea sp sp javascript fighter. Okay, so into this all this JavaScript java and fight on our most commonly used programming language and more. I mean, they most wanted a programming languages, interests, interests. Well, actually, that was the 19 actually. Okay, so But this all, as I mentioned, may live video station. So this languages follows the simplest and seats and it provides the core concepts like the area strings functions file on Exeter that also being using May languages like C plus plus Java RCs PHP, javascript. Except okay. Uh, that's not for no. In this video tutorial introduction off season in the next session, we'll see hoping Start the court block and we'll discuss about idea in moments. Okay, thanks for No, I'll get you guys in the 3. Section 2-How to Install Code-Block ?: Hi guys. Welcome back to another section off C programming for beginners in this section. We're going to learn about I D I. D. Or our interview development vomited Softer application that provides comprehensive facilities, toe software developers for software development task and I d normally consist off court editor compiler linker or build automation tools on the debunker on this can be using Windows Mac and here you next operating systems. Below are a few ideas. The first he's one of the world, does I D. And the 2nd 1 is the court block on 3rd 1 is that it? Beans for twenties slips Okay, things are the most commonly used I d in orderto develop right Aideed and compile your program on go in for this tutorial. I'm going to use code block for me like it is one of the no easiest to tool which I know Peter after using all the four other to sexually. So it's up to your own choice like you can I could use this'll one or even used beans groups has been okay superior one choice. But for this totally, I'm going to use cold rockets on off the pretty cool tool? Uh, no. In order to write And Della Pierrot developing companion code. Now we will see how to install the court block. Okay, this is a fight. Fox grocer. OK, you can use Google. Chrome also are years. So currently I'm using Firefox. Okay, so just try Goto and then they called block. Okay. And website advice Here. Go toe down. Corruption. Okay, so in this Goto boundaries. Okay, so now there are three options available here. So suppose if you're using a windows operating system, then you have a stewardess option. If you're using a lie next box, then you're chooses. Option If you're using. Ah, Apple Mac, then you can choose this option or turn down the Donald R Llorente X if ice. Okay, so my operative system is window. So I'm just selecting this fun. And here you can find 36 options or Year six options here, and this is as off raised eight. Like I mean, like on downloading is in the month of August 2019. Probably like when you don't lord it Later. After confirming they maybe you auction off court may be available. They're two different sorts available. I will select four star. Okay, so now you're Don't start shocked for some time, okay? It's asking to serve the fine just fine. Don't get Donor has been struck and I didn't be download in just few minutes. So let's wait for that. Now the exit friend got Don't know that, you know, we were good solution. So I'm just looking. They exit. Fight is asking for the formation. I'm just looking. Yes. Now this windows. So just click next, then agree then just like this and just witnessed. And then this is that this is the default folder. We're doing it installed. Ah, I guess if you want to change the part, you can click, browse and you can change the part for part for insulation. But I'm keeping, but I'm keeping as the case may change This star Ah, actually are already instructed. School drop. That's right. I'm getting this message. Okay, so I am just looking s So now the search is happening. Take a few minutes toe completely insulation. So pause the video for now and on and start once over completed. So now the installation got completed. So it's asking you wonder and court block now I'm just kicking it. So Santa was completed successfully and then picky. Next again and talk. Just good finish. So now we had 100 in solution. Of course, Block is getting often restricting something. Third thing is how we need to install court locker in the windows and government. So in the next section, we will see how to write basic C program. Okay. Thanks for watching. I'll get you guys again. 4. Section 3-First-Program -Hello World: Hi, guys. Welcome back in the previous session, we have seen holdings of the court. Brock. Okay, so now we will see how to write our very first, our basic programming language. Okay, so make sure you open your coat broken, go to find go to New and the great one were amplified looking. And you can write your own program here and then save it on. You hear what I'm doing? Great. Or more photo called my C programs here. I'm just saving my very first program. Hello, world. Okay, so no, the program has also Ah, very basic fusty program. Okay, I will go line by line How it works here. This is the common section. So what? The way you have return here, the C compiler will not read this particular common section. Okay, so basically, it starts with this last start on it. I just closed with slash start. Okay. This how we can use the comments section? OK, so this is just for our internal reference. A here are just written a zone. Amos Ah, distort. See or hear it is Hello, world. Hello. Really conveyed the name off the program it seemed Then they convey the name of the outer here. You can maintain the Washington like, for example, like this is a version 1.0 later. If you want it in this program, then if you want to add some other statements and these are a few want at some additional courts in this particular program, then after that you can see it has ah ah wondered one version just toe or practice changes and ah, hear the description or you contrite object of this program. So this is a good practices, right? There's like because normally in a software company like there'll be hundreds programs will be available will be different. Programmers were working along with you, so each program it can go from under total hundreds of ultra rights. Also, if another pick programmer picks your program to read or to any ticket If you write, is this particular description of the optical here? He'll get a background of the program before you read all the lines off. Good. Okay, so this is actually an option one. It's up to you. The one choice if you want to use it or ignore it. Okay, But this is just an option but is a good practice writing. Okay, so we have seen the calm injection now. So for this, uh, this is the hash include STD a your daughter Hitch. No matter if i ve well, hash are we can tell us bone sign here. What we're doing is we're trying to include this particular header fight. Okay? The reason why you were including his header file eyes like, we're going to use some of the in bill function which are defending this. Okay, so missing this hashing truth is called the people so directly. Ah, people. The doctor begins with the hash. Our phone symbol impossible. And his crew and his crosses before the compilation. Okay, so the director you ah, hash interested. Er, you know, it has just the people's answer to include the Estonia. You don't had referred to support input output operations. Okay, so this is how we need to include the hydra fight. Okay, so we have seen this unanswered. So now. So here. What we're doing is in Space Main then. Ah, parent assistant White. Okay. It is nothing but data type. OK, so maine is the actual main function. It's normally like the program execution will always starts from this main function. Okay, if they're 100 function in the program. Okay. So all the functions will be called from this main function. So normal. Actually, the compelling will read this main function first. And all this stuff actually called later. So the main function is the entry point of the program execution. So and here is a printer function. What it does is like it just spring. Whatever you mentioned here, inside the double coats, it just Prince Prince Center console. Just like printing some essays, you know, in the city council. Okay, so this function is used just to print something in the sickens old. Okay, So 10 0 10 0 are the 10 0 means. It determines the main function returns the value of zero or to the opulence is trump. Typically return value of 00 means it's a normal termination. One misses an abnormal termination. Okay, So it can have reporting were just including ahead referral because we're going to use I mean, Bill functional charity, finding his header file. Okay, on second thing is like, it is the main function basic main function. The program execution always starts from here. You're using a printer function. Just apprentice hello. World in the sea console. And the return zero is just ignores the normal termination One Mrs Up number domination. Okay, so we'll just try to competent Executive Eastern and see what happens. I think in just whatever you mentioned here just printed here, so that's hard. Okay, So this is how to write a very basic C program? No. In C language. Thanks for washing this video. I'll get you guys in the next session. 5. Section 3-Datatypes and variables: Hi guys. Are will come back in this section. We will learn about the Dell grapes and very presidency language. No types. Narratives are used to declare a variable. It specifies the data storage format off a very but for example, in space number followed by semi colon. Here, number is a variable off in digital it. Okay, so number is a very bad off in digital. Ok, Similarly gas bees need for the bay Semi colon. Here, name is a variable off character. Okay, so this is how we need to declare the variables in C language and, uh, Derek types. I see there are three different types. First is the primary right? This then seconded by the 3rd 1 is user different trips. Okay. Ah, here. The most commonly used their tapes are primary directives, which contains in teacher character float on the double. Okay, So we will discuss further with the help of a program. Variable is a debtor name that is used to store it better value variable may take a different value at different stages during the execution of the program. For example, in space height here, height is a variable off in digital time. okay. Height is a very bluffing digital type. Similarly gasp. A student. Okay, here student is a very bluff carpenter type. Okay, so which means down the line, the program Ah, you'll be using this height. Very blurred to school. Some indigent values here, you're going toe. Use a student variable in order to capture some of the character values. You know, don't delay in the program. Okay, So this is how we need to declare in the sea program. So suppose like, if you don't declare it and directly go are used very bulls in the C programming meter in compilation era. So this is a form matter. It is a sin tax, you know, in orderto declared very bus. So we'll discuss further with the help of will come back. Ah, in the realization we learned about variable center type city radically. So here. Ah, we will discuss for the with the help of a program. Okay, So, uh, has this particular comment section on the wonderful we have already discussed in the daily lessons. Okay, so we're directly jump into the main program. As I mentioned in my a little session. The bait the program will always starts from my main function. Okay, so here it is. He this one experience is nothing but a very little bit indicated type under initialize the value Carlton on the employees. Ah, character variable Kariba. Lonnie Hosey. And it has been in charge of the valley cost even. Make sure it should be in the double. Courts followed with a semi colons. Syntax on there were using a full vote. Variable on in stride with this value and double variable in slides with this value, please note. Um, I suppose if you want to Ah, I am used a dismal values off until seven. Starting from here. Okay, One does triple by 67 OK, you can use fraught okay until seven decimal values there is if you want to use and to 16 decimal points and then you can use double. So 12 or three for fight. Make sure you should start empire from point ok 0.123456789 10 11 12 13 14 15 16. Okay, so it can print until 16. A decimal points year for double ovaries floated Can print until seven decimal digits. Okay, so now we're just printing it. Ah, okay. On the sequence also here experienced is indicative value. I'm going to print it. So since I'm going toe print there Ah, in digital type, I'm used just using the spare former space bears. D make sure that like you for the indigent. Greater Then you had to use a former special s d d for Denmark. Okay, Andi fair. Your printing character value. Then you should be. Yes, yes, for ah, Singapore. Then if you're using your float variable if you want to print a fruit. Very body hard to use. Okay, so here I mentioned a 16 because I want to print until 16 decimal digits. So And if you want toe print a double value, then we had to use l l f o k l for London and for France. Okay, this is a four month specify here. Okay, so here I'm using 18. Because I want to print until eight in decimal points. Okay, so now by right, when you execute it. 123 4567 Okay. I just want to hear it should recurrent correctly until this value. Okay, so here. 123456789 10 11 Told that imported for free. 16 Sure ship print on in this world. Right? Wait. Just put it, uh, in sight. This also I just, uh So when you printed, we should get this. This really should be printed. After that, the value may change. Okay, so return well returned. Zero means it's a normal domination, which we discussed the real essence. So now we will compel this program, See what happens. Okay, this is all part of the program. Okay? Now, what we have done is that we just put whatever we have declared initialized here. We just printing with the former specific all day. So 10 is perfectly printed, so, as expected again, we're printing. The employees are variable value. Ah, uh, which is Stephen? So that is also printer successfully here, so no problem. So, for float, as I mentioned earlier, it can print until seven decimal digits. Okay, so which means it should print from three starting from things Ship print until 516 So 3.516 Okay. After this, you CIA is the valley changed to 0 60? If you see after six, it's 1616 But the really good change now. Well, as I mentioned, your late can print until 16 decimal points. So here, uh, here. It should print until double one double toe. If you see here, it's printing three point from here if you count it. 12345678 19 11 12 13 14 15 16. Okay, so double do it. Printer and this extent printer under 16 days. Minimalistic sprint after the sea Devil is getting changed. Really is getting changed. Okay, so this is how ah, we can use in tho character float and double. Uh, Okay, men, see language on This is how you need toe. No, friend. This particular data types, you know, in the seconds also, make sure the for you mature. You use a current or former space. We're printing DNA. Variable off specifically a type. Okay, Thanks for watching this readout video. I got you guys in the next session. Bye. For now. 6. Section 4-i)Operators(Arithmetic): Hi, guys. Are will come back in this section. We will learn about the operate ethnic on the X pressure Sensi language. An operator is a symbol that tells the programme to perform certain mathematical or logical operations are called C uprightness. Okay, for example, plus is an operator to perform. Addition, Si has a wide range off operators to perform various operations. Okay, they are automatic increment and equipment operators, relational protests, assignment operatives. A logical a protest. Okay, so these are the different types off operators. Okay. For example, in and ultimately there are two types. We not ian vanity, plus less means it'll, with help of this operator, began increment away. Really? Off a very big one. But as with minus man as we can determine the value of available by one. So placements we can use this particular operate in order to perform addition. And my Nana subtraction minus means I do it. You have to. Ah, but from the subtraction. Okay. On de. So are Okay. So here, basically adopted here is base using this. Particular operatives were performing some task. Okay, so see support. So this kind of this weight range off protests and not automatically at the values during the program execution. Okay, so first we will discuss about the automotive operators with the help of a program. Okay. An art emitted cooperator performs mathematical operations. That addition subtraction, multiplication division on numeric values. OK, so these are the operators, so we will discuss further Ah, with the help of a program. So how to use these opera turnout executive in the program? So please note this. This is very common one like, which she's in addition, this is my, uh, minus mental subtraction. Onda started for the multiplier slash It is when it's with the division. This is the model a division modeler means like, for example, like if you are trying to divide a value on DA, for example and by two. Okay, so to fight that time. So the balances that reminds one, so it will print one in the sequence. Oh, okay. So we'll discuss for the help of programs and biting off a very will better understand. So Okay, this is our, ah basic program using our practice. OK, so we're going to ah, perform this particular, uh, operations with the help of the operator. So bless additions a fracture Manipulation model division as well. And see what will be the output. Okay, so, uh, this particle items we are discussing the sections will jump up to the program. Ah, here is the main function. As I told earlier. Like the program exhibition Largest. Ask from me. You'll hear. I have a three. Very bus. Different. Very bus. Okay. Ah, one variable a second variables beat the third. Very bizarre Connecticut or part. So there are three in digital tape. Very bus. Okay, here. This is a declaration installation. So here the ai has told, with value of 15 b m stored with the value of two. Andi Ah, I have one more. Very well called automatic output. Okay, so what I'm going to do here is I will try to Ah, Kian. I'll try to exude this program with the help off this operators. Okay, one by one first is addition. Right. So we would like to add simples. Okay, So what I'm doing here is this is the declaration initialization. So here I'm just holding the output off this operation to this particular in digital. Right after that, I'm just printing with the help of printer function. We're just printing this value. The sea cans are so since this is an indicator that I I'm just praying. Printing with the help of her former Specify Your Majesty. Okay, So written zero is, uh, just informing the compiler, mentioning that like it's ah, normal domination. Okay, so what? Ah, let's see. Like what? Ah, when you execute this program, so what happens is like 15. Bless to write sounded. So they're all pushing 70 OK, because you were just doing an additional addition story. We're just doing an addition. Operation. So So we'll try to exude this program and see what will be the output. Okay, so I'm exaggerating this or there's an error. Just started moving this. I'm just putting the rally here. Okay, so I'm just compelling again. Okay, so let's take out potus 17. Okay, So I'm just doing in addition Ah, operational here. So in which 15 plus two is 70. Okay, so it's printing Karki. Okay? Okay. Are committing their completed? No. So now we have done with Mathematica Operator now, So we will look on to the second ravages the subtraction. So we were just I'll just use it here. Cherokee So now what I'm doing is ah, a minus bi, which means your feet minus toe. So which means it writ issued the output should be 30. Okay, We're just using the minus operator. Okay, so we will compile this one and see what'll output se 30. Okay. So early? We're done. Plus, now we're than my necessarily Just the subtraction. So 15 minus two. So 13. So the old police car. Okay, so now we will jump onto the 3rd 1 which is the multiply. So I'm just using the marketplace operator. So again, I'm just a compiling and executing so 15 to 30. So the police card Okay. Who didn't was attacked? Harper described. So we will mourn for their division now. Now we will use the division on operator here. So which means to seven foot in, right? So when exhibited this one, it should. So seven si seven. So this is the division operator. Okay, So sometimes a 40. So someone is Ah, Put. Okay, so we're done with plus minus manipulation and division. Now we'll see the modern division. Okay, so So model. Our division means just Portis beach. Okay. Modeler division. How aid works is for example, ah, How many hours give if you divide for friend by do right seven boozer. So someone's at 14. Okay, Remainder One So that the main tree will be printed in the sea. Cancer. Okay, so please note the remainder after division, whatever that remained. Raise available that will be printed in the sea continent. Remainder 11 will be so that one will be printed. Printed here, actually. OK, so we'll try to It is a good this one and see what happens. See how committed God police What? So this is how you can use Ah, operators are committed. Cooperative opera, decency, language. Thanks for Washington's video. I'll get you guys in the next lesson by phone. 7. Section 4-ii)Assignment Operator: come back in this tutorial of evil. Only about assignment operators in senior English. Okay, I see an assignment operator is used for assigning a value to a variable. Okay, The most commonly assignment operate trees called Okay, on top off it. There are some other operator assignment operators which are available in See Okay. So which can be used in the program in order to our man implant value off available. Okay, so now if you see here, this is the on off the example how we can use the same into operator on it is similar to this one. For example, place equal took and bitterness E plus equal to p. R. This where you can bring a sequel to eat crispy. It's all the same. It's a frightening, a lengthy expression. So we can use this kind of short on, you know, in C language. Okay. Ah, but just remember, one thing place equal to means are do remember this assignment operable. Always have at least presidents than any other operator except cynical. Okay. Just technol offered on. I will explain to you for the We'll see, we'll discuss about this operators with the help of a program in the next section. Okay, He's one of the example. Ah, uh, as I told you lately, the program will always start from the main function. Okay, so here I am taking to very bills. Okay, B and A. And I have initialized the value off. Believe it too. Okay, So, uh, and I'm assigning. I'm using the first to operate relativistic orto where I mentioned as b m assigning to a which missed this value. Ah, this value will be assigned to it. Which means when I try to print it here, the value off a should be too, because, yes, it was not essential. Issue just declared here on about sending a very called to tow the variable called B. And again here I'm used with the help of this assignment operator. I'm just, um, assigning this be value to any very bullets of any printed. It'll it should print us. Okay, so I'm just ready. Get and I'm using the second or Petrovich is the place. Sequim place equal toe here. What happens is like, um yea plus equal to be means as I mentioned here as I mentioned here, you can write in this fashion as well. So I'm just writing this fashion, so make it more clear. So currently the value off is Okay, so here it is store and then bless be, which means this, um we already initialized year. So the value off this are operated Operation is like, issued before. Okay, so when when we printed should before? Because, I mean, I am repeating any called shapeless me, Which means is already toe these two. So a plus a plus B school for Okay, So we're printing here, so she should bring for So now we're coming to the told. Ah, assignment operator, which is e minus equal. Be OK. So this one we're discussing about this one now. So here, if you see, uh, this can bitterness equal to is converted equal to a minus bi. Okay, so if you see here is already four. This is for minus B, which is too. So the output should be OK. So when I printed, it should show his toe. Okay. No, a start equal, Toby. So this cant Britain s equality estar be so is already two here, so to multiply before which is Toto therefore so this four should be printed here Been tryingto contingency cancer. Okay, so now we about the divide up this particular row. Okay, So here what I'm goingto do is hear what I have written here is a slash equal Toby, this can be returned in this in this fashion is also to make it more clear I just it any ordinance like this, which is equal to a slash Okay, so is for no here. This value for r and B is to Okay, this is to actually so now what I'm doing, what I'm doing is like I'm dividing four by does or to force it out. What will we do if you use this divide operator? OK, so the output will be too when you exit the program. Okay. Um, no, we're going to discuss about the model s operator. So this can be on that. We have toe declared this fashion on, but it is already equality. Equal toe a model is be so the value zero so marvelous means like each of you. The reminder offered, for example, Like, for example, if I divide five by two. So to use a food that remain dress the balance is what gives the reminder, actually. OK, so here, if you if you see here, is already too now it can be is to now. So if it's derided by this one, there's nothing right toe toe ones or two. So there is no balance deficit. Three, for example, Like it is. Ah. Three. Then gives a tremendous one. Valances. Okay, so let's see compel and see what happens now. Okay, string An error message. What It is. Okay. Got that against drinking at her. See, here s presently matching whatever I mentioned your ears could do. He could before they called Toto Than acres before they could do. Then he had ankle zero. He's So this is how we have to use this assignment operators Insulin, which so thanks for watching. We'll catch up in the decision. 8. Section 4-iii)Logical operators: Hi guys will come back in this tutorial. We're going toe. Discuss about a logical operators since Okay, on expression containing logical operator irritants. Either zero or one, depending on whether Expressionists is to or force. Okay, A logical operators are commonly used. In addition making Andi, this are the are logical operators which are liberal Insee. This one is called us on. Gunderson called us all on this one called less not Okay, so on uh Militant true if ah leave all our prince our true whereas ah, logical returns. True if immune off the if union off the condition is smack on da not operator or returns true. Leave the operation is zero Okay, so we will discuss in detail with the help of a program is one of the basic sample program for logical operators. Okay, we'll see. One way one hope to use on or not. Operator. OK, so here I have ah, three variables reserved C d and I have centralized to values fight under two for cnd. Okay, so here's what I'm doing is like I'm trying to use the and operator. So here I'm just putting to condition see, equal to D and sees. Get the 20. Okay. Sees fight. Okay, these two So obviously see is not equal toe Be OK on C is greater than the okay, this just rude. But in an operator. If both conditions are true generally it'll written one address. It should return zero. So here one condition is for city. This condition is also a little later. Zero it would conditions are true. Deadly interpreted one. Okay, so now Ah, so the output off This should be zero. So I'm just right. I just put a printed statement here. So in order to capture the result er, no, this condition. So it should written zero We'll see there to do in the compilation. So now I'm ah can see under our operator. So our means Like for example, I have two conditions here if anyone condition is met. Okay, It's okay. For example, if you see here sequel to do Sorry See caldo de, which is force because he's quantify whereas under the east also which is force Ok, but the second condition if you see here see, is greater than the so which means fine is greater than two. So we just thought so in gifts. All operator, if anyone condition is met, then this, uh this will written. Okay, so this output will Okay, so when I printed here Shook So as issued returned the value US one. So now this is the final And scholars are not operating, so it's very simple if this condition he returned zero OK, which was false then this Children true. Okay. Not operative in Britain, for example. You see here sequel to Fight Way justifies a call. Toby. Uh, I mention it's for equal to do just false, actually, because days called to do and see called if I bought an article and this will turn it zero . So you've seen this is zero. And because of this not operator, this will become one. Okay, so when a printed on a printed, it should show us one. Okay, so now let me Ah, building. Compile and see what happens. Okay. See here. So again, I'm explaining. Ah, here. One condition is false, which is sequel to this false. But this condition is too. But for this and operator butch, both conditions should met a dental. It'll deter one, which is it's true. Okay here since one condition is false. It residence it also his return zero here. Okay, so then a 2nd 1 if in equal 2nd 2nd 1 is our operator. If anyone condition is met Genital written true. Okay, so here, since this condition is true so it didn't Okay, so it is not operator it returns toe Believe if the operate is zero. So if you see here see equal to the this condition is force so it in return zero So because of this are operating not operator So this output will be one. But if this is true than this wilderness False Okay for example Ah see what happens? No, no With the condition here is C is greater than the which means fire is greater than two Which missy fight on Dear contrato So fire is ah all right to do you five days good Other than so this condition is to on because off this not operator it was written zero Okay, so you can Every pretty sees five decoder to so far is greater than toe The condition is true because of this not operated a little bit different. False which is zero. So it's competency. What happens there is a build. Enter now they know the old police zero. So since this condition is true, because off this not operated it'll print as zero, Which means force Okay, serum. It's false. Okay, so this is how ah, the logical operators works in C program language. Thanks for watching this video. I'll catch you guys in the next section by far. 9. Section 4-iv)Unary operators: Hi guys are Welcome back, industry Dorial. We're going to learn about increments on deferment operators in C language C programming has to operate us, which are increment trespass and equipment minus minutes to change the value often operate . Okay, It can be a constant or variable by one. Okay, now are inclement plasticine. It increases the value by one. For example, if the value of a very persistent So it gave a healthy increase by one, which is 11. So there is a disagreement. Operator minus Manistee is the value by one. For example, Kristen, it will have to decrease the value by one. The not at all. Pretty night. Okay, this two operatives are called, as you know, the a protest meeting. The only operate on on a single operate. Okay, so we will discuss for the of the help off a program. Okay, this is the sample program also this and will be discussed earlier, so we'll jump into the program. So if you see here as I told you earlier, it is the main function with probes emmick program execution always starts from this particular function on the the stereotype, and there are no, uh no no arguments are getting past it. Okay, so this we're declaring And insulation the values here so is available in pieces variable. And it say it is ah, declared with others calling digital. And it has a value of pregnant or get us. Actually, Andi, I'm using afloat variable because I have any Similarly So I'm using the float Derek type here on what I'm doing here is here. I'm just trying toe increments value off a, which is strained by one. Okay, Is a told earlier like it helps the scenario operator. I mean, their lives in the united provinces incriminate, discriminating for using increments. It really helps increase the value off a variable by one, which means safe yearly. The virgin value is 10. So after in context gotta it should be then place 11 Should be love. It just didn't one should be 11. Okay, so here the value of B is 20. So here I am trying to discriminate here by one. So she should Brent are 19 Smith Smith's 20 minus one should be 90. Just remind you a za told earlier. This is a former special for you if you want. If you want to print an indigent value in digital value. It should. You should do. This deed is a syntax. Okay, so if you want to print afloat, value should use f. So now I'm going to print this evil. You cease 30 point fight minus Sorry. Bless here. I'm just using. Plus operator. So pressing one. Sure that Don't buy that bullshit with any 1.5. Okay, Here Dee Dee's 400. So which means I'm here. I'm trying to decriminalise one, so I'm trying to print it here. So 400 by and fight minus Well, I should be 399.5. OK, so I don't want the compiler toe. Read this. So I'm just come in thinking big. So okay, that's executive program and see what's happening. Told here it has to increase the value by one. Ah, restaurant operators. So it's 11. So it's 11. Matching again. Is deGrom ending the value off? Don't be by one so ever expected out. Police 19. So it's printer 90 which is correct. So now again see very, which is afloat value. We're trying to increment by one, so they push it with anyone. Point Frank. So it's matching. So similarly here also, the values matching very were decreasing. So okay, so that's how we can use ah encourage unity, apparatus, increment, undocumented, etc. And C language Shelvey. So thank you for no 10. Section 5- If and If else statement: my guys are will come back in this section. We're going to loan about the state months and see Okay, uh, statement is an instruction given to the computer. Take a specific action. It must Mito sme. Okay, There are three types off statements which are available. See about which is the 1st 1 is a statement. The 2nd 1 is if statement and the 3rd 1 is necessary. Do you fence Check me. Okay. So really, we'll see one by one. Hope it works in its statement. This is the basic sim packs. Okay, if there be a conditional here, if this condition is to than this block off cool will be executed. Okay on, uh uh for example, if this condition is to Italy returned the values one, if it is for literally the value zero. OK, so that's what I have mentioned here on the statements ever allude the test as a mansion. Nearly the statement ever evaluates the best expression inside the parent assists. Okay, if it's the country that this expression is true, which is one this block off course in Mexico. If it is for us which was zero then this block off course but this block off Gordon on. So we'll see further along with the help of fair. So this is the basic basic program for its treatment. Okay, So what I'm doing here is uh huh. This is ah, variable within digital type. I'm just getting the age off user. Okay, so what I'm going to do is like, this is the ah cannot function, which is defined in the centre frylock. So I'm just getting the value of age. I'm putting a condition here. If age is greater than 80 I'll print this treatment. Okay, so before printing, it are just different. Whatever they use, it entered here. Uh, what are the user centered here? So and I'll print this really hurt and elements that you're eligible to cast their work. Okay, That's so we'll just try to compile this and see in tow your age. So I'm mentioning as 19 c is giving the output okay again and repeating. I have just declared the variable age variable age for the indigenous. Right. So I'm just printing this in the console, okay? Condone. So I'm just taking the value from the user like, and I'm checking it is if condition I'm checking the value O R. Which was inputted by the use and seeing like I'm just got the condition is like, if it is more than 80 then open this block off court else. Ah, there's nothing that happened. Just a 10 0 on the program will be dominated. Okay, so there's a very simple, um, if statement. Okay, so now we will, uh, see, uh, if else statement okay, with, uh, well, just try to build on top of this if statement of what he felt. Hi, guys. In this session, we're going to learn about if else statement okay. And the full statement may have an option as block below the syntax for defense treatment. If best expression as did Mr to be executed. If the respect just expression outcome is true, which means one if it will be very additional here is distance test expression is true. Which means one than this block off court will be executed. Is this block off court will be executed, which means here, if the test expression is one, which means to this block off court will be executed in case if this is false, which means zero then this else block will be executed. Okay, so the only difference between the funny Phelps is in if little bit X expression on their block off quarterly exec on the block will not be doing this if statement whereas an if else statement will be an additional else block will be dead. So in case if this test expression is false, this block off court will be executed. If we destroyed that, this block off court will be executed. Okay, so we'll see further with the help of a program. We'll see one more example. Okay. Hear what I'm doing here is the same. Almost the same program. Okay, so here, here, literally. We're done. Uh, if ages more than 18 we just mentioned you're eligible to cast a vote in case if I enter 90 putting sound put it will. And you guessed it a little. Ah, Brenda, My suggestion. Ah, congratulations. Are eligible to cast a vote in Gezi. If a entered 17 or 16 then this block off bushy big city because its force Okay, so again, I'm coming. Repeating the stereotype. Ah, Interstellar David. Available age. I'm just entering. This will be printed on the sea control and I'm getting the value from the user. And if the ages more than 18 then I will print this one. If this is force, if his age is less than 18 they don't print this one. Okay, so if this is true, it'll return one on. This will be a printer else. This blueprint. Okay, so 10 0 is a normal diminishing. Okay, so let's, uh that's executable. This violates or no, this this, uh, this option is getting exuded. No, no. Enter the age now. I'm putting us 19. Your internet in congregations, you are eligible. Took castle. Okay, so this is true then. This is true. That's why this block off treatments has been executors successfully less than 80. So then let's see like, but that this block off court is getting a good average means. If execute a start. If I mention if I came 17 then this conditional false, which means it'll become and not it will become zero. You fit zero means. Then this broke off court will be executed. Let's see what happens. She sorry You're not eligible to cast away. So it check the condition 17 is eject. Sounds greater than 89 or is false, which means it returned zero. Um, no, don't Zero. That's where this block off code are is not as good as so it obviously, if this condition is false zero, then this block off court will be executed. So since this conditions failed so this block off of us Executive, uh, this is how we have to use our It fell straight emergency like rich. Thanks for Washington's radio. I'll catch you guys in the next video station. 11. Section 6-Loops theory part: Hi, guys. Come back. Industry Dorial. We're going to loan about loops. Okay. Loose are used in programming to execute a block off court repeatedly until a specific condition are validation. Are matter? OK, so you may ask a question via we really need loops in, Say, programming language. Okay. So normally loops are used. No. If you want to do a specific task and not repeatedly, Okay, for example, like if you want to print thing in the seconds old. Okay, Um, for example, against Rich, if you want to print Denise Richards, see, console. Will you redo the prince treatment? And I will give Dennis Ritchie in the in the in the parenthesis. And after that, we refuse is good. Like we can see the important See cancer. Okay, but if I want to do repeatedly, for example, if I want to print five times or if I want to put 100 times you known it, right, 100 points of statements. Okay, We can use looks for that. So we were discussed further the help of a program, so you will better understand. You know, when you're trying to teach with the, um, program. Okay, so let's discuss further. So we have three tips off loops. The 1st 1 is the while. The 2nd 1 is Do I look the 3rd 1 is ah, farther up, okay. 12. Section 6-i)While loop: Ah, this is the basic syntax for my look. Okay. Ah, fight this expression, then statements inside the morning of the Okay, So the violet, they've always the best expression inside the parentis is if this condition is to then the statement inside the body of the loops are executed. Okay, so then again, the test expressions are elevated on. The process goes on until it s expression is ever to to force. Okay. Suppose if this condition is met for five times that fight and the statements will be executed. Okay, so, at last, if this test expression is false, then edl and the slowpoke and the look the looked admits. Okay, This condition. If if this became force, then it'll come out of this looks so we'll see for them with the help of a program. Okay. Okay. Uh, there's a basic program for ah, while. Look. Okay. So as a total in realizations, these are the inter files we are discussing. The realization. Ah, this is the main. This is the main function on the program. It always trust from here. Okay, so here, if you see, I have a declared one indigenous variable and intrinsic value with the one. Okay, so on this is the ah, via Lope. Okay, Right as a total earlier daily protests expression here. So I'm just putting it as I ease less than he called fight. Okay, so I use nothing but one. Okay, so one is less than article toe fight, so the conditions stroke, so the statement will be executed. Okay, so this will be executed. So? So Dennis, rinse. She will be printed once. Okay. This, um after this condition. Okay, so now begin Order I'm doing is I'm incriminating. I want Okay, So which means currently XII's one? So now when a increment here, I will become ok so again. And this again it will come here on it will evaluate under now, too, is Listen, Eric all toe fight. So which is to again this print of shipment will be printer. Okay, again. After that, what happens is this I value will be in agreement toe so three. Okay. So again, three will be elevated here, so three is less than or equal to fight. Okay. So, again, this will be a printer again. After what happens is after printing this again, this value will be incriminated by one. So now I will be four. Okay, so now again, four is less than equal to Frank. So condition is true. So again, this really printed now four will become now again here. It'll increment by one, so it will be fine. Okay. So, no, What happens is five is less than equal toe Pfizer, which is true again. This reprinted and again No, I will become six. Okay, so now six isn't equal. Do fine. Okay, which is false. Okay, so then you're done with the slopes. Okay. Religion zero on the program will be handed. Okay, so now we will see what happens now, Uh, when we execute this program, so by right, it should print fright acts. Okay, this sprint off shipment should print five times as it'll earlier. Ah, Instead of printing fry in self righting the sprint of statement five times in orderto Brenda's Dennis Ritchie and the Seacon Zone, we're using a loop on just automating and it will default by default. It will. You know, after you setting up this condition to fight them to the sequins. Or suppose if you make okay the first list cysts. Exactly. This program and see what happens. Who did some error? Okay, I just put like this their printer fighters, You hear it? And only once on way have used loops in order to print five times. Dennis Ritchie in the City Council. Suppose I want open 10 times. Okay, so I'm making it. Yes, we could against in, um so I'm steps. So you know that right? Five times or 10 times princess treatment. Instead, we can use this via loop in order to do the repetitiveness. So So loops are very powerful in C language. It will be used in many places in C programming language. Okay, so this how I looked works. Ah, thanks for watching. This video will catch up in that position by for now. 13. Section 6-ii)Do while loop: Hi guys are Welcome back. Our industry tutorial we will learn about. Do I look okay? The syntax of the do loop is to then statements and saying about if they look on the wild condition. Okay, so in the previous listen, what we learned is in case of Violet for state you level with the test expression on. Then the body of the statement will be executed. Okay, Where is in Dubai? First, this body of the statement will be executed. Willie wants on. Then they'll be the best expression. Relation will be are digging office. Ok, so if the test expression is true, then the body of the statements are executive again. Onda and this expression is ever looted again. This process goes on until the best expression become force. Okay, If their best expression is false, the look ends. Okay, so again, memory pretty in gets off via look first that s expression will be a disc condition. I will be there If that is meant that the body of the local executed where isn't do while first only once this body of the statement will be executed. Then the validation will be done. Okay, so if this is too, then. Ah, this will be executed on this Will be done multiple times until this test expression become force. Okay, so we will see for that with help off a program. So this is one of the basic sample program for do I? Okay. So he and what I'm doing is ah, I have one more. I have a variable here with I Ah, I under I have ah declined as interpreter type with an inch Liza valley called Citro. Okay. Here, as a told earlier, is the basic syntax for, um do why in which the first in do well, first, this this block off court will be executed on. Then this test expression will be ah, taken place. Okay, so here, what will happen first? It'll go in print when the executives program first, it'll going print this Dennis Ritchie. Okay, I eat zero. So this reprinted. Ok, so then what happens? This I press plus Okay, so, aylor I ease. Ah, Now, initially, I e zero Then I place miss it, Miss. It will become one. You become one. Okay, so one is listening or record toe three. Okay, so I this condition is true Because one is Listen. Three. So again you will come here again. This really printer. Okay, so, uh, now no, What happens is against Ah, one will be incriminated by one Which means he now it'll big toe I placed business it again during a one. It will be so too. Is there's any call to three. Okay, So conditioned to again you become this big secret. And now Google become three I plus plus OK, so Tories denarii Kowtow three so conditions story again You come here it reprint. Now on. Now what happens is after printing here, this one No, no, I will become for Okay, So four East less than a recall took three so conditions for so it will come out of this look. OK, so now we will Eggs eagle this program and see. See? So this one it print it first before any condition without any condition. It printed only once again. It printed three times until the I value became Ah for okay. So when became for it came out of this loop. So that's right. Printed Oneto, Tracy one doughty, when it became for it, came out off this look. Okay, So as I'm repeating again Ah, this statement will be printed first without any this condition. So we just this once granted first only once. Then what happens is like it incriminated by one. So which means zero became one. Then it became then this condition is true. Then again, this was executor. It was executed until it became force, which means when I became four. So four is that the medical toe through it three, which is forced. And it came out of to look so that's very printed four times. Okay, this how do like new Why look books. So I'll catch you guys another Ah, radio station. Okay, Thanks for watching. And bye for now. 14. Section 6-ii)How to Use For loop?: Hi, guys. Welcome back in this tutorial, we're going to learn about four lobes. Okay, on Done. This is the basics. And thanks for four loop. OK? Oh, there'll be far on. In between this, uh, bracket will be three parameters. Installations, just initialization. Statement, condition, obey statement and statements inside the body of the Okay. So the insulation statement is executed. Willie wants, which is this one will be excluded only once. Okay, then that that's expressions validated, which is this particular parliamentary? It will be evaluated if the expression is evaluated. Toe false. Which zero? It will come out of this Look. OK, but you This expression is of elevated to two. Then this particular block off statements will be executed on then this particular abrade expressionists abated. Okay, after again the test expressions of really what enrichments again? This will be validated. This process goes on until this This expression is false. Okay, when the next expression is false, which means this condition phrase and you come out of this Look, we'll discuss further with help off a program. Okay? Example program for a for loop. Ok, so, as mentioned earlier, is the main function with the programming restarts from main function. And there's the question part declaration Part of here have declared I variable for indigenous type on This is the former for four look which we discussed a little bit. Three parameters for four hope so here I'm initializing the value of I call the one on. There's a condition which I'm sitting here as eyes is an article to fight. Then this condition is to on DA this prostrate money will be executed then this abyss treatment. What happens is this I will be incriminated by one. Okay, so, um actually, the object of this program is I want to print this particular statement in the sequins off a fighter. So that's why I married as fi here. And I said the origin really is once want to fight 12345 So which misfired times it has to print and seek answers. OK, so now what I will tell you are lying. Berlin How it works now. I called one so no eyes one so isolated. Any quantify? So which made this condition is true. Then this really printer Okay, then what happens is this you will be incriminated toe. Okay, So now Origin valleys one No, it'll increment by one which missed the evil is to know OK, so now to what happens is again. It will come here to ease less than a record to fight conditions to this really printed again The I offer printing this against I really will be incriminated by one which missed now eyes three. Okay, so then again the conditions are elevated so three is less than a record to find. So condition is true again this really printer again The value off I will be in agreement and by one so which miss I use for no so forties lesson A record to find so condition is true again this winter printer again you'll come here on this value will be incriminated by one which must know ice fight. Okay, so again this test expression will be evaluated Suffice less than a record to find so condition toe again This will be printed So after this again, this value off expression will be the value of this particular I will be incriminated. We want which miss Now there will be six. Okay, so now six easier than a record. Oh, fine. So condition Forthright for condition force. Okay, so now it will come out of the slope. It'll return zero under to this program, and okay, so, no, we'll see. Um, real exude this program now and see what happens. I see and bring it. Fighting's Okay, So this is how I see. Look, SRT this How far? Love books, actually. OK, so thanks were watching this video. We will catch up in a recession. Uh, bye for now. 15. Section 7-What is a Function ?: Hi guys. Are will come back in this session. We're going to learn about functions in C programming. Language function is a block off group that performs a specific task. Okay, suppose your 1,000,000,000 application in C languish on a no no. For your program, you need to perform some specific tasks more than once or tries. In such case, you have two options. Use the same set of shipments every time you want to perform the task. Are greater function to perform that task and just call it every time you need to perform the task. Okay, So obviously, Option B is a good practice. And a good programmer always uses function well tried in courts and seek. Because if you keep on writing the same sorts of court again again, it's difficult to maintain faster for like because because you're going to perform the same task. And they feel if you don't want right to function and if you want to use the block off statements again again, it will know the program illustrated the pretty lights off when it is not a good practice to write the seams so scored again again. So instead sees offering a concept called function, where you contrite that Ah, sorts cold are the task or the particular statements in a small function and just call it wherever it is. Quite so it's a good practice toe right from we're going to learn about types of functions . Okay, so basically there are two types of function. The first only standard library functions are the way we can call does Enbrel functions. Okay. The standard label functions are building functions in C programming language, for example, like sports to get sprint off scan off etcetera. These are the functions which are already had a definition 100. Firms like dot hedge grades like a studio dotage. Eso we just call them. Whenever that is, I need to use them. Okay, So this all provided by C language. We can just add this header file on top of the sea program when we can just in work it when we getting executive actually so liable function which are offered by ceiling, which which we can use just by including the 100 fights. OK, so the second type is called as I use a different function so easy. Different functions are nothing but a function which are written by the users, Actually, I mean, as, like, based on our own requirement. Okay, so you can also create functions, but you need since functions created by the users are known issues and different functions . Okay, so I'm really one of the advantages off use, a different functions. The program will be easier to understand me. 20 bucks on a reasonable cause that can be used in other programs in large program can be divided into small bodies, since a large project can be divided among many programmers. Okay, so the main objective of using function is right. You know, Nito the pretty repeatedly use the same source called to perform a specific task, actually, So you just read the function? Just call them. Ah, very, very your require, actually. So by doing this, you know, you're releasing the reusable lines off court and on, and also it's called the Quite smart of a forno, probably in the program. And it's a good practice to write the functions and stuff. Multiple integrating multiple stating statements to perform the same kind of mask. Okay, So we will see for they with the help of the program 16. Section 7- How to write a Function ?: Okay, This is the sample program using functions. Okay, so three things you need to remember about reading a function. Okay, First of all, Ah, the function prototypes. OK, so whatever you're going toe, define inside. Ah, program first, you need to write the function prototypes. So there's a basic syntax. Okay, so you have to write the letter type of the function name will be parentis is on the perimeter, which you're going to use in the function. Okay, this is the function porter type. Actually, just to remind you are this is something it actually is a good practice to write it. But if you even if you don't write this function prototype, the see program will get compiled, but there'll be a warning. Okay, but it's a good practice to write the function product I before defining it. Okay, So here what I'm going to be is, like, once I had done with the function prototypes declaration. Ah, with the function which I'm going to use in the program, we will jump into that definition. Okay. Here. I'm writing a very simple program. So the function off this, uh, sorry. The name of this function is addition okay. In which I have one. Very because result with the Inter Jetta back. So I'm just printing this one. Okay, I'm inside. Ah, function addition. Okay, here's what I'm doing is I'm just whatever the parameter I'm getting received. So the two parameters, which will be received when this function is getting caught. Okay, So I'm just adding this one. Which means, for example, if I'm getting in and then then I should hurt. I should have don't. Okay, so, for example, from against sending 10. 20 if I'm gonna Kentucky, which Mr is A 20 SV, that output will be 30. So the outward to 30 will be captured here on dial printed here. Then the same. I will return it to the place Where is getting called. Okay, so I have one more function concept. It's same thing similar to audition. I'm just subtracting here. Okay. So, again, this valuable, very captured here, I'll printed here on day. I'm just returning this value to the place where is getting called. Okay, so now you jump into the main function. Okay, So function for the type we have already discussed function definition we have already discussed. Now we'll see from where is getting called. Okay, so I have a I have 40 variables. Here are some simp yen to anyone. Okay, So here what I'm doing here is just getting two parameters from the user. Okay, on, um, I will call the addition, function and store the I'll just call this addition, function on bread out put here and I'll call again the subtraction function and print out. But here is very simple. OK, so let's execute this and see what happens. Okay. Did he is editor here? Let's see what it is. Okay, this one made a move it. I'm gonna bring okay. So as a totally earlier, the program for ah, execution will always starts from main function. So all the stuff function, whatever disease which will get cold if they're 100 functions. Over here, you get called from main function. Okay, so now I'm in putting the value s the first value. If then which is the anyone value again? I'm in putting the second value as for example 30. Okay. So what happened? Here it is. I'm okay. It it captured the first value here getting captured the second value. Then it called this function called Audition. OK, so then the controlled went here. Control went here. Okay, so now it's telling that I'm inside the function addition. I'm inside the function audition, So I given 10 place 30. So the output is 40 40 stored here in the forties printer here so that the self value at addition function is 40. So this is printed hit, and this is good quarter. Turn here. Stones. It returned this some value. There's some a very believable hold. The value of 40. So this one here is printed here. Okay, So if you see here, I made main function. I main function function now. Some Michael toe 40. Okay. So again, it comes to a subtraction function now, and it made a call. It is a function called some production function. So let's see. We go here. If you see here now, I'm inside the functions of production. So which controls here now? So this is a valiant suppression functions minus 20 Which means are inputted ace 10 on Bs that this or 10 minus 30 the output is minus 20. So that's what it printed here. It printed here the value of the subtraction function is minus 20 again. This value was returned. The certain disco stop was returned to this function called dysfunction. Now this value is minus 20. So that's what is printed here. I'm main function. I'm just function now. I know this value has been restaurant. Okay, so I Children missed his group. Times I mentioned here. Just your mother. Okay, this sprinting closing the city. Let me try with another value. I'm just giving 20 on, then for me. Okay, So what happens here? My game. The first of all, you've got, uh, captured here and then second. Really captured here. Then is going addition function. So 20 plus forties. The value 60. So they're self value. It function in addition function sexy rich Missed This one Research value tradition function is 60 which is this one. Then again, this very God returned to the some function so and I'm printing the value here. I made the main function I met. Main function. No, this value 60. Okay, After this begin, the subjection function is called with two parameters. Which is the anyone is 20 and subtraction. And the second into east 40. So did you come here? Okay, I'm inside the function subtraction, Which means here then it's just subtracting here, which means don t minus forties, minus 20. So recent values subtraction function. Is this results up? So which is minus 20 again? I'm returning this value through the main function to the main function, which means no sub. How ah, minus 20 value. No, but it didn't value from subtraction function. So again, imprinting this religious minus 20. So that's how the functions works in C programming language. Andi. Ah, thanks for watching This video will catch up in the next section. Bye for now. 17. Section 8-How to use Strings ?: Hi guys. Welcome back in district Auriol. We're going to loan about strength in the C programming language. Okay, Okay. Okay. What is that? String? OK. String is a one dimensional Ari off character that is capable off holding a string value at the time. OK, on, Please note off. When compiler encounters a sequence off characters enclosed in double quotation marks, it happens and null character at the end. Okay. For example, I'm declaring and initializing a vertical string OK, in this character, Ari. Okay, so if you see here 123456 characters. But I had defined with the seven. Okay. Ah, memory allocation for seven. Okay, so what happens is like a default when it sees the quotation on the sequence of characters by default at the end, see, compatible will happen, NL character. So whenever you're initializing the string value, make sure you keep one more space. Are one more room for the for the null character. Okay, so if you're sting value with six, then it should be seven. If you're string values aid, then it should be nine. Okay, So take note off it. By default, the C compiler will happen in Alcantara and end after, uh, skin value. Okay, on. Um hi. Guys are here in this tutorial. Will learn how to declare an angel. Eyes strength in C programming language. Okay, begin initialize strings in a number of ways. Okay, this is one week here. What we have done is this is the air attack on This is the very book, and there is no definite space was allocated. Onda value off Dennis was like Dennis was initialized to this raid happened. Okay, so this one day off for declaring and initializing the string value, the second way is weird. We can suppose, uh, if I'm using the value as Dennis or any other any other string which have a six character. So what I need to do is like, what we had to do is like we need doing put one more space for the character, which, for example, here is a 612345 six. Okay, so it's express what seven. Somebody needs to be ah, located for the memory card Ferrari. Okay. Suppose if you mention a six year right, like it may end up with the un designed result. So during the compilation. Okay, so make sure that whenever you're initializing a string value toe a character away, make sure you keep one more space for the, uh, no character no longer. But before this, he will be compatible. A panel character, Bennett show when it sees the double sequence of characters with double quotation. So So they should be always 11 most space for the character. Okay, so this is their two days off initializing guesting value. One is with space. Uh, with the definite memory allocation. Another one is with the indefinite memory allocation. Like we can just give this a square bracket on by default to see will allocate memory for this particular string value, which you're getting it straight to the c. Very well. Very. Okay, So he already here. But there's one more v eyes like you can declare an inch ELISA string value in this form, it also which is also a correctly So this is the third. Are we off for declaring inch lodging here? There is no definite space for this cat ready. So the code depresses you needing. You need input. All your characters of which you wanted slash Teoh character variable on DA. Similar to this one you can put you can allocate the different space also. So here is Dennis. I have just mentioned a seven here. So here, 123456 character values and one is for the character for C compiler. Okay, so there are four ways to declare inch lies a string. But I feel this is one of the better B and e's history, so we will see for that with the help office program. Okay. If you see here, um, this is one of the basic program where we are declaring and initializing sting value twisting very well. A se mentioned in the decision. These are the four times which we have seen. So one needs with, uh uh, defined character, Ari, Uh, on the other one is with undefined. I'm not different. Any space over here. So with the double coats on the these other two types and also with the curly braces, you can initialize the valley where you can see all your sting values or here on the ah return different space. Similar leak and use a different space. Curly braces and 1111 space. You need to leave for them. No character. Okay, so therefore, types off declaring and initializing string value. So if you execute this one out will be in the same but as a tour earlier, this is the best rates and the simplest way, you know, to declare initialized string string value. Okay, so let me compel this program and see what is output. I think you see, here we are. Printer. This is the declare initialization, and I'm printing this really here. So did Printer Dennis. And again, I'm declared and initialized with the definite size off seven, which means sixes for the character, which I mean sledging. And one further Calcaterra Nell character. So total seven. So, the party scene, this is what I'm gonna see. Def. See that? Just printer here. So now again, I'm printing this value here, which is also Dennis with undefended, uh, size, actually on different size. But I only mention I already input or the Nile control here. So similarly with a different space here with and I imported my, uh, string value in the curly braces. Okay. You see, right, there are four types off for declaring initializing a string variable, however, but the value, but the output is saying so. You can use any one former to know in your program. Like Kevin. You want Oh, declared orange allies the string value. Okay, So, as I told earlier, this is the best way. So in our further programs, like we'll use, uh, I did this or this way off declaring initializing a string variable. Okay, so this ah sample program shows how to declare initialize, and the print is string variable. So thanks for watching this video. We will see Risk us for their end upcoming assertions. Okay. Thanks for No, uh, we'll get you in the position. 18. Section 8-Program using Strcpy: Hi. Guys will come back in this tutorial. We're going to discuss on the commonly used in functions and see OK in, see has various string functions. Okay, but in this lesson, we are going to discuss only about four inbuilt testing fresh functions which we're going to use in the coming programs quite often. Okay, so the 1st 1 which we're going to discuss is ah, String copy. This is the function. The 2nd 1 is strangling the toad when he is stinking on the 4 20 string campaign. Okay, So, String Corp. East England, string concatenation or stink at Austin comparision or string SD RCMP. Okay, so we will discuss along with the help off a program. Okay. On a stink copy. Dysfunction copies string toe to the another character, Ari. Okay on that. This is the basic syntax. This is the type and string copy. And within the bracket, the this nation source. Yeah, the stream corporate function copies a string pointed by source, which means this value, including all character to the counter array, destination dysfunction, intense character, every destination, which means like here, here, did is that this nation and this is a source water value this variable will hold will be copied toe this, uh, this particular variable. So this is the source on this is the destination. So at the end of this program, when you print this value so it can it will print the same value as this one, Actually, which means we're hoping it will override the value off this nation. The source value will be over 10 in the this nation variable by using this function. Okay, so we will see further with the help of the program. If you see here as usual is the sting dot hedge string I your dot hedge input output dot Had to fight, which were already discussing the illustration here, I had one more different question. Don't hatch. The reason is I'm using an inbuilt function which is defined in this head refined. Okay, so that's why I'm adding this particular 100 file in this program. Okay, so we have discussed in the year earlier our sessions. This is the Peixoto declare and initialize a string value. So here I am, high holding. I'm having to bury boost last year one and it's your toe with the character type on their I'm holding in a wooded area. Franti on five inch lies the value off Dennis toe this particular variable str one on dimensional ized. Uh, strange one more very recalled. Str over the value Fritchey. Okay, so here, as a total your liver using this system copy function, we can copy. This is the source and is the destination. What overvalue is available in this variable will be copied or over 10. Uh oh. This particular sting value. Which means when I printed this, this sting one should should bring the value off stink toe. OK, which Mr Tucci? Okay, again, I'm repeating. I have a two variables sting once interesting one. I have been stylized with the Dennis and stink to high heaven slides with Richie so and I'm copying the value off riches. Just here to play Stared one, Which means Richie should be overturned to scare one. Okay, so this cover value will be copied to this chair one. So when a printed stare one, it should print the value of foraging. Okay, So and it'll returns the ravages that normal are termination for a C program. Okay, so let me compel this and see what is our see instead. One is genius. Estados Richie copied a stair to stair one and imprinting instead. One which is already. Okay. Suppose I'm giving another name called Stephen on. Uh, I have I'm giving you another belly called up Bill Gates. Okay, so let me execute decency. Get certain. I see I have the first string I have mentioned as Stephen. The second string is Bill gets again. I'm copying this really toe this particular variables with the help of seeing copy function on by printing this string one variable, which is Bill Gates. Which means this values all the copper toasting one. Very bad. So this how way can use a string copy function in C program language. Thanks for watching this video, guys. I'll get you guys again in and out of the video station. Bye for now. 19. Section 8-Strlen,Strcat,Strmp: I will come back in the position. We learned about a string copy decision. We will learn about string gland function. Okay, so let's get started. So I'm using this almost the same program. So Dennis is a declaration and insulation off a string value toasting one and Scinto Okay. Here. What I'm going to do? You suppose if I want to find the length off this particular string value Okay, a particular losing value, then I can use that The strangling Okay. Ah, this is the basic syntax. Eso the string str alien is a function which is defending the string dot Hitch fight Onda There should be only one parameter between any two years. For example, if you want to find the length off this variable then you can put this very below here on that. Suppose if you want toe find the length off string through, then you needto father particular very below or in this particular is the basic syntax. How to use a string gland function. Okay, So single anus to your alien And in the bracket you need to inside the bracket you need toe Mention the very blame for which you want to find that length. Okay, so again, I'm repeating this. The thesis one. We already scored his answer Fight on the string dot hits I'm including here because I'm using a string function. So that's why how glad I have included. So I have included the header file here in orderto so during the company execution, this thing function will be invoked from this single hitch for fight. Okay, there's something like a function called function called which is already defined in the Boston College fight. OK, so that is a declaration on initialization, where we have initialized the needs to the testing one variable and innocently school ch teau last year. Variable. Hear what I'm going to do is I'm just trying to find the length of this particular string, or it can be fighting and 10 or it can be 11 or whatever lesson. So after the execution of this program will come to know the length of the string value which it has been stored to this particular variable. So similarly, I have one more variable. It's your job which contained this one. So I'm just trying to find the length of this particular very But if you see here. One toe, three string. Really? But 12345 So this thing variable have Ah six characters on the 2nd 112345678 So on second thing, very blessed here to have a cattle. So this should print six. This should be six. And they should be eight. Okay, on didn't zero, which means re signals for the normal definition. C programming language. Onda, I'm just compiling an executive. See Executive, that's your happens. See, as I mentioned six and eight because this string of valuable stream variable is holding character off six values here is we're holding the value off a character values. OK, so this is how we can use string gland function C language. Now we will jump in tow. The string concatenation. Okay, so in string concatenation of this tour, we already discussed in their later a session so that we will jump here. So there's a main program with the execution starts again. I have the same declaration Initialization here stink and kindness. What happens is stink at or sink concocted National semiconductor. It appends the value off last year. Toby, this is the thoughts and is a destination. What are the value here? It could happen here. For example, if a Taser Dennis Tingling has Dennis on this year to help Ritchie So this Richie will be upended here. Which means at the end, the output should be like this. It should be Dennis enriching. It just can coordinates it. Just joints. Take another week until just joins. Okay, Whatever the value here is here, it will be upended here. So it's not over here. Which means this valley will be dead on top offered. This value will be upended, but make sure the space has been allocated accordingly. OK, so let me eggs. Eagle, I'm just printing this one string values and is the placeholder. As I told in my realization. So it is since there's a string I'm using s okay, So if it is indigent, we need you City. If I'm printing integer value, then I need to use date. This is a string, so I'm using us. Okay. So I'm just printing this value. No. Let's see what it shows. See Dennis Ritchie. Okay. No, I'm just a change in the value s bill then gets okay, so at the end. I should get should get Bill skits and I'm exhibiting the output should be really gets because we're happening there this past year to value to this chair One which means we're just joining. Okay, Security, the militants. Okay, so this how ah, still intact function works. Okay, so we will. Hi, guys in this territory. And we learned we will learn about string combat function. Um, string compares for Sting Stu rcmp from shade compares to strength And this is the basic syntax I It is the type a teacher rendered in this year CMP on There will be two parameters in this first parameter on the second perimeter. Okay, What happens is like when using using a stink of bad function, it come 1st 2 strings character by character. If the first character off two strings are equal Next character off. Two strings are compact. This continues until the corresponding captures characters off. Two strings are different or inal country Strange. OK, so ah, if the return value from string compare is Jiro, it meets Bowed strings are identical. Which means, for example, like if I'm comparing a string, uh, for example, Dennis, str one and Dennis cierto if what meet Miss Both are equally it compass character by character. And if it is both are equal. Then it is written a value off zero. So that's where we have Ah, Grendel depressed. I m p okay. Returned the value of zero. Suppose if the ask you value off the first on MASH character is less than a second. It'll it in a negative. Never devalue. Okay, is the ask you value of first on match countries greater than second, then post you in digital will Betterton. Okay, so techno offered. So which means our if it is if if two variables values are equal when during the comparison office Jesse and Peter zero. OK, so we'll see further with the help of a program. Okay, we'll go line by line for the stream combat. Ah, function example. Um Okay. Here. This daughter STD I owed on his shatter file regarding this cause daily lessons. Ah, the string dot hatcher have included here because we're using an inbuilt think about function, which is different in this tingling Cherifi. So that's why I'm using this, uh, this particular hunter file here. Okay, so now what I'm doing here is I have a two variable uh, string variables. Ah, I stared oneness there too. I mean, stylized with the value of Denise and Richie. OK, so and I have one more very cold variable called result where I'm just capturing the output off street RCMP function. So what? It does this like it compared Ah boat value variable values one day one if oh, if it if voter identical both are equal, then a value of zero in Britain will be stored. This particular variable Okay, at the race, it will be a negative or prostitute based on the comparison. Actually supportive the comparison during the comparison if unmatched his phone. Listen, a second test negative value is the unmatched is after more than one sec, eh? It happens after one second, Then it'll be positive. Ok, I'm just comparing. This is called a zero. If this is our put off, this drink of compact function is zero for zero. Then I'll print us boats to sing one and string to our equal. Okay. Answered are just Printemps suggesting one and two are different. Okay, so when eggs eagle this one, this one should be printed because Dennis and Richie is not saying okay, What? That different. So let's execute this program and see what happens. Okay, See, String one and two are different because sting one toe. But the difference difference this jenesse center chief. So no, I'm just replacing with Dennis. See, now it compared both line by line. Sorry. Cattle by character. Ah. Then since both are equal, it'll turns ever really called zero value of zero will be assigned to this variable. And I'm just comparing this variable with zero, which is strong. Which means, uh, just too. So that's where this is getting print that. Okay, so, no, I'm changing their value again. For example, like I'm just putting us Ah gets okay, So I'm just secretly no see Now it combat. Ah, Sting One instinct to go to combat character by character on both or not equal. So and, uh, that's why ah ah zero. Well, you was not returned to the city said variable. So the sweetest condition Gottfried, on this particular ah statement got printer. So this is the this how we can use string combat function c language. Ah, thanks for now I'll catch get you guys back in the Unadilla. Ah, video. So would bye for now 20. Section 9- What is an Array ??: I will come back in this session. We're going to learn about a raise. OK? Ah, first of all, what is in our a o k. R A is a group. Our collection off same data types. Okay. For example, indigent Ari holds elements off integer types violate character. Ari holds elements off character types. OK, Um, no, we'll see how to declare Nari. Okay. Uh, there's a basic syntax you need to specify the data type space. The Iranian undersize. Okay. Ah. Ah. Here. If you see in this example, have used in space in new um then square brackets don't. I ain't is nothing but the genotype and new year Me something with variable and it can hold . Then it emits. Okay, tell elements off in digital type only. Okay, Please note. 10 elements off in teacher terribly can hold the second dome. This is the licorice are a declaration toehold character values. Ch air is C H A. R is the right and ch is a variable and it can hold any animals. Okay, So, in case of ari in digital can hold Oregon digital data values. Where is character can hold early character valleys? Please note it got a cricket holding vigil value, whereas an integer also can't hold Carparelli. So it should be. Should be on the same type. Okay, It cannot be. Ah, mixture, actually. OK, so this array and it can contain an aria. Friend elements this Arctic character, Eric, and continue area element Ari off Carter's for 10 elements. Okay, are a subscript are indexed to access any element storing array subscript stored, sorted subscript starts with zero, which means area of 02%. The first element in inari in general are A and management can be used to use the intel Ament often. Ari, there is anything any indigent number. Okay, if you see the forest, for example, if you want to access the value off the first element, OK, so you need to use our A very the very blame square bracket. Zero R E value off nine will hold the tent element often, Ari. Every value. Okay, so you do always remember like if you want access, the first element often are you should use variable name scored back in zero to access the first element. If you want access the last element, then you have to You and you need to Ah, minus with one. For example, if you declare the stern issue to be in minus when we just 99 will contender, then tell a mint off very value. Ari. Adi. Really? Okay, So, for example, if you have ah, fight, for example declared, this is five, then off. A value of four will contain the last element off. Ari Revalue. Okay, no, we will learn how to inch. Listen, Ari. Okay, we get insulin are a getting declaration itself on. This is the basic syntax. How essential is in a hurry. So you're live in the previous slide. We have seen how toe declare it. It is the it is the syntax holder declaring vary in their time space the variable name square bracket on the harmony elements you want to. So, for example, if I want to still fire element So I'm declaring that a with the fight. So if you want to initialize, it is the same tax it called. So then, curly, uh, curly braces. Then you can put your you can story or values like fire. 10 15 2024. Whatever. This okay is the former to know how to ah, store out initialize value to the Sorry. Okay, so there is one more of a Actually, if you don't want to specify the size, actually, then you can just leave. It is empty, but even they fear, nor space for the size. The C compiler knows it's 55 values as well as internalizing it with fi elements. So it will elect the space accordingly. OK, so there two ways I did You can specify the size are you can live it as MPC compatible, but based on the values it will automatically, uh like it. Ah, memory in inside. 21. Section 9- Declare Initialize and Access using Array's: is the sample program using and Ari. Okay, so this I this to rose, we all discussed No, really. Sessions will directly jump into the program. So here I have declared and are a variable within digital type which can hold ah, five values. OK, so this is the syntax. Like how mentioned variable name on described record. We need to mention the Sybil is you're going to start on this the whole you can initialize the values to the area. OK, so now I want to print that this, uh, values, you know, in the sequence. Also, I just wear this way of putting it for condition here. So what did happen is like eventually I called zero, OK, that I equally pleasant five. So if it I easier than fight. So this condition is true that this blueprinted Okay, so this loop will be excluded and five times okay to leave exited fighters and all the flight data elements off this Ari off this array will superintendency cancer. Okay, so I called zero. Okay. I use less than five years is a very strong It'll come here, little printed zero here. Then it will print ari off as you know, value or here. Okay. So, like, vice like this, it'll print, uh, thing until this condition phrase. Okay, so, by right order happens is like, Aria of Jiro will continue really often. Ari of one will continue relief. 20 are You have to continually of 30. Ari off. Three will continue. Value 40. Area four will contain the value of 50. Okay, so let's execute this one and see what happens. Okay, If you see here, see a za told earlier array of zero Ari of zero Contestant one contestant er to convince 30 Ari of three countries for the area. For this is how we have toe declare initialize and access data elements are using. And Ari, Thanks for Washington's video. I'll catch you guys in and another of initiation Bye for now. 22. Section 9-Arrays and Functions: Hi, guys. Welcome back. Okay. In decision, we're going to loan how to pass and are a two functions similar toe passing. Very bust your function. Okay, so does the had that fight which were discussed in the illustration. Okay, on this one is a function prototype. Okay. Before defending a function in a program. So it's a good practice. Toe declared dysfunction. Prototyping. Already instructed. The comeback function will be used later in the program. Okay, Onda. Now, this is a function definition off this display function. So what I'm going to do here is, uh I'll just get this parameters. Just get this parameters from the main function wherever it is getting called. And I just printed value in the second, so that's OK. Just take the value and print the value. Okay, so now this is the array declaration insulation, part of which we already Scottsdale it. OK, so now what a good news. I'm going to call this function, which is a display which is here. I'm going to call this function of these two parameters array parameters. OK, so, Ari off to and passing an area of three and passing. Okay, So are you Have to men's as a toll earlier. Aria zero will contains the first element, which is five ari off. One will contain the second element cistern ari off to contain the total images for managements and passing 15 0 here. Okay, So similarly ari off three will convince the value of 20. So when a passing from here, Ari value, I'm passing 15. Don't on this note. When you're passing the parameter, this is ah, proper syntax. The variable on the hard to mention which element you're going to pass. Okay, whether ari off why are usually of one or two or three world artists? Okay, so but is the informant how you need to pass the ari values? Do you function? Okay, so now we will exhibit this program and see what happens. Okay. See? Okay. As a total earlier Ari of zero content fiery off. One content in R A of two contests offering which makes a off to condense offering stick on the same way sprinter, which is 15 year. Okay, So similarly, ari off three holds a value off 20 that don't iwas part past year. Age to on this was printed started. So So this is how we can pass and a real value to your functions while making a function called Ah, in a pregnancy program. Okay. Thanks for watching. I'll get you guys in the another video station. 23. Section 10-Pointers Theory and Program: guys will come back in this tutorial. We alone the border pointers in C programming language. Okay, The pointer is a variable. The stores address off under variable. And like other variables, that holds values off a particular Daritai point and holds the address off available. So it is very important. Pointed holds the address off available. For example, an integer variable holds an integer value, but an indigent point holds the address often indigent. Very well. For example, intern, um, space equal to do so. If you see here, num is nothing but a very blame two is the value off number to is the value off number. But Amberson Numb will contains the address. For example, it can be stored in this battle orders or any other artists of which the C compiler. Our desires, actually. Okay, so here again, a very putting indigenous. Nothing more than a type of numb is a very blame onto is their value. So this numb variable store will hold the value off 22 But amber send, um, Will contains the address. Off number The pointer are syntax for declaration. Okay. So you can mention, as in star space, be, uh semi colon. Okay. And there's nothing but the genotype on the star on the space you have to put PP is nothing but very believe. Okay, you can also declared The point is in this way in the drive space star P one under in space a star Pito and semi colons. Okay, make sure the cynical and this point are this a strict is represented. Okay, This the basic syntax for the declaration of the point of Okay, so now we will learn how to assign address to the Pointers. Does the declaration for the point of this and this special variable know which Nothing with the pointer variable who is an assigned to the sea variable on address off seas are saying to the pointer variable which is specie. Okay, again, I'm very pretty. This is the point of declaration PC on that too. Is ah tryingto very recall. See, on the address off sees assigned to them, pointer. Very but Okay, so this is the declaration on dis is how we assign address to the point of Erebus. Okay, Declaration on this is assigning. Okay. We'll discuss for the pointers with the help of a basic program Okay, so here, what have done? It's like havin Shlaes initialized. They're known variable to you. Okay. Ah, for indigenous. Right. Okay, so I have one more. Ah, pointer Variable! So here we're just assigning the address off number two pointer variable. Okay, this is the declaration. Okay? So they should be, uh, no, a strict before the very bulbul you declare it under when you hear, you know need toe a special star again So you need to do it once and over when you're declaring assigned the address it trip entre variable. So let's sprint This one we want we're going to do here is we're just printing this pointer variable. Oh, no. Into Sikandar. Please note. You have to use the former specific. Okay, so under 10 0 is normal termination in C program. So let's exactly this one Okay, on this is the address off. Very, but okay. So again and repeating a point is a variable that stores address off under the very but Okay, so one more thing we can write like this also, which means, like, if you if you're printing this Amber sen numb, this also will print the villa Amberson numb also will kill the same old put us pointer because there's all this 3% they address off number able. Okay, so let me execute this also and see what it is. But giving the same belly, which means speed here, we are saying is very toe point. Repeat. And we're printing its holds the same address on the other way. We can make we can printed as amber syndrome, which also princey address off this particular, uh, number three. But okay, so it is how we can Ah, glad Assane on the print pointer. Very potency C programming language. That's all for Noah. Can't you guys in Amadora video? 24. Project 1)Delete a file and automate: Hi guys haven't come back in Distrito. Really? We will learn how to delete a log. Files are using our program. Okay, on this is a basic C program and go line by line on. This is what I had a Fine. Okay. So since we're going to use some of England function like a parental front Ramo have included the center five on Daz. Mention your lead is the main function the program execution or the largest house from the main function. And I have one now that they have Ah, in digital it a variable called our put on Because I just want to store the outcome of this particular operation. Okay, So in order to remain, but that it is a success or failure. So here is the main thing here. Actually, the main function just more so here. I'm just passing the perimeter. Okay. Here, Uh, my objective used to delete that X file and all from this particular folder seating blocks . OK, so just show, You know, this my folder C temp locks here. I goingto religious and tax fight. And this is my, uh, c program. Okay? It is not We are We have toe right this inaudible course. Okay, because okay. But also, they should be double slash. Okay, so after this, like, I'm just evaluating the outcome of this very bill. But there is zero or 10 men. City success here also imprinting the value of four, but won't ever visited by remove function. Okay, so if it is zero, it means then it will come to this. Low power is just basically felt appropriate for this accident. This was printed. Okay, with zero off. If this welcoming zero, then I will messages that finds that it is successfully else. Um sorry. Teach me the fine. Has bean religious successfully. Okay, So else if it got the religion, if this operation got failed and it will return minus one, then a time like this for this violation will fade. Any to print this particular statement. Okay. Not a belittled the fight. Okay, so this is a 10 0 is, as you like our in our doing from the compiler for the normal ammunition. Okay, so on we're just closing the back. It's OK. So OK. Really exude this program and see what happens. But you would like to build IQ. Yeah, really successfully. So here. Uh what? I'm going gives, like I'm just so once Exactly this one, This particular file instability. Okay, so now, like Mexico, this one now the final Cordell it isn't OK, so if this is the final calculator, then it'll written zero. I mean, and that, like, this output variable will capture the value at zero. Because we're just not signing this are put off this operation result very belief with zero Miss, this this particular printer function will be executive, which is the fine has been really just successfully. Okay, see if you see the finance meditating. Okay, so now we were doing more testing. So what we do is like we will create a file called our best one. Okay, Okay, OK, but if you see here it is text. Okay, but I'm creating a file Cortes one. So which means this will fail. Okay. Should return other than zero, which will be my little normally to return minus one. So which means it's not able to delete the fight. It's not able to find a friend of the delegate. Okay, so let's execute this one and see what happens. The are put off the value off put variable is minus one, which means the outcome the all come off this operation is minus one. So that's what I have printed here. Since this is minus this old put very little it is. It has a value of minus one. Dissolve this validation. Got faith. So I did printed this message is okay on by selling the notable will defend because the file destined tax is not a real blow here. So it Gottfried Okay, so this so we have done manually, right? So let's see, Like how to automate this one, for example, Like if I want to be this particular text by Ah, it is on a particular sequence e like every day or every week or every month that we can put a castle dealer in our oh, our religious fail are automatically okay, so you don't need to do it manually. So this we can do it like, ah, I should only job in the Hospital of Industry Stereolab. So we'll see. How does this one I'm going toe pastoral now. Okay, so no, I opened the bastard less so great. Basic dusk. Okay, so I'm just gonna get Let's to go. Oh, no. Do lead there. Lots. Right. Okay, so the next hey had animal develop shin? Ok, whether you want to show the job daily or ah, our weekly or monthly or one time or the computer started multiple options here. I'm just sure going to try this one time because I just wanted to read his file only once. Ah, as part of this Ah, demo. So now, um, today notice Ah, 36 year 36 PM on 19 October Because the 19. So just for the testing purposes, I'm going to make it as 37 So, in orderto execute this particular should Hillary in just a minute. A friend from now. So start the start A program. So this one, then you have to select the script. So I'm just going to give this executable fight. So next, Onda, That's what I'm going toe open the property developer. This trance when I click finish. So be sure this is pretty selective. Okay? And is that time which I have Ah, shuttled here. Okay, so now I'm going toe make It s, uh, one. Okay, so now it should deal it automatically. When? When it when it became threesome. Okay, so I mean, three threes. Some proceeds will just automatically building on the right way. That custody. So this is how we can Ah, no ultimate. The final elation using in C program and cash. 25. Project 2)ATM Project Overview: Hi, guys. Welcome back in this tutorial, we're going to do a small project using a C program, okay? In which we're going to write a GM simulator easing program. Okay, so let's get started. So before that, uh, we don't say Let's take an example like I mean, like everybody interest will, it would really have a debit card in your hand. So So when you go to any GM, so what happens is like the first thing it promises for the train. So whenever you insert your card in the 80 mission, it promised for the pain. Okay, so we will put the same logic in a receipt program. The second thing is, if Penis covered, then it didn't prompt multiple options. So assume that we're here in this program you will prompt for four options. When is the positing is a balance inquiry? The second option will be the cash with travel and the third option that deposit cash for it will be exit. Okay, So this is the very basic, uh, options which are available, er most in all the games across the world. So assume that the customer selected the option called balancing Corey. So what happens is like we need to display the cash balance. OK, so this is one thing. Second thing is like in case of the customer Gideon second option, which is cash with travel, then the next court. The next question which we need to ask us for them. I wanted how much on what he want toe, uh, withdraw from these available balance. OK, so this project will put in the sea program. So the third thing is, then when it when you when we got the amount of which we need toe debit from the cone. So the second thing, which we need to do in the court language in case we need to see, see where that moment is available in in his a confident we will debate that a particular amount and be able to dispense the cash. Okay, so? So the sport had mentioned year. They've been DeMont and show the available balance of the money will be debated, for example, out of $1000. So, for example, is available in these $1000 on these he keyed in us find solace. You want to be traveled, so the finder dollars will be debited address find the dollars will be sure Nestor available vanish in this house. Okay, so this Roger will put in our program. So the third option in case of the custom arcade in the option called Deposit Cash. So the next option between much Hammond. Hey, wanted about it that we need to prompt then what we had raised about at the moment he killing, for example, is available banishes 1000 on if we want to deposit, for example, another find a dollar. So 1000 plus find that miss available will be 1000. The deposit amount it will be 410,400 will be displayed as they're available. Balance in his sock. Want. Okay, display the daughter value So forties. Like when he sneakiness four. Then he should come out off the program. So So this is the, uh, court logic off program which were going toe develop it. Okay. So again, I'm reporting. Whenever you insert the card, it should ask for the middle. It reports of the pencils the same logic will implement. At first, it'll prompt a bomb for the pain with the Penis current than these four options will be displayed to the customer then if the customer selected the first option, which is balance and cutting, then available limit should be shown to the customer. The second option. If he selected, then it will. Then we have the problem for the amount which we he want. Oh, drove it than the then they should be checked. Whether this particular amount is are available in these Ah, count. If it is there, then they will amount and showed available balance. Then the tone option is if you want the customer wanted abortion, cash then from for the amount How much you want to prom, how much you want a deposit. Then it should add on top of their available balance that the total Italy should be destroyed to the customer. Fourth option, it means then issued, come out after program. Okay, so, uh, let's get started with the program 26. Project 2)ATM Project Using a C Program: hi. Guys will come back, actually, before jumping into the ADM similar program, we will discuss about six shipments because this is one of the important concept of which we're going to use in the program. Okay, So, uh, first of all, what is the switch statement? OK, a suit shipment as the value of a variable case matches found a block off statements associated with that particular cases executed. Okay, so, uh, this is the basic syntax for Sue statement. Okay, So later, Bill, discuss in there with the help of a program. So what happens here is, uh, this expression value will be available. It'd in each case, Okay. For example, if this value is, uh okay, so it'll match with each case here, it will match. Actually, here it is, one. But our values too. So this will This block off court will not be executed. They get you'll come. Okay, this is too. And our expression of two okay, for example, then this particular this block off statements will be executor, and then this baby the help off this break statement, which will come out of this look, Actually, the next sequence of statements will not big cigar direction. Okay, so this how Ah, case such case works. Actually, one more thing. For example, like a mix. I'm king in a very called to fight and they try to check with each case. Really? Like one toe. 34 What orders in guest. The five is not available. Then what to do? It's like after checking all the case values, it will if it is, if that particular case, particular expressions not available than the default block off statements will be execute . So now we will see a small program, uh, to understand more about this pretty program. We're using its Swiss treatment. So here's what I'm doing here is Ah, I have ah, variable within digital type on that. We have internalized X variable with the three value. Okay, So this is a such case which we have discussed in the Would you have discussed jail yet? So switch than the expression. Then they'll be different cases on deliberate default block. It's OK. So, uh, here, if you see here, I'm just going to pass the values. Three. So which means by right this block off statements would be printed and with the help of break, It will come out of this. Look. Okay, so in case if we're not not able to find any off the match okay, then the blood, the default broke off. Statements will be executed. So here's what happens is this since exist three. This particular statement will be exuded and it will come out of this program. So the next block off for quarter, not because good are are the next statement will not be executor won this match. This match was formed. Okay, so we looks good this program and see what happens. Expel history. And it was tryingto this values getting past year the switch statement and it was trying to match with each case. So case in this case, one for three is not a called toe one. So this will not be executed again. Case toe. So too, it's not called the three, So this will not be executed. So case three is matching with three. So this particular Birkoff statements will be has been executed. What we can do is we will try toe change the value, but it's not available here. So if if it's not matching with any of the case, then the deferred block off treatment has to be execute a case one not matching gets Do not matching K Street. Not matching. So the D four block off statements has been executed, which was a number not match with any case. So that's how the such case works, actually, So now we will jump into the ADM such program and see Hi, guys will come back in the illustration. We have seen about such case. We have seen what is the same backs. And we already discussed the abortion statement using a small such program on No. Here. We're going to write a team simulator using such case. Okay, so the logic We already discussed the project logic. We already discussed in the daily lesson. So way can see. We'll see now how we can include those logic in the program in the sea program. Okay, so here what I'm doing is this assertion is our enter five. Since I'm going to I mean they will be to function is the main function the second? The 2nd 1 is 18 transaction. There is one more using, uh, different function, which I'm going to use here. Andi here. This other variables I have declared with the indigenous type, you may have a cushion. How come? Like every time we include this valuables inside the main function or inside, uh, use a different function. But here, if you see how declared about main function. Okay, so please note if you're declaring any variable abo main function, okay, This are called as the global vegetables. Okay. Which means our this global variable can be used in on any of the any of the functions which is Richard available in this program. Okay, So, for example, there are 10 functions. Okay, this variable can be used in all the 10 functions. Okay, so that's what is called it's called. That's a global available, you know, need to declare in each and every function separately. So she is offering an option called Global Variable. Very few. If you declare a about the main function on this particular variable can be using any of them some functions below. Okay, so this had ah, uh, this variable I have declared with the indigenous type, and I have one more. Ah, variable with double dare Attack on demonstrates the value s 1000. Okay, This is the first thing what happens? It's like incredible chemistry. So here also I'm doing the same thing. When when we execute this program this a team similar to using C programming from the it will display this will come to X rays, That bank then it'll I don't from for the pain which we discussed dearly. The first thing is it will it will run for the so here I'm just for the test purpose. I'm just giving the values. 1234 So if the pain is 1234 Okay, the Penis want to 34? Then this court will be executive else. This will be accepted. Ok, here I protest nautical. Which means if pin value, I'm capturing the value here at the wrong time. And if this is not equal to 1234 which means it will try to compare with the 25th. This is not equal. Not this is not. This is not equal to 1234 Then this. This message will be print average My story. Your Britney's room. Please try again with the car. Okay. You feel discouraged. I mean, if this is true, then this particular function will be called this else. It'll state when you will be executed again. Repeating if been isn article to this one. That means it is false. So which means this particular statement will be executive. This will be printed to the customer. But if this pain is correct, then the else block will be executive Very. Which means in which it will call the A team transaction function. Okay, So what's happening in this 18 transaction function? Okay, so we discussed as we discussed earlier. Uh, that is what we had discussed early, right? We're like, opinions current. Then this particular options should be displaying. Okay, so that's what they do. That's what we're doing here, actually. So if the bin is correct, if if the pennies wrong, this is belligerent artifice, current dysfunction will be executed. Dysfunction will be called on in this function. What happens is when even this function is getting called. It will. It will print in the sea. Conservatives. Four options, actually. So what? What operations? What particular task the customer want to do? What particular more? Ah, transaction with the customer wanted. For example, that is a balance inquiry. A cash withdrawal deposit, cash are he won't exit from the program. Okay, so this four options will you prompted to the customer, for example. Okay, this four particular options have returned the logic in four different cases. Okay, in the in one such case, in one switch statement I have returned. Four cases are the case. One is for the balance in Corrie. Case to is for the cash withdrawal guest threes for the that Plus it Onda case for or default statement. I put it as like, uh uh, thank you for using it. Absorbency, maybe meaning that when the customer pressed the foot option, it will try to match with each case. And there there's no food case so that everybody Ford, it will come to the before. Uh, case and it'll eggs good. The block off statement. Okay. Um so this how it, uh, this how have designed it, actually, So we will try toe go line by line for each case. Okay, So what we have discussed earlier is like, for example, if the customers, like adoption, is one we need to display their balance. Okay, so here it'll prompt the customer. Your I mean guests. When the customer messaged one I mean, a kid in one. It will show the balance like this balance. Currently, Ancestors 1000. Okay, it's just printing. Here. Here is the balance. Okay. I mean, have inch lasers 1000. OK, so no. So after this, what you want, what will happen is like, uh, still the customer needs to prosecute, right? So I have written one more. Ah, print of statement here. So press want to proceed. That's true to exit. Okay, So press if the customer pressed one, it means they're going to call the idiom transaction function. Okay, So, for example, like if the customer press two say to come out off the it will come out of this look. Okay. So for example, if you want to continue with another option that Castro there are deposits. So I'm giving an option to the customer. Like whether I mean, you can press one or two we know in order to proceed further. Okay. For example, the customer press one. Then I'm putting one motive condition here. If a distant second transaction is called the one, then again till called a different section function. Okay, So if it calls again, then again, the four options really? But he spent the customer. Okay, So, for example, the in the in the second row, Dean, He fi press two. Okay, so it again, it will try to match with each case case when it's not measured. This will not be executed. So it will come to case to which is with trouble. Okay, so in withdrawal what? We discussed the A series. We need toe prom for the amount of how much money wanted to drop. So it'll prompt for the little art class for the amount of withdrawal. So we need catching this very with the help of scan function on what I'm doing here is like , if I'm comparing this, uh, I want, uh, no, with the balance against the balances 1000. Okay, I haven't told it balances stores. Okay, So if the Ammon record stories 500 or if it is less than balance amount, then will print this message, for example, if the customer key gate in the moment as finder dollars. Okay, so it will be captured in this very but on. I'm comparing this value with the actual balanced balances 1000 which means the customer can withdraw until $999 sexually. Okay, so if until $1000.300,000 dollars he committed. Okay, so I put us in a less than or equal to balance. Okay, So for example, for these 1008 or 900 it will try to see See whether this is less article to the balance amount. Then we will print them a serious risk electing cash. Then what we do. It's like that particular amount. Whatever he keyed in that will be subtracted with the actual balance. And it will be captured, the balance variable on. We're really spring to the customer that is available balance, which you have after debuting the I want. Okay, so after the trouble is the balance amount which he happiness or contact Anybody expected the customer. Okay, so after that again will problem this services to the customer whether you want to proceed or not. If you want to proceed further, for example, the custom presidents one again to say can function will be called Ana. I am again. This four options will ever dispute to the customer. Now, if he select three option, then it will come. So this particular deposit case Okay, then this block off case will be executed. Okay, So, uh, then when he wanted the post it and wanted to prom for this amount started, it'll prompt for the this message, please enter amount about a positive. Then we were capturing that particular amount with the purpose can function. So whatever we have captured, that particular variable amount will be added to the balance. Okay, so the balance sees, for example, 1000. Okay. 1000 plus, for example, like if he want Oh, ah, deposit around the $500 for example. Okay, So that will be added with the actual balance, then the this variable content of full balance and kills, But the spirit of the customer, this is the, uh, new balance after depositing the, uh, amount. Okay. So again, um, it'll prompt, uh, the user, whether you want to continue or not way have already seen all the three function at three more. That's right. We have seen a withdrawal. We have seen the Dubois said we have seen the balance and curry. So after that, like the ones the customer press to, it will come out of this Look. Okay, so this how it works, Actually, again, I'm repeating this program. So I have a function prototype. Hey, this is their different which we discussed her function prototype way. We're informing the compiler. The definition will come down the line. This program is that the global very best, which you're going to use in the the main function this function. This is a global variable under which we have said the amount of 1000 or less like this is available balance which the customer can customers having No. Okay, so as usual, the program legs good from the main function. So this will be prompted to the customer. When, when we exit this program, it will tell Welcome to this bank and it plans for the pain First spring can opinions in current than this message will prompter is the pin is wrong than this particular message Julie printed of the Penis cut of this ADM transaction function will be caught. Okay, so in this what? We're going to these We're going to show for particular options to the customer. Okay, for about adoption balance and very cash withdrawal deposit cast on before it will be exit from the customer passport, it will exit from this program. Okay, So if on this particle each particular options, each particular options on how ah returned the logic in different each case actually using the system meant okay, so statement we all discussed. Okay. Is this a statement? So there'll be three kids associate one cases for the balance and curry. OK, It's the second cases for the cash withdrawal. On the third case will be further deposit. Okay. For example, the customer message Just one. So which means that it will try this particular very but will capture the value from the customer. And they tried toe such title match with each case. He had one missed. This is matching So this block off court will be executed in which what happens is like it from this message like this is available balance. Several balance with 9000 will be shown. And does he cancer to the customer? Okay, then it lasts for the they will be one more. I said you will prompt the customer in order to continue for that. If the customer press one then I have one more logic here. Then against Calder intemperance section function. If we destroyed, then it'll come out of this look. Okay, so if if If, for example, like if he pressed one, then this will be executed again before option will be shown to the customer. Suppose if he if he presto then again during a suitcase will try to match with each case than this catch cases matched. Then this block off shipment will be executed again to last for the amount. How much? Ammon? Hey, want to withdraw that? I won't. He little captured the scan function, and we were comparing that I mourned with the $1000. And if the federal amount of itchy skin. But the customer is less than the available balance, then and then we should really printed Mrs Carpets collecting cash, then the particular amount. Uh, that particular amount will be subtracted from the actual balance and the remaining balance will be shown to the customer. Okay, So again, I'm asking the customer that whether you want to continue our exit So if the customer press one, then again this four options will be discredited. Customer. Now, if you blustery, then it will come to the case three, because it's matching with the history there needed problems. This message to the customer. How much and what you want. Oh, deposit. Then the it will be added with the actual balance. And actually, the final balance will be sure that the customer is the new balance after addict deposited amount. Okay, so after that, when the when the prayer customer press uh, one again here. Then again, the this particular options will be shown with the customer press two. It'll exit from this program. Okay, so in case the customer press four or five order days, then it will try to match with Case three. Case's toe case one. They say it will not matter. The default, uh, block of shipment will be executed. It's prompting this message will come to express that bank a zit problems in the intimation and in the dimensional it last for the European. So here also hate him similar to its asking for the pin Now. So here I'm living with 1234 I. So I'm getting in the current pain 34 c. So it validated. Ah, this relation successful now So does that's right. Like this particular ah, function is quite now. So Okay, So since this function is called this particle options are displayed to the customer. So here on what I'm doing his first time. I'm king in the early off one. So you seem the balance seeing showing as your balances 1000. Um, $1000. Okay, so which means this scored was executed correctly. Okay, so here I said, that's 1000. So it's showing us 1000. Okay, Just got it. So now, again, do you want to perform other than times under the crime section? And pressing is one lecturing. So it'll compared with this and again to call them, Uh hmm. Transaction function. So see what happens. See, again a message. Years one. So it's compared with this variable, and since it's got Okay, So I mentioned to here. So what it does is this particle to value will be captured you on. They try to match with each case, which means the balance and critical failed because it's too. So this is too. It's how I have a kid in the option option called to which is cash withdrawal. So when a kid in tow, it will capture the value here, too, that this will pass to the search statement on Detroit too much with each case or two is not matching with this, so this will not be security. Then it will come here then to its matching with this choice. So this block off court will be executed. So it's asking for the raise asking please and drum onto a drop. Is our moon present remote withdraw? Since my balances 1000 I'm just king in US 400 which I want to withdraw, so please collect your So what is happening is this finder's. There's an article to balance, which is 1000 so condition is too. So that's where is probably dismisses place collecting cash. Please correct your cash and it's prompting the available balance, which means a leaders 1000 on, uh, balances 1000 minus. I want to withdraw beach. I mean, we change. Leading to find risottos and minus 500 is the balance. And what is 400 which will be saved in the balance variable. And this balance variable eyes displaying the value here, the balance somewhat here, which means it's getting printed here. Okay, so your available balance is balance. This particular variable amount, which is 400. Okay, So again, um, it's prompting me a message. Do you want to perform on the transaction. Which this What did this particular the statements getting is good to know again. I'll press one to proceed further. Okay, so we have computer balancing career computer cash withdrawal. Now, I will do the prosecution, get corruption. So if this condition is to, uh, this will be executive. Right? So this card is good to know that we get the datum transaction options. So, uh, getting to spend no help. Astorino. So So what happens here is three is getting captured. So this three valleys getting past year and is trying to match In each case, the case one is not matched. History is not matched. Case three. It's matched because the value which are mentioned three three is matching with history. Okay, so that expections getting matched. So this particular block off court will be executed now. So that's why is asking, please, and I want to deposit. Please enter amount capacity. Okay, so now I will mention that 600 for example. Uh, okay. Don't $500 then I'm depositing $600. Okay. 500 plastic center. It stows 100 which is correct. So that's what you see here. Um I wanted a positive eccentric balances 500. Um, so that's why, uh McCarty. So I'm going to capacities, uh, 600 balances find, and no. So that's why it's 1000 100. Okay, so that's showing. Issuing the message. Thanks for depositing your new balance. Is this one. So thanks were reportedly your new balance's this one. Okay, which makes this balance where you will have the addition off amount to deposit. Value placed, available. Balance. Okay, I will. Balance was for handed. Then They knew the positive minto was six centers. So 1000 100 desert bandits knows that's what he printed here. So now than on the are tried all the options. So I will press. I don't want to continue. Know, for example, like, ok, I assume that a film under continual again press one no help receptionist for Okay, So I pressed options for no thanks for using a team services. So this message was printed a four block because Ford is not available in any of the kiss, because case one is a case to the cases that gets what I have not mentioned. So it tried to match with each case. It's not imagine Sunday, so the default block off court has been executed. Uh, this is how we can use a su state mental C program. Also, we have discussed about, uh, project, and also we have developed It's a team simulator using a C program. Okay, so thanks for watching. I'll get you guys in the next session.