C Language for Absolute Beginners | Dilip Krishna | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

C Language for Absolute Beginners

teacher avatar Dilip Krishna

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

26 Lessons (1h 38m)
    • 1. C Overview

    • 2. Environment

    • 3. Set Up Environment

    • 4. Program on Basic Syntax

    • 5. Data Types & Variables

    • 6. Program to Add Two Numbers

    • 7. Operators

    • 8. Program on Operators

    • 9. Constants

    • 10. Understanding Decision Making

    • 11. Program on If statement

    • 12. Program on If else statement

    • 13. Program on nested If statement

    • 14. Program on switch statement

    • 15. Understanding for , while , do while

    • 16. Program on For Loop

    • 17. Program on do While Loop

    • 18. Program on While Loop

    • 19. Understanding Functions

    • 20. Understanding Arrays

    • 21. Store values in array & Display their sum

    • 22. Calculate no.of Vowels in a Word

    • 23. Understanding Strings

    • 24. Understanding Structures & Unions

    • 25. Program for Structures

    • 26. Program for Unions

  • --
  • 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

This course will teach you to understand C language basics and Advanced concepts. It will improve your problem solving skills and teach you the art of coding.

Meet Your Teacher

Hi there, I am a Web Designer and Developer. Proficient in designing from wireframe to End-User Applications. My skills reside both in using tools to create designs and writing code to develop live applications.


Follow me and Learn cool designing courses. I will be posting classes every week whether it be a bite-sized tutorial or a complete guide that you can learn and improve your skills. If you want something, in particular, feel free to contact me at [email protected]

See full profile

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.

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. C Overview: Hello. Welcome to see language for absolute beginners. If you are starting to learn programming, this is a great opportunity. So without any delay, let's get started. First of all, let's get an overview off C language and dive into the court. The language is developed by Dennis Ritchie in 1972 at Bella. Later, many people have contributed for its growth, but he was the 1st 1 It is a general purpose, high level language. It means it is close to human language, which enables programmers to understand cold written by some other person. After all, why why? We need to learn this language? Because it is easy to learn Not only that, if you can learn C language, you can learn any of the language in very less time. As every other programming language derives, Features from C Language sees also called structured language. In order to solve a large problem. C language divides the problem into smaller modules, school functions, and it takes a step by step approach. It is also efficient and portable because it can run fast and you can write a C program for any platform that has a C compiler as they already certain see programs run very fast and which is why it is mostly used and adapted. See programs are generally used. Instance development and the applications range from simple texture levels through the databases, which are listed below. 2. Environment: all right. If you want to set up your wandering for C language, you need these to software tools, extra leader and a C compiler. A text editor will be used to write C programs. You can use anyone you want, like, nor pad Rupert Trespass via school, Adam and sublime. No matter what I would say today you have using, make sure that you're saving every file with Dottie. Extension is as basic as it can for our trattorias. We're going to use V. S. Cole is a lightweight Iger developed by Microsoft on the next one. See Combat. Why do we need see combo? Because cordwood and insource find human readable for your program goods to be compiled into machine language so that you, Cebu, and actually execute the program instructions. I'm providing you sources for compiler and you can easier Don't Laurette. And in next radio we're going toe actually set up our enjoyment for securing see paragraphs 3. Set Up Environment: Okay, now we're going to actually set up over in government for executing. See programs you were going to use. Result Studio cold. There's a first Hey, Donald. The Donald Little windows. So come here and hit the arrow and you see different software for different operating systems and sell it the one which is actually suits you This. Stop, Aleppo. I'm sitting on a single system, so I have already downloaded having the software. And if you opened installer, it will show you scream like this. No hit. Next we should reaction agreement Next hit next and again next. Greeted to stop icon Because I don't want to search my business story According vaginal opening. I want this crop icon City one My this stops and now you stop. I'm not going to do this because I have already installed visuals to recall. But make sure you didn't start and complete the process. And I'm going to cancel this. Yes, in connection, we're going to download a compiler, but considering see paragraphs so he don't know here it's going to go work. The software that is in this city for was complaining, but I'm not going to do this because I have already downloaded a C compiler before. So here is a software you solved. You can do it says application is already start. If you haven't installed C compiler already, you may continue and you go to the next one which I'm going to see. Sure. Here is a little good basic center. And you see here I have set up on those guys. And how do you said this right ticket and mark for installation. I have over install it so doesn't sure it's Listen a great girl after you said that all the guys or do installation and get apply changes and it could pop up another window. And naturally he applied the truth. And then it will take some time installing all the files and then we finish this. It's a installation and another study the file where you have strong see combined and we have to copy this part, Korpi. And no, you do the control panel then or were even we have a You see, I have already considered the spot. So what do you use? No. And is the path off what? We have company before? And Okay, I'm going to delete because I have already computing. Okay. Okay. Now, after you have done testing took a buy and then people okay and cools. And if you can open comment from and he gcc dash motion Crucial six point lead. This is the latest push in making a decision. And if you haven't strong currently, this is what? The message in the sea. Thank you, guys. I hope you have been it. All right. Next radio. We're goingto exude a sample see program that should 4. Program on Basic Syntax: it's. And now they actually executed program and see the reasons before we do anything. Reasons to call you Putin's extensions much. See also this. That's stations and the mother is Who Cool Hsuehshan one and easy. Quite some bones. So three. Who's this? The program That way we have seen previously. So why's the pre processed by the main function The common all fires must receive God's extension. I'm going to see, um, boost. Are you going to, Let's see is displayed because I in this play button lets anyone that simple that it's Stinson's. So we set up all along and you have so you can see the logo out. No school. So this is a and a big video for dosing you right foot? 5. Data Types & Variables: Now we're going to discuss about data types and variables. Dead arrives to remind the type of data that we're using. It means we have different types of data, like characters and for Bates words, and you teach your values decimal values. So we use different dead arrives, toe store, each kind of value, and you can see in the table. Character can hold data between the range minus 1 28 1 27 while in danger can store rallies between minus 3 to 768 Country Co. 767 and long can really hold large value, and the blush to float and double can hold dismal rise like, for example, value off pipe 3.14 and so on. So these are the different types off better that we can store in C language and the next. He's very because I really believe in nothing but a name given for a story. It's area that our programs can use. Basically, it means the story number 30 and you want to add value. Coupet. We want to specify the value 30 and add cookie for that purpose. We use labels. They're through rules on how to create available. The 1st 1 is we can only use letters, visits and then under school. We cannot use any special character except underscore. The second room is we must begin a really blue a letter or in the school vehicle, choose even digits to begin a variable and third rule is upper case and lower case letters on street. For example, if we create available with uppercase year and another variable with lower Casey, we cannot say those two are saying, even though English language moves to our same but in R C language. Those who are different because here, upper case and lower case a state and the last one is keywords Card used for really believes. What are keywords? That's what we're really what we're going to see now. The table here lister was 32 key words. Keywords can also be said It's deserve words, which means these words have a specific meaning with respect our language so we can't use these keywords anywhere else in our programs because that would violate the rules and the meaning off these keywords. So the as we said, keywords can be used as Mary blames. We have already seen some of these, like in return care double float, and we're going to see all of them in the coming videos. So make sure you follow those rules toe creative able. In the next days, we're going to see how to create available. Actually, so we create available by defining its type and establishing a name. Great the former Lee's first satisfy the data right and next given name to variable. You can see examples here in I cash See double the long float ESTs so in is a dead pipe and I is the very blame. Similarly for all of rest before, it is not necessary that we usually a single lecture, available name we can use even words. It doesn't it doesn't rescript us toe what kind of name we put on very blame. But we have to follow the rules aside before so here I see the love are very blames and the prefixes day arrives. So that's all for now. In the next coming video, we're going to see a basic addition program that we're going to space be able to give our values, and we're going to return the result off adding those values. That's all for now. Thank you 6. Program to Add Two Numbers: Now we're going toe. Write a program that takes two members from the user and displaced. It's risen off, adding those two numbers. So let's begin to write the program. As we have seen in the business in Tax, the programme structures. The first line is about pre process commands, boy, and next is main function. This is where all execution begins. Okay? Now we are going to take tune and best from the user, so they need to variables. So first, Mabel and second all right. No, we need to check them. We have defined the variables. We have to individual variables first and seconds. Now we have to actually take the include scan takes the in Good. So I'm going to explain dysfunction now scan off like we have seen. Pretty tough. Displaced it out. Cannot receives the include. So we're going to take two numbers. So person D person D coma First homer second. So this line takes two digit values as input. Let me explain this more details. Person B is a format specified. What I mean by that is former space for takes the value from the user and do indicates that person he is digital value. You cannot input some other value instead of injure in this place. So this this fight, what format input should be And next I m Busan first more Today we're going to discuss the only book, Amberson, because first is the very and percent it no kids, the address off storage area and we have discussed previously that variable identifies the storage area off a program very boots. So hand person first actually takes the address with variable is located and its toes the input into first. So that's all in this line. So no, we need to displayed risen to the user. So for that, we take another available. That is some Is it cold? What is the formal off? Right into numbers? First number plus second number first bless. Second, make sure that you in each line inside the function, every segment inside the function machine with the same call. So now we have some. So now we need to display to the user again. Person D coma some. So you should see to distance imprint death and scandalous is that the variable name is preceded by M Person. This can off on the print if the very believe is Britain simply the difference is scan of takes, the input from the user and stores in the address. So am percent trees the address of the variable but print if they actually displaced value . So we don't need to use an person for giving value, it is only for address. So now the end of the program is written statement. So we have finished the program. Let's save it. So we're going to see if he says in addition dot c You can see now all those keywords are turning into colors. So now we need to hit this burger with you on the court is actually extensions on determinants. And so now Yeah, so then said 45. Five dancers, 60. You see that some day? 7. Operators: Now we're going to discuss our operators water. He's a Sumer compiler, so there are different kinds over its very relational Raj beak wise sign forces on it. He's a This is a busy man. Additions a fraction with application division list gives finder off intimate and you can see you East perform. They're introduced, but it's these are very businessman Or did you see the last offers inquiry? These who are significant importance. This this school in your future and bickering in minus wetness is going to reduce about your friend, who the's are recorders now relational. It's being opportunistic. Values. Poor form abuse are used toe in. Defy relation between two months equals less than or equal credit. You can see Go right call off the giver. He's over our egos for these same things. All the doctor This work Knicks are dio Crafar operations, but these you can see one. See you being Sofyan Be the first is logical end up so he could been four. Values are on. He's surgery next year. You are so they dis operatives. Yes, here you lost during these fault, but it's more in Fergie's large large its condition toe through next year Because it's these perform operations on the so being que so you can see Lord and Prudence one when you walked off the So why your cue operation? This is for right. Be. And you, eagle over it as you want. And it's so you last is so this operative evidence you want bank, he in Cuba, boards have different rights. So these are requests last. These same doctor you are saying about you? Yeah. You You said the move video. How to use this? Oh, you're the core. Used these operators. Let's 8. Program on Operators: here is the program that we're going to discuss about operators in this program. We have used all the operators that we have discussed before All the operators a red medical polluters, relational operators, logical operators and plays operators. Of course, the sentiment operatives use the core pictures. So we're going to see how this program is going to show results. So here is the 1st 1 This is edition on the next subtraction. Multiplication here restored the value of division in another variable. Just for this is we have stored just for differentiating division and reminder here that so that we can see the difference between the results an increment de crimen relational operators and no. Here you can see logical operators. We have changed the value of fiend beat one and zero so that we can actually see the result of what happens when the values of zero and one instead of 10 and 20. So even from between operatives, we have satisfied the team, be willing, the value one and we will be holding the values eel. So at the end, we have again the written statement, which is the end off our program. So let's see what happens when we run the program. So here is our put. Let me zoom it so that you can see clearly So So you see the 1st 1 APIs bees 30 minus humanise beast My distain The next 200 So on so forth You can observe each value after it has performed its operation in the last eggs. Or be so This is a court that we have written just brew fourscore just using the operators on to wearables and dis using the operator on two variables and observing the result. This is an example of abuse operators at demo video on how to use our protest. So the next video we're going to introduce decision making in programs like Ward be able to do in a certain condition appears what we're going to do when a certain condition does not appear. So let's go forward 9. Constants: All right. Now we're going to discuss about the topic. Constance Water Constance lets you Constand's. There are nothing but sits values vitrines. These are like regular variables, but the value off these Constance cannot be changed. Your execution did. Also called as little so constant. Nothing defendant regular variables except that they cannot be changed then so fits to doing the entire program Execution. And how do you define Constance? So there, two ways using has defined. So secondly, is using cost. So design and cause are used required constants this pacing through the difference. So let's see an example So far, every program stop the crew process commands here we're going to the final constant coincidence First met using has defined defined variable name So these are nothing but constant variable. So we have to do a name. We're not going to define our dead guy because has defined freezes from especially in the data and we want you. And the second is to use const here. But here, being deported very well and we need to do we'll assign value to. So we're going to do science mutual that you could sing calling at the end of corn statement. No, you're going to to the values for. And so if anyone is confused with water back session and used for new life betweens every time back slash and encountered in from death it quickly Prince the rest of the statements after the backs lesson in the new life, we're going to see the program institution. So let's no change value off in a hurry consisting. So you didn't see the red lines here generating some ever the program. If you over the long it Chelsea expression must be mortified value modifiable ever you teens, the left l valuations left the left hand side must be a modest idea, whereas end and then our constant. So they're not more so Let's everywhere the execution is not going so any screen calls and editor. But anyway, we're just putting statement here zooming that it's going to work at the end. You're going to finish. So we're going to see our program as Hawn stand dogs. Okay, please. So, no, let's program you see here it shows El where you required as left corporate office on you assignment off really living. You see, these are constants. They cannot be chains inside the program. He's be coming, designs all on the program distribution and see the game and run the program you see on backs Nash in here. You see, though, this this year and then it's 20 and is 10 discord because we're coming revisions and changes. You see the back session here, which is what creates new lines, operational M and N value. Pretty so new wine creates. Bring Stevie Cursor to the next line so the rest of the characters happened. You like, printed below the previous it's and he sees for Constand's The next video we're going to discuss about operates thank you. 10. Understanding Decision Making: We're going to introduce decision making of programs so different kind of situations. We have to make different decisions. So they have to write a programs intelligently so that it is just itself according to the need. So let's get ahead. We make decisions by relegating one or more conditions to a the crew or force. It's just simple as how VM additions. If the condition is true, we take certain action. If there's a Paul's, we take another action. It is a simple for C programs to make decisions. C Language provides us with four different type of statements that help us to make decisions. The first is if statement and the second is if else statement. Third is next release statement and the fourth is switch statement. Let's get an overview of all of these. Four. First is a statement. You see the format off your statement. If a condition is true, the condition is placed inside the parenthesis. If it is true, the statements inside the East block are executed. If this fault they're not executed, that is so simple. The defense statement is the condition inside the the condition is true. The statements inside the bloc are executed and if it is false, the condition side else treatment are executed. You see, we know it is a small difference between the if statement refill statement. The only difference is l statements In the previous If there is a false condition, we do nothing but here. If the conditions falls, we execute a certain statement inside else. Block the next. He's nested of statement. You see, here we have cool. If one is nested inside on leather here, we have to make sure that if two off the conditions are satisfied, then our statements are going to be executed. If any of them is not value did to crew, then we're not going to scrutiny. Shipments. You see, the process is the first condition. The first kind decision evaluated and if it is true, comes inside, and it again evaluates the second condition. If the second condition is also true, then it executes the statements in this linear process. If any of the condition is falls, statements are not executed right? The last is switch statement. There is a small difference between how switch and if statements, if else statements and necessary statements operate the differences switch statement has an expression. If the illiterates and expression introduces certain value, and if you see the format, it has constant expression. After every case, we have only two cases written here, but we can have as many number of cases we can list. So if the value evaluated from the expression matches with any of the constant expression for any case, then those statements inside that case are executed. And if it doesn't match with any off those kids constant expressions, the default block statements are executed. That is how switch statement works. Let's write programs that make actually listens and give us the result based around those additions, so let's get ahead. 11. Program on If statement: Okay, Now we're going to write a program that demonstrates how if statements work. So we have a problem statement here. The question is, if a number is less than 10 we pre PS. There is a simple question. We re wired a program, the takes and input from user. And if it is, the input is less than 10 different. Yes, that is always do. So let's write the program. First of all, three Jesse sheep means now. Now we need to create available that store still between uses. Thanks. No, we have actually pig. No. We need to check with the people that we have. Story next. Zest in pen. So right is look you France's eggs possessed then then then pruned. Yes. Make sure then you you didn't state. Now see if the foreground No. Remember that you want I'm going to do seven? Yes, Yes, because existing him. And if you run it again and I'm going to chicken by giving 77 and it doesn't nothing prince , Nothing Because we have said the pictures listing them You're going to print? Yes, but it is excess. Something else, you know. So did his are for the state 12. Program on If else statement: she be having? The bush she's remember is even then print even trees, forest green dot young. There you have numbers. Which evening in all, there's a small we'll know that. What demands number do you? Which number? He's computer divided by two. Then you can see just you. So let's say 10 divided by do results. Zero reminder. So these But if the divide fly by too, it results in one as a reminder. So it is all Well, whatever you number you take this is saying so we need to be reminded Mind off the member that is received anything it's him have. If you remember the class on operatives, we have a special preacher. The Britons reminder that is what marginalise operator Jews do you mind? All beach? So we're going to use this operator here chick whether numerous, even or more so simply weaken right 10 12 this is zero. Geez, even these are so let's write people that see as program process demands. Now we need to take any you we have now. So now you need chick. What we have taken isn't even a lot we going toe right x more to actually zeal. Then spring. Even it's not. Oh, we got zero. So let's run the program Fly under each. You couldn't see it because A is even very good. Now I'm going to live. The currents are you see how is and that is worth what we see Statements. 13. Program on nested If statement: Now we're going to see ministrations. You see, the pushing number is less than 40 and greater than 10. Yes, so we had to conditions here. One, It is destined 40 the second. It is quieter than 10. So let's forget. Forget commands. And now you need a bigger input from the use course. You need to check that there is less than exodus then. Now you chicken. It is greater than 10 eggs. He's gin knowledge. Yes, that's weak. Our do nothing remember is anything else that said it's visible traditions. See, we're going to remember Agent, doesn't it? Now we give religion students. Yes, because 15 is less than police and greater than 10. So I hope that I understood What is you want, Mr Student, you can check as only conditions that we can increase invested if, as when you warm 14. Program on switch statement: we have a Christian problem. The questions you have to breathe day according to the number and the number. And they have June here. One is sending to his Monday three Tuesday, four witnesses, five personally seats Friday and seven said it. So it's obvious that we were taken in a press member and his number not just any off those number Sister. In the push in, we're going to prove the name of the day that he's Britain, these equal student. So it it is not true. No. And we have to Right sweets did. Which dividing your expression. Now we work Qwest's because seven cases here still need you, right? Seven cases Excuse one we like to print Sunday. Great. Sure, you great after every case to me is not competitive institution, but it's good practice. Two. Good break after the case queues four You and now London Program B. I'm leading forces use Written it. Let's see where it Majesty push Yes, for his weirdness, Larger Game one one. Send it. Practicing these statements, we developed the habit of writing good programs according to different situations. So a sadistic to practice on different kind of questions. And that's all for now. Let's get into the next lesson 15. Understanding for , while , do while: Okay, now we're going to discuss about lose what I lose. Groups are the statements that help us toe run a block off another statements more than one time. See, we can come to some type of situations where we need to run a blocos treatments war than one time. If you remember in the first picture I had said C programming language is a structure language. What I'm in the day execution is done linearly one line after one way. But we have the freedom great programs that convinced statements several times, depending on our need. So the types in writing groups are for a while. Do I so without any delay, let's get right into those. The first is forward if you will see the syntax. The for loop has three statements inside parents is the forest is initialization. The second is condition and the third is increments. What are these variables? Michelle Addition is a step where it is a particular first and only once before every game the furrow is executed. This step is the 1st 1 to be executed. The beginning off for Luke execution initialization is executed first and only once. This step will allow you to create no control variables. These Vabres are going to decide. In Red State, the loop is executed. The condition It is a statement which is usedto deter mined whether the execution has to continue or has to be terminated. So condition is a statement like statement inside of you. But here we write the condition inside the for so when the condition is true, they look continues to execute anybody and then it is falls. The loop terminates the last in increments. The increment, said statement. The increments statement allows you to update the group control variables. So the first of initialized, the very book and then we're going to check the condition is true or not, and then because two were going toe, execute the statements and then our look control variable is goingto be updated and a greater variable is going to be checked the condition again and the condition instead. Each time the contra available is abated and execution is continued only if the condition is schools. If the condition results in falls, the loop current rates and the next he's while it is similar to follow. But the way we want the loop is different, re initialized variables outside the violin and the conditions trigged nobody's lived statements. And if the condition is true, the statements are going to be executed and available is going to be income entered, and then the conditions checked again. We've disproved the statements are going to be executed. And if we discover calls, the statements are not going to be executed. And the blue terminates the last is doing this similar tohave violent edge acute. But there is a small difference you've seen. The first step is initialization, and then the do keyword, which tells the compiler toe first execute the statements and then in command Dan tick the condition. So what is the difference? Differences. The while loop checks the condition before it did during the statements, but they do while it's accrued the statements at least one time before taking the condition . So then we want to execute statements even before checking the condition we used doing so. Let's see an example that demonstrates these three loops and make mine clear about how to use group's hotel right then the practical way. Let's get ahead 16. Program on For Loop: All right, let's write programs using news we have discussed for you as the 1st 1 So let's write for Luke. Forced the question. States that great numbers from one book and using for So I have already Everton with the program structure by now. You must be familiar with this the structure of the program. So I'm going to write the CoreLogic that prince the numbers from one cookin. So what we have discussed in the furlough part is we have three country, three statements, initialization condition and increment. And inside the father were going toe like the statement that you have to execute. So let's like the can loop for the initialization part. This is where we quake. Nope. Control variables. They're going to create a new group variable with one because we have to bring them bustem one. So we have to create. We have initialized with one. So then they have toe right the condition. So the question states that we have toe preet numbers from 1 to 10. So when it reaches 10 you must not go beyond the value. So the condition is I must be less than or equal to 10. Because I must be if we have to print number Some one cook in the look on for variable must live between 1 to 10. So we have initialized it with one. And now we put a condition that actually restricts it to less than or equal to 10. Now we're going to incriminate Luke. Control variables. So we have successfully written our loop. But we need toe bring the numbers. So we have to bring the numbers from 1 to 10. So what we do is the are going toe place our printer statement inside the father. So person b is coma. I so disease what you will see in basic for we're going toe Exude this program and see the results by the prince to values from 1 to 10 and big skewed. Yeah, we see the values here 123456 want and can and we have successfully written are for 17. Program on do While Loop: do I hear states the print numbers from and to less than 20. So we're going to take a user in book and you have to print numbers from that value onto me for just 20. So here is a basic program structure and you must be familiar with these two lines right now. And now we're going to write a program that actually prince the value. So what is the structure of dual the initialization party for what happened by taking the include from user? So do in dealings bring the values and no, I'm good devalue off. And until then, it is less than or equal recording. So this is water program is here. The initialization is done, the increment is happening here and the big shoe is happening here. Sure, if you give the include fire the prints from 5 to 10 20 and run it again. We given cook 11 prints from 11 to 20. But if you see here is you run it again. If I give the value twenties, it prints 20 And if I give the value 50 prints 50 Even though the values less than is greater than 20 because the do I look executes the statement before injects the condition. Do you understand? So from this picture we have discussed about the for loops, violent and duels, we must be familiar with these loose by now and the next part we're going to discuss about functions. It is a complex part, and it is a very, very, very important less so let's get her head. 18. Program on While Loop: So here's the question. States that we have toe bring even numbers from 1 to 10 using while so a little bit complex them what we're seeing before and fired. But the door experience We can write this program. Why do way have seen in the wild loom that the initialization happens? I would say the wild. So first quit variable I equals one because we have to print even the most from 1 to 10 to the 1st 21 and and the condition is and the condition is I less than a record 10 because we have arrested the loop and it's interesting about 10. So no, we need to print the numbers that are only even we ever done the program toe pretty even number. If I Lord toe equals zero, then we're going to print the value off I It's not going to do nothing now you have the increment value. So seeing the program and right? Yeah, we see the reason 2468 10. These are don't leaving numbers that lie between one cookin. So we have such a celebrity and violent. You see the initialization and the condition and the increment parts 19. Understanding Functions: Okay, guys, we'll come a long way. We have heard a lot of things and functions is one of the most important part in a programming language. It's the doll in Italy. Let's get into there. Functions are a group of statements that performer cast. What I mean. My dad is, for example, we haven't in a program that prince even bust from one cocaine and Vatican, who that statements the logic off printing even numbers into a special function and use the function anywhere we want. So so this example just fights the second line. You can separate your program in two different functions, so that's it. We can separate a even number logic in main function in different functions. So how do you create a function there? Two steps, declaration and definition declaration is a very to tell the compiler about her function. It is like Rijn type functioning, and Param is This is the syntax for function Declaration Britain data right so written letter I tells what is the dead right off the value that is the turn from the function so vehicle performed. Past functions are used to perform some tests, and the task results in some juice and the past give some missiles so V need to transfer the result from dysfunction to the main conscience. So justice, fame. What kind of prison were returning the need to display that that tape off a result? The second is functionally. If the right five functions in our program, they have given name teach offer so that we can identify each one off its unique ing. We cannot do every function in the same or not even all of the functions can have the same name. So that's it. And the Pam one cools on end are the Paris. These are called former Palomares. You. These are the variables that we're going to send linger program functions for calculations or any purpose so function definition. The difference between decoration and definition is that definition contains the execution statements, the results and for our cast. So it is the actual body off a function were specified, the instructions that must be executed, that these statements are going to be executed and which results in. So that's all we have to create a function. We need to be great. Hey, have defining. But how can we use the function for that, we need to call a function call a function you need to know pious, necessary. Param. It's along with the function. So these parameters are what we has misfired in function, declaration and definition. And when we call a function, it is going to return a value. Definitely. And we need this old the value from in the main function so that you can use There is, um that's how you use the function. So let's see an example and understand what actually functions how actually functions work and how they can be used. Let's get ahead. 20. Understanding Arrays: Okay, guys, this is another advantage. Copy after functions. The topic. We're going to discuss his areas. Ariz are used to store sequences, collection of elements, off seeing data, right? What I mean by that Let's, for example, the story can numbers. You should've varies. Required convertibles you see here. And one and two and three and so on. And 10. So you stuff the hectic task we can create and and put the variable 10 inside square brackets because they're goto stalked and numbers we're going to put tending and it creates narrate A similar to the people that you're seeing Will. And that table is simply called an area. It holes 10 values and how we're going to know it. We can access each off the value by placing the index value in the square brackets. So the ari stops from zero mention the 10 minus want push in line. Usually it full scan values, but the positions remembered from zero whatever number minus one. So this is a very, very, very important data structure. What? I'm in Madeira structure. They we stole the data. It's called data structure. So Aires are very, very according So let's see how we can create Atis beginning at it vehicle variable like didn't number in. And I the similar way this perspired that I didn't and at a name yet about insured off simply closing with similar Colin Weise. Despite the number off elements of the name here we kept 10. Deacon. Could any number the place off? 10 according your need. So how do we initialize another? That means how do we put values into the area? So they're cool. He's one is putting it in a single statement You see G have kept in a year or five is equal . Do and we have placed all of five values in floor brackets. That is how you initialize narry in a single statement. If you want Initializing Harry one by one, which means one element. After one elements, you declare an area, and then Eustis fight the element pushin by using the index value and assigning whatever value you want. A story. But this is the way how restore values, the chills, holy initialized address. So let's see an example program. I'm getting in depth view on how to use Aris 21. Store values in array & Display their sum: Okay, guys, No. We're going to see an example. Programmer. How do you that Chris, the store calculate in do various operations. So let's see your cushion. You've a raise to store five elements and bring this some off all five millions so we can understand on the question that we had to do routines once we need to store five elements into the area and then we have to calculate the sum and bring the result. So here's an example. You are very consists off these numbers as in group, we need to some all those numbers and show the open. So let's see how rude therefore, steps we have stated here and hope to do. First, we have to create an at it. What is the first step? We have clear and at it in numbers off five So way we have created and Ari with five enemies. But now we need to take input off fine members from the user. So we knew that any time we have to be a repetitive tasks, you can use roads, so toe print number someone contend we have used new and you have calculated there isn't the print in members were used notes. You go to one pretend numbers and we have printed the reason the similar way I have already . Tomb Aires are sequin shin elements. So the numbers a store in sequence in order and the index values are used to access dillaman. So holding next, let us operate there a sequin ship 01234 sore In this sequence Shal way there's are going to store developments so they you know they have a sequence on vino. We had to do the same task fight times to store the numbers. So So from that, they're clear that we can use a loop. So far, I equally deal the reason d zero because the Knicks off various parts from you so v initialized. What is the condition? The condition is we have to store invention Draddy and we have the size off five. But I want you to that, Ari. If it is, any number of Philly means it has a capacity from zero to n minus one. So the hair five elements. So the capacity is five. So we have to run a loop from zero to n minus one. Find my next month. It is four less than or equal to four. And it is a secret intial. So when it implemented, so no, I was going to past available 0123 and four So you can use IRS inundates. So, no, we need to stole, then. Good. How did it taken into scanners for Cindy? Um, so we can use it as every variable. Then we know the index. So this is how we're going to store. So this is how we're going to store. All rise. We have finished to take five numbers as importer and storage into that is what is an extra we need to kill. Appeared arisen. Okay. Novel understood that you have arisen. So let's do it available. That holds his result, you know. So we need to calculate values for each off the element. Inari. So again, you need to run a new four. I equals you before I place place. Now you need to some them. So how result is equal Do risen less number. So I So the reason we kept usually less numbers off I is because Zini, his store values so, um well, three years elements. All right, we're bring zero initially because there is a zero initially because it didn't have any of them. But when it comes to add elements, it is going to upgrade its well. So now we're clear that there, if the Lukis exuded successfully Vigoda Bean or is it so the last step is bring dessert. So we have finished all steps. So let's check dancing. So what is so example? We are going to go into the numbers. The opposition's. So this is the way how we use air s create them and whose demeanour programs. So in the next, we're going to see another day restaurant dissimilar to Ari and very, very powerful. Thank you. 22. Calculate no.of Vowels in a Word: Alright, guys, here is an interesting cushion about strengths. You see, it includes from use it in just string and tell a great number off levels in the street. This is the need to taken and started in the stream and inside the stream we have to calm the number of Fullers Here is an example. They have been crest biggest and the count of levels is only two because the screen only a and e I was So let's like the program. The first step is to declare the stream So they're going toe name it does. Let's put name Gen. So I love you need to take it in So there is a special we have taken in very easier. So Ferrari Guinea, we have to run a loop. But for strings you can use a special form red his store. You see that person s usedto taking fungi use it started into the string. All right now we need to convey its for this purpose. They definitely have Ronaldo because they need to check each and individual element of the stream. And I didn't feel I deserve oval or not. So before that, they need toe initialize our isn't available to zero because the first it's normal. So it holds you no wrong variable. So here's the room and 00 I did reuse our symbol here. This is the logical. Are the hair used? We have used this operated. Why? Because if he if one off the conditions is satisfied, the limit is there. So we're kept five conditions and you know that logical Oregon's true is von off. Its value is one. So if any off the condition is pool, that would be true. So he kept logical only to German. And what doesn't women do? Grease is value by one. So each time the conditions side, sister, the value off reason is going to be in committee at the end. They need to bring it isn't so. We have a dinner program. Let's take it well, that that's two of its. And again I'm going to enter Australia. It has five bullets. So this see how will be U strains? It is nothing but inari off parents. So the next and final copy, we're going to see a data structure that it's so different from what we have discussed it now, and it is very insolent 23. Understanding Strings: Alright, guys, Now we're going to discuss you copied streets, No strings. The data structures similar Arie's But it just those cats to see the definition dick and defined as an addi off. Can't this terminated by Melco? What a number that if you see the Blokhin you see index is similar toe address in strength 012345 And the variables silicate them. Hello, g elbow. But the end there is an extra variable is no character there. See, you have discussed in the beginning about generates like we have indigenous double floor long don't camp Which one's evidence? So Aires are watched those all those numbers and then character Ari The stream they're too is initialize and the string just similar to addict. But if you initialize in the second way if you look at the building at the end, this especially kept null character at the end. Now we're going to discuss a briefly about how do you strings and do it Interesting operation. So let's see that 24. Understanding Structures & Unions: no, we're going to discuss about structures and unions. These data structures are similar Toe Aires and strings, but they're little more advance. Let's get an overview off them. Structure did a similar grants, but the differences and it's ello to store collections off, frightens off Same day today, if observed, buries it to declare them as all the elements off Harry must be digit if you detain them as float all the elements off its people. Much structures can school different data rates off collection of elements to see the example below. This strange info is a structure name can hold name it can hold. Remember, you can hold what courses and rolled into it can also hold the economic here. So let's could see the syntax off strictures from defining structure. You must use the keyboard struck. If you see the format you place the struck the world. After that, you give a name. Call your structure and inside the flower braces, that is where you specified a member variables. What I mean by member very was the variables that are going to store the data for See you have this fire a string to starter name you have given a new teacher variable to store, Remember? And we have also created a second string toe store. What courses in Orly and the last to see their kept very so structure. Name is a name guarantor structure, while variable is what they're going to use in our programs. All right, if you if you want the access, remember limits like the name, the room number. If you want to access these members of a structure, you have to use the member or its operating that is dots and it must be placed between the structure variable. And remember, if you see at the envy express for the variable, that is the structure available and the member variable is what the variable has in itself . So if you place it guarding between them, you can access the member elements, the next unions. These are completely same as structures. This does same seem like different data elements extractor, but the difference is union store data, the same memory location. What I mean by that you create different different number of members, but only one of them can hold value at any given time. So if my union has members like name, remember and cools at any given. Then only von Austin can hold a value is if I want to access economics. It's only one member with the value, but in structures at any time I can access any member needs will have a certain value. But that brand is off millions deployed inefficient way off using memory. You defining union is similar. To have you use structure, you specify Julian keyword, then union name in similarly member variables in the last variable that is the Unionville and accessing union members is same as structured, available use member excess operated between the union wearable and liberated. So this the theory or this is the explanation are for structures and units. So let's see. Hung you structures and unions problematical that will. You were clear. Picture off. What? This data structure, sir. And that will be the last licks off our course. Thank you. 25. Program for Structures: All right, guys. Now we're going to write a program on structures. So the question now is we need to store student details and structure, and we have to display them to the user. Let's isn't that we need to store these member very boots name, remember? And here, So the need toe declare a structure that these member variables are in the structure. So let's get into the program. The step one is we need to be clear, the structure we need to declare the structure. So we have to use touch struck here. So my structure name would be student d days. And what I remember, really this mean I presume that my my including Ian, would not be within 10 characters the next It's beautiful number. Then it would be academy care. I'm going to could hear for the super use. So we have finished the first step. We have declared the structure it contains name, remember, Clear as its number variables. Now we need to create very referred the structure itself, so they need to define the structure. So let's do it. So strange days. So is student. So the have created the student video and the next step is the need to store the values for this purpose we're goingto take include from the So Can I. Oh, home. We're going to take it before it's too a person says almost student Dark name You remember we used the daughter operator taxes. Remember, it's the next these it's and in Visa next, he's academic year. So the thing is, the structure you have undertaken from the user and we are going stood in the structure. We finished. Step three. Spirit is to store developments in the final step. Three. Left Cities bring the values far that we're going to use Princess Course in this student dog. Me Bring death student block. Remember Dream Death Strindberg, Karen Gear. So let's satisfy that. These are names there. This is rule number. This is Karen Nick Ear. So let's execute the program. Finished the problem That's from the program. A game John 50,000 night and you see named John remembers 23 Layers 2090. That is great because you have come so far in programming that we have learned that granted concepts, but there's a long way to go from these details. You can write different kind of programs. Fact is, is what makes people perfect. It is, too in programming thing to, so this is what structures up and let's see unions the next really. 26. Program for Unions: between union and structure. So I have already been in the program here. So let's see the problem. The Acosta is to declare the union. You see it is so however, declare a structure. The differences use union instead. Off struck and the Step two were defined union variables on video to union variables because we need to see the difference with structural union. So the the know how union gets operator, but the complainer you can easily find the difference. So we have British to unions observe their difference some Now let's see how What's the difference if you abdel here I have store dingo ass one got name, remember And this is a kind of a que so I'm going to take them for three members and I want the pending good that is given by the user onto the screen off the three members. But then you execute the program. This is going to be the result. The name and the ruling brother going to be empty. The year value is going to be displayed because the same memory location is used each time . So the values have replaced and then the name is then if you see here the name is input into the s one dot name member. But when the remember is good, then then cut off, Remember is treated. The name is going to be replaced by room and then the year is given. The rule number is going to be replaced with years, so we don't have any value off name. And remember, Peter's the only have here. So if we come down to here to see the common here here, v pretty each value because the 1,000,000 memory location is updated so we can observe each value being displayed. So has to got name you take them put and not depending before we see, remember into the number and they take the wrong number and print available even before we taken could last a year and then were taken cut off here and then the Qalandiya. So let's see what happens here. Sorry, dear s too a school investing. So let's see what's going to happen. The first will be John Quality 1090. So let me clear this short program more overt. John 23,009. If you see the it's giving someone sterile value corny. The rule number the same is what they have divining before you. That is because then these values are beating memory location holes into your value and when the real number is being brigade, were going toe. Use the farmer space where for indigent. So it gets the value that is stored in the indigent, and it prints out as the problem. So u V c. The series Kurt. But the other two were used drinker. But if the of the second in Pocono good, I'm going to give the Sanders It's John the Prince depends on If I give him a good quantity column number 23 years old and academy here is also cut. If you have observed the difference, we consider the unions use memory location efficiently to store the last value. The latest value is being stored in the memory location. In spite of the letter type, in spite of whatever you're storing, the latest value is being stored in the union. So if you this states the difference between structures and unions, I hope you got the difference and and carried you to practice more on these concepts that we have discovered discussed so far in our coasts, and this is the last topic. This is the last stop it and we have computer everything that is basic and intermediate in C language. If you want to be more good, etc. Programming practice is what's critical in becoming perfect. So encourage you to be more enthusiastic and practice more. Thank you very much.