I'm David Kirkpatrick. I'm an author and journalist myself and I wrote a book about Facebook and I have a little company called Techonomy which puts on events related to technology and society. And I'm really happy to be here with Jim Glick who's one of the world's great public intellectuals and has been for an extremely long time. He first kind of got on the big picture map with a book called Chaos that really defined this concept of chaos and really put that term and an understanding of it into the public dialogue intellectually on a global level. And what year was that, by the way? Chaos. In the 80s. Yeah, so then just get this guy. When the internet comes along he started one of the first ISPs in New York called the Pipeline, an internet service provider. So he became an entrepreneur after having been an author and it was very successful and he later sold it and then he went back to writing books. I guess he had written another book called Genius about Richard Feynman before getting to Pipeline. Then he wrote a book about Isaac Newton and the order may be wrong but he wrote another book called Faster which is I think definitely a predecessor and related to this one. The subtitle was The Acceleration of Just About Everything. So most recently he's written a book called The Information and what's the subtitle of that now? A History, A Theory, A Flood. Yeah. So what do you mean by a history, a theory, a flood? I didn't think of the subtitle. I didn't come up to the subtitle until well into the book and then I realized that there really were sort of not three sections but three pieces to the story I was trying to tell. It was odd writing a book about information. You've been very kind in listing all those other books. When you're writing a book about Isaac Newton or you're writing a book about Facebook and people ask you what you're writing about, it's pretty, it's easy enough to tell. Not hard to explain. They say, okay, I get it but when I said I was writing a book about information people would either not politely or say, what does that even mean? How can you write a book about information? And yet it felt like the most obvious, the most inevitable of all the topics I've picked because it's such a cliche, it's probably been a cliche since the first of these Davos conferences that we are living in the information age. We all know that. We know that information is valuable. We know that the devices in our pockets that we've all been instructed to turn off are about information fundamentally. And yet in a way I feel that as a species we're a little like fish who have suddenly discovered water. Information has always been our universe and it still is but it's partly invisible to us. And well, so the driving conceit of my book is that it begins with the science that's called information theory and it's a branch of mathematics and engineering as you know that started at a very exact time and place. It started in 1948 with the work of Claude Shannon and American mathematician and engineer. And information theory is where science begins to treat information as a thing. As a thing that you can measure that has a kind of substance, not physical substance, but it's worth studying scientifically. Before that, you know, information was just a vague word. It was stuff. When you have an interesting thing you do where you analogize it to words like energy, which didn't mean anything like the way we think of them until, like, who was the energy guy? Isaac Newton. That's exactly right. Had to redefine the language in order to create a new set of theories. Right. And when I wrote about Isaac Newton I was struck by that. I was a little obsessed by that. That the words, his essential vocabulary, mass, force, these were even gravity. Gravity was an English word that meant something like seriousness. There was no vocabulary for the stuff that he needed to talk about. And as you say, it's the same with energy. Energy just meant something vague and then physicists had to mathematicize it. That happened to information in the middle of the 20th century and our world depends on it. Biology is now an information science. It's a subject of instructions and messages and code. Our body, our bodies are information processors. Memory resides in every cell, not just in our brains. To understand the body, you have to understand signaling by electricity and by chemistry, by chemicals. The quintessential information molecule is the gene. For a four-letter alphabet, six billion bits to form a human being. And it's not an accident. This is part of the story that my book tries to tell, that genetics bloomed in the decade after information theory, even though it wasn't, there was no direct connection between the mathematicians and engineers and the geneticists. The language filtered through. So in other words, the language that had been created for information science helped facilitate the creation of the science of genetics. Absolutely. We think of Watson and Crick making their great discovery of the double helix and if we think of that as discovering a chemical structure, the famous spiral that was on the cover of the news magazines, we're missing the point because what they really discovered was a code. And in the decade after they discovered the double helix, all of the work of this new revolutionary science of molecular biology was based on trying to decipher the code. We might casually think that code is a metaphor, is just an analogy, but it's not. Genes are literally a code. They encode the formation of proteins and they encode various kinds of functions. I was at a terrific session yesterday called Deciphering Data, an ideas lab here that had a geneticist that was sponsored by Brown University. Were any of you here? And an archeologist and other scientists and they had a commonality of interest in the problem of deciphering big data, of being overwhelmed by masses of data because the machines now they're used in molecular biology to crack the gene to do genetic sequencing or producing volumes of data and they have to figure out what's important. Well, that's exactly what we're trying to do as individuals. So have you sort of, was your self-definition as a writer, is that how you think of yourself? Is that the essence? People say, what do you do? Do you say I'm a writer? Yes. And were you defining yourself that way even before the book Chaos? Well, I was a journalist. Yeah, I was a journalist. That is a writer, of course. That's right. We're journalists. I worked for the New York Times. I still spent a while since I practiced any actual journalism, but I still think of myself more as a journalist than any other kind of writer. The reason I ask is that you do spend a lot of time in the book, especially at the beginning, talking about the words that evolved and how they evolved in order to describe these things and that the words themselves became foundational, not just in information theory, but in several other fields of scientific progress over the course of many, many centuries. And I wonder if it's your sort of, you seem kind of obsessed with words, which is very healthy in my opinion as a writer. I think writers tend to be quite interested in words. And do you think that might be what got you into this particular topic in part? Because it's certainly very smooth transition between an obsession with words, which are symbols for information, and then this whole idea of the bit and all the consequences that flow from that. Well, you're right that I have a kind of obsession with words. And there's a chapter in the book called Two Dictionaries that's about the two dictionaries are the Oxford English Dictionary at the modern extreme, which is now an enterprise of cyberspace. It has exploded past the boundaries of the physical book. And the first English dictionary, which was a Robert Caudry's Table Alphabetical of 1604, which had I think 2,000 words in it. The idea of a world before there were dictionaries is the thing that really struck me. I think in part it's because to understand this story of information, I've been trying to put myself back into the mindset of people who didn't have all the stuff that we have, not just the devices, not just email. Although I did when I was writing about Newton, I was constantly thinking, gee, what if Newton had email as a former email provider? Anyway, but not only didn't he have email, but he didn't have he didn't have dictionaries. I mean, there were technically a few dictionaries by then. He barely had clocks. He just he was in a world that suddenly had glass for the first time. We sometimes worry about whether Shakespeare was a lousy speller, or people sometimes say he you know, he didn't care that much about spelling. The point that we miss is that there was no such thing as correct spelling in Shakespeare's time. There's like transliterating Chinese or something like words were fleeting. They were oral. They emerged from our mouths and vanished into the ether. That's an exaggeration because the written word had been around for thousands of years, but but it's not so much of an exaggeration. And so I felt if I was going to tell the story of information, I wanted to understand not just our modern predicament, but also how different the world was before we had these pivotal information technologies. So what would you say is the central message of the book? What's the prime the most essential takeaway you want people to have when they read? Well, I never finished answering your first question about the subject. Just as long as you've come to this one, you can do it. Well, you've brought me back to it. Okay, because the end of the subtitle is flood. Right. That's the thing I think we're most worried about today. That's that was part of certainly part of the thing everybody was worrying about it at decoding data yesterday. And it's, you know, we're all worried about the overwhelming massive information that bombards us. It's true if we're geneticists and it's true if we're Twitter users.  I certainly I certainly am. And and there's already a paradox there. It's a paradox that you've explored a little bit in connection with Facebook. It's what all of these great enterprises, it's the problem all these great enterprises are trying to solve. On the one hand, we love information, we live for it almost literally. How can something that is so valuable to us and central to our existence start to overwhelm us? How can there be such a thing as too much information? And yet there is too much information is a source of stress, it's a source of confusion, we worry about separating what's true from what's false. If we sign up for Facebook or Twitter, suddenly there are a billion people more or less who we have some responsibility for being aware of if not following. How are we supposed to the cliche is find the signal in the noise? It's a cliche that I don't accept actually. I don't think in the in this world of cyberspace, there is any, any bright line between signal and noise. What is signal to me is going to be noise to most people and vice versa. Well, it is interesting that Facebook and Google learn two most successful companies of modern technology landscape are all about filtration in order to try to present you with what is most relevant right now for your exact needs at the moment. And Twitter, interestingly, has transformed itself and under its new leadership from being seen as a place you go to tweet, to being primarily a place you go to see the tweets of others to use it as a filter, because it's that's the way most people use it, but it wasn't positioned that way until recently. So clearly they have the same role. But so do you do you feel optimistic about our progress in dealing with this flood? I go back and forth between optimism and pessimism. You're absolutely right that filtration and search are the two tools that were that are most essential to us. And people think that Google is about search. But as you say, it's just as much about filtering. It's about, it's not just about showing us the top result or the top 10 results. It's about hiding the built the nine billion less interesting results. Well, that's what search is. I mean, we know that whatever we want is out there these days. It's just like, how do we find it? And that's what Google is supposed to do. And of course, that's already as soon as you recognize that you should I think have a bell should go off and you should start to be a little bit worried. What? Because somewhere in those nine billion unwanted results might be a jam. And mean we should not trust Google, you're saying? Of course not. Do we trust Google? Well, increasingly, we seem not to. But I think for other reasons, or maybe this is not, you know, to talk trash about Google, but don't hesitate. If Google itself is explicitly undergoing a kind of transition from being a search engine that that tried to give the best possible result in a platonic sense for any particular search when you search for university, well, what's the most interesting university? And then very quickly in the first few years, the top result for university, I haven't checked this, but I bet anything that the top result for university is the Wikipedia definition of university. God, if that's not true, it's going to be embarrassing, but it'll be that'll be up there. Now, though, they they feel a need to follow Facebook and personalize their results so that when you search for university, they can read your mind and recognize that you are a graduate of Brown University, or you are a teenager thinking of applying for university, or you are a professor worried about trends in tenure at university, and so on. Presumably, you're familiar with Eli Paris's book, The Filter Bubble, which really tackled this exact issue head on, arguing that sites like Google and Facebook are diminishing our common life by over personalizing our information experience. Do you agree with that criticism? No, no, I mean, yes and no. And because yes and no was also the answer to your previous question about whether I'm optimistic.  Yes and no. Here's the here's the takeaway, I think. There is no perfect solution. We are we're making a mistake if we if we look for one. If we enter a search term in the little box and we expect Google or any other provider to come up with a perfect solution or or an ideal top ten list, we're kidding ourselves. And I think we're I think we're already smarter than that. What I mean is there's no perfect solution either at the extreme where you're thinking about people in general searching for a given thing. And there's also no perfect solution for me as an individual, even if Google could read my mind as they aspire to do. They still may not be able to produce the thing that I really need. But in the end, wouldn't both face me, I would assert that both Facebook and Google would say, look, we're not trying to be perfect. We just want to make your life a little bit better than it would be if you didn't have our tool. Do you question that? No, no, I don't. I think that's exactly right. All of these things are making our lives a little bit better. I think Twitter makes our lives a little bit better. I'm a happy Twitter user. But if I've heard people say Twitter needs to solve the problem to get to the next level of helping users really find the people they need to find. Helping users solve the problem of breaking through a billion potential follow-ease leaders. What do you call somebody you follow on? Followers?   Right. Okay. Because in the end, I don't think we either can or we want to abdicate our personal responsibility for finding the stuff we're interested in. But how do we exercise that? On Twitter, we exercise it by choosing an ongoing revolving cast of people who are our personal curators. And make sure that it is evolving. I mean, do you recommend we always be seeking to, I mean, seeking to be Google or Facebook for ourselves and constantly be upgrading the quality of our information and do that consciously, the quality of our sources? Yes. I mean, I was about to say I don't want to recommend anything, but... Well, please, recommend anything. But yes, isn't that what, isn't that what we all do? We, we choose people to follow. We choose, doesn't have to be on Twitter. We choose the bloggers that we like. My grandfather chose from a dozen New York Daily newspapers, the one he wanted to read on the subway to work in the morning and the one he wanted to read on the subway home in the afternoon. He was consciously or not, not choosing curators who were filtering the information about the day's current events. You know, it used to be, when I used to work at the New York Times, it was said there that what you were paying for was not the news that the Times printed. It was all the news that the Times chose not to print. That was a filtering device. And someone who buys a daily newspaper is choosing a surrogate. It's choosing a smart editor. If you choose an art museum to go to or a particular exhibit, you are relying on the skills of a curator, even if it's someone whose name you don't know. That's what we are all doing more consciously than ever before when we navigate cyberspace. So back to the big picture takeaway.  And yet you have many hundreds of pages, which is the intent to help people understand the roots of the problem. So they become more discriminating in their, you know, dealing with this flood. Is that kind of the way you think of it?  But honestly, the intent was to tell a story. Yeah, which you're very good at. That's one thing that makes your books successful. I said that I admitted that my one word answer to the question of what I do as writer, I wanted to, I thought there was a story there that needed to be told because it's farmed to read and interesting to read and it shed some light on the world we live in. And you know that as writers, we only learn the story as we're telling it. Yeah. So no, it wasn't to help, it wasn't to help people. It would be nice to think that people could buy my book and live better lives. But I can't promise that. Okay. But what about you personally? How would you say doing this work and spending all these years reporting and writing this book changed the way you think and the way you behave? It's made this book in particular has certainly made me more aware of things that were just lurking at the periphery of my consciousness. For example, all of this, well, all these things about the centrality of information, information as a thing to be aware of a thing that about which we are making choices. We're making the choices whether they're conscious or not. And most of the time they're not most of the time we're making unconscious choices.  But but the more we're aware of using our time of choosing particular curators of dividing our time between a search for breadth and a search for depth. This is another another key issue that comes that comes to the fore is that we're living in a world where suddenly we have access to a breadth of information that's that's unprecedented. Ask anyone a question, a factual question, anyone in this room can pull a device out of their pocket and give you a very good answer can access the the instantaneous global memory prosthetic that we have. But anyone in this room will also probably say that that doesn't automatically make us smarter or even more knowledgeable. And so what does that mean for how we choose to divide our time between getting a breadth of information and burrowing in deeply into one subject. I certainly have I've become more aware of that. And even in writing this book, there were some things in the book that are just gigantically broad in general. And there are other things in the book that are that just will seem to readers, maybe like going down a tunnel, a twisting narrow tunnel. But through a well told story, we hope anyway. Well, I hope it'll be a hope it'll be an illuminated tunnel at least. Do you think there's any prospect that we will in the rest of our lives, the people sitting in this room have less of a feeling of information overload and and being overwhelmed, which I think there's unquestionably no one in this room who doesn't feel that. Is this just the destiny for the rest of human existence? I think there's no prospect that that a time is going to come when people are not concerned about information overload. I think the best we can hope for is to have to use the cliche historical perspective. One of the one of the fun things I learned in writing the book with how long people have worried about information overload, even though they didn't call it that. You know, it's only in the last generation that it's become a cliche that people have talked about too much information and information fatigue. And that's because we are aware of this water in which we swim. But people have been complaining since, well, Leibniz complained in the 17th century that that this new fangled technology, the printing press was flooding Europe with a horrible mass of books that threatened to return mankind to a state of barbarism. Because no one could keep up anymore. But now you're heading back toward optimism because if it's been forever thus, it's good to understand how it's happening now. But maybe we shouldn't be too worried, right? Well, that's right. We shouldn't be too worried but we shouldn't be complacent. Well, I can tell you the tech industries by no means complacent. They see this as the most fertile field for innovation that they can imagine. And there's just infinite, innovative ideas emerging all over the world for better and more creative ways of combining information sources and presenting them in more simple interfaces in order to allow people to get more effective things done faster, to entertain themselves more effectively, etc. Absolutely. And they either are or are not aware that in so doing they're contributing to the flood. I mean, after all, we used to just have Google, then we also have Facebook. We used to just have Facebook now. We also have Twitter and so on. Again, back through history, the emergence of one of the reasons for my interest in dictionaries was the dictionaries themselves were meant to be a solution to a problem of too much information. There are all these words. Now we need some help in understanding where they come from and what they mean. There were encyclopedias, then there were card catalogs and file folders. All of these are technologies that on the one hand were meant to help people address the problem of too much information and on the other hand contributed in their own ways to the flood. What do you think about the most successful innovation in this arena, which is Facebook, and the fact that it has chosen to use this means of your personal network as a filtration device? Do you find that intriguing as a point of progress? Does it help you personally deal with this? I'm actually, to be honest, I'm not a Facebook user. Not at all. Well, I have an account, but I haven't checked it in a long time. What do you think about that as a theoretical approach, since it's not practically explored in your case? As a theoretical approach, I think it's key. That is social networking is a general thing, is an extent is a step on the path that I've been talking about on the path of using our connections, our individual connections to sort through information, as opposed to thinking of the world of information as just a giant ocean, that can be sifted algorithmically. This is to increase. Do you find that slightly progressive? Progressive in the sense of better than just algorithms, people might be. I think it's a return to finding balance. I mean, every every new information technology throws out of whack the balance between the individual and the mass. You know, the invention of the radio suddenly created a world in which a single voice could be heard by millions. Bertolt Brecht was obsessed with this at the time and and worried about a world and you know how many speakers will there be? How many listeners? That's just that is surely echoed by what's happening now before Facebook and after Facebook. People worry about the inverse now that too many people have a voice and it's too chaotic. And certainly, you know, Putin or or Mubarak worry about things like that. Well, exactly. And that's why whether or not I will advocate Facebook or Google or any particular enterprise, I am fundamentally a believer in cyberspace as as a medium for human communication that's not going to go away. You know, one of the big ideas and maybe this is may have to be the last question, depending on how long winded your answer is and feel free to go on. But, you know, McLuhan had this whole idea of the global brain and that's something that a lot of people do still assert is happening that, you know, and even in my book at the end, I talk about how people there are people who talk about Facebook as moving towards this sort of interconnected network of human humans that sort of becomes a collective brain. Peter Thiel, one of the investors in Facebook talks about it that way. Is that an idiotic idea or do you see some reason to think that a version of that could really be happening over time? I think it's happening now.  It's this is the world we live in. We are, whether we're aware of it or not, we are increasingly part of a global brain. We are making our decisions often collectively. We do and we don't believe in the wisdom of crowds. I mean, we worry about groupthink and we should. And we're also aware of the dangers of mass hysterias. You know, suddenly everybody believes that at the exact second that the millennium turns, all of the world's computers are going to crash and there's a kind of mass panic about it and then a day later it's forgotten. And yet I am to some extent a believer in, to a great extent, a believer in our ability as a species to share wisdom collectively. What's the next book? I can't I can't even tell you what the next book is. I'm at that awkward writer stage where I'm in between and noodling with ideas and well, trying to avoid feeling unemployed. I'm sure it'll be interesting. Thank you so much. Thank you. Great conversation. Really enjoying.


He just had an armed robbery come out. He's a dangerous gang member. We're going to an autoped car versus a person. Unknown injuries. This batch said it was a hit and run criminal mischief. I'll just drive through. We're going to go out and look for something to make sure we can prevent any crime from happening. There's several syringes over there, probably to shoot meth or heroin. Highly legal. She started hitting me. She started kicking me. We think we have the possible suspect in custody of Fort Edward. Someone is throwing furniture in the dumpster. You wouldn't catch me doing that. Right away with the unknown type of property with the other female. Fort Edward, I'm code six at Federal and Howard. The name of you guys called 911? Down there? This is the one I called 911. Do you want to give me a description of the lady that whoever took your stuff? I really want to. OK. She's wearing a black jacket. Fort Edward, I'm out with her. Stand by for suspect info.  I was on the train. I had asked her to turn her music down, and she didn't respond. She just said what? And then she turned her music up. I don't even remember what I said, but then she started hitting me. So I threw my drink at her because that's all I had in my hand. OK. Can you ID her? If I saw her yet. OK. Can you ID the female that assaulted this young lady? Yeah, I see. We just got the information we needed from one of our witnesses and the victim. We think we have the possible suspect in custody and one of our cars right over here. So what we're going to do right now is to show up. We're going to have the suspect step out of the vehicle. We're going to have a witness that's going to drive up there and hopefully ID the suspect. Hey, Val Cobreen, have the suspect down over here. This is a suspect. Both the victim and the witness both stated that this is not the person we're looking for. We'll have a couple guys probably just drive around and see if they can see anyone matching that description. If not, we'll just take a report and we'll get handed up to our detectives to hopefully close the case out. This shift, the swing shift, see a lot of different things. It goes pretty quick. The scenery is nice. You got all walks of life out here. You got your parks. You got the highlands out here. You have your gangs out here. But I think if we're on top of it, it stops a lot of problems. 42 Edward, I can take that disturbance on 15th and Irving. We have some skateboarders that are on an abandoned building that are just, I guess, they're climbing on some portions of the residence and skating off of it. So we'll just tell them to move on. Let's see. 42 Edward, I'll be out with about six skaters. How's it going? Doing all right. Are you guys skating on the roof and whatnot? Yeah, we were doing a little bit of that. Yeah, unfortunately, we can't do that. We had someone call in. They're just worried about your safety. Possibly be okay if we squeeze in two more minutes of family. One run. One run. One run. One. Got one. One more. Would you guys, what, make films and just put them on the interior and whatnot? Ah! Ha, ha, ha. You won't catch me doing that. Well, thank you. Yeah, no problem. Have a really great day. You guys take it easy. Have a great day. Make that video. Put me in it. Get starring. How law enforcement is viewed right now by teens. I think that interaction right there is going to help out the next time these guys run into law enforcement. I could have went over there and said, hey, get over here. Sit him down and went and did everything I could have just to detain him longer. But these guys are just out having fun. Both sides were respectful. So down the road, this context is going to go a long way with them. I started out in education. As soon as I graduated college, I actually got a job with the University of Northern Colorado as an admissions counselor. And then from there, one of the high schools that I recruited from was Marbella High School. I like that side a little better. So I switched over and became the school's post-secondary counselor. The school resource officer there told me Denver was hiring and told me to put in. I put in, tested well, and then here I am. It's an abandoned house. And we have frequent squatters there. So we're going to go check it out to make sure that there's no one in there. Right now, we don't have a lot of calls holding. When we don't have calls, we can go out and do these preventative measures to stop crime from happening. Matt's clear. Is this open? There is signs of people living down here, probably some transients. People have been going to the bathroom up in here. You can smell it. There's several syringes over there, probably to shoot meth or heroin. You got your pipe back here. You can probably do marijuana in there, meth, heroin. You name it. Someone's crushing pills. So you've got a whole bunch of stuff. So he's got a little Bible. Hopefully he's reading that. I hope they're using that for the spiders, because I know there's some stuff in there that they probably can use to get high on them. The people out here on the streets are really creative. If they want to get into a place, they usually do. If you break the hinge off, you're good to go. And you're able to get in. This was back there in the corner. And this hinge was attached there. And they just took something and hit it off and walked right in. They'll be back. So we'll let them get their stuff. And then hopefully we catch them in the act. They're going to think that it's safe. So we can actually come back and get them. I've always known I wanted to do public service, whether that be on the education side, law enforcement.  I'm always helping somebody out in their darkest hour. Every job I've had, it's always helping out people. And this is just another step. And I'm continuing doing this for as long as I can.


Hello everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So today we are having day 13 of the C and C++ coding bootcamp. And in this session, I will be explaining you how we can implement nested loop in C programming, right? So in past sessions, I demonstrated you the working of for loop, while loop, do while loop. But if you want to implement more than one loop together, so how we can implement that in form of nested loop, so that we are going to discuss in today's session, right? So I welcome everyone who is watching this session live, or if you're watching recording, so you are also welcomed. And let's start with the session. So if you are attending any of the session on this YouTube channel for the first time, and if you want to know about me, so you can go through with this slide. And everything about me is written over here, right? So moving forward. So in every session, I say like consistency is the key. So if you want to become a good programmer, so you need to learn particular coding language and coding, you can learn through consistency only. So be consistent if you want to learn C and C++ properly. And you can join this telegram group. And if you have any doubt related to C programming, so C or C++ programming, you can ask questions here. And you can follow Sanjay Gupta Tech School on YouTube, LinkedIn, Instagram and Telegram. And all the important links are available in the video description. So today's topic is nested loop as I discussed with you. So before starting this, I can see one question in the chat. So someone is asking how close is C to C++? So basically, C is function oriented programming. So as of now, like whatever we have done in last 12 sessions, so you might have noticed everything we are implementing in the main function. So C is basically function oriented. So in a function, we can implement all the logic. And as per the requirement, we can execute that. But C plus plus is basically object oriented programming language. So in C++, if you want to implement any solution, so you need to implement classes inside classes, you will be creating some variables and functions, right? So implementation approach is totally different in C++. So C is basically considered as function oriented programming language, whereas C++ is known as object oriented programming language. So I hope this help you this will help you to understand the difference between C and C++. And once all the sessions of C programming will be completed, so I will be explaining you the difference between C and C++ when we'll be starting C++ sessions, right? So I think if you see in the session tracker, so it is already mentioned. So here we will see features of C++ and similarities and differences between C and C++. So to understand this first, we need to complete everything that is available in C programming. And whenever I will be starting sessions related to C++, so first we'll do all the comparison and then only we'll be starting implementation. So let's jump on to the nested loop. So if you want to see a nested loop, so this is the good example for that. So here in this example, what we have done, we are using two loops altogether. So first loop is basically known as outer loop. So here first loop is having a variable I so that we can consider as consider as outer loop. And inside the outer loop, we have inner loop. So second for loop, which is having a counter variable as J will be known as inner loop. So here we have two loops. So outer loop is having inner loop. And inside inner loop, we have a printf statement, right? So we just need to calculate the result of this code snippet. So what will happen? This outer loop, which is starting with I equals to one and condition is I less than equals to five. So whenever this outer loop is executing first time, so control will transfer to this inner loop. So in first rotation, when I is one, control will transfer to J loop. In that case, J will complete its execution, right? So when I is one, so J will execute five times. Okay, so what will happen? This this printf will be printing one, one, one, two, one, three, one, four, one, five. So I is always one five times, but J is incrementing its value by one every time because J is part of this inner loop, right? So first five outputs will be one, one, one, two, one, three, one, four and one, five. When this inner loop will be terminated, then I will be incremented by one. So I will become two, right? Then this condition will be checked to less than equals to five. So it is true. Then again, control will shift to this inner loop, that is for J equals to one and J less than equals to five. So what will happen? This time value of I is two and J is again starting from one. So next round of output will be two, one, two, two, three, two, four and two, five, right? So this way, when outer loop is iterating one time, so inner loop will complete its execution five times. Okay, so now I'm going to implement this code in our online compiler so that we can see like whether the result which I'm telling you verbally will be printed or not. Okay, so practically we'll implement this solution and we'll see the result. So here I'm going to create two variables, I and J, right? Now here I'm going to implement first loop, I equals to one, I less than equals to five and I plus plus, right? So this is basically our outer loop. So you can say it is outer loop. Now inside this, we are going to implement an inner loop. So this you can say inner loop and inside this inner loop, we are having a printf statement which will display two results. So here we are going to print value of I as well as value of J. Okay, so this is the code that I explained to you earlier. Now I'm just clicking on one and you will see the results. So here you can see the results. So let me scroll it. Yep. So now you can see the result. It is showing one, one, one, two, one, three, one, four, one, five. If I scroll down, so it is showing two, one, two, two, two, three, two, four, two, five, then three, one, three, two, three, three, four, three, five and so on. So when I loop is iterating one time, so J loop is iterating five times, right? So in total, I loop will execute five times and J will be executing 25 times. So this is the working process of nested loop. So if you have any doubt, you can ask your question in the chat so that if you join this session live, so I will be able to answer. And if you're watching the recording, so in the comment section, you can ask any doubt that is related to this code. Okay, so I hope with this output you are able to understand how these code snippets will execute. So whenever you have a requirement to implement any nested loop, so remember there will be an outer loop and there will be inner loop as well. Now moving forward, I have one more example for you, right? So here we have, if else, conditions also. So we have outer loop, which is having loop counter as i, then we have inner loop, which is having loop counter as j. And inside inner loop, we have if condition as well. Right? So what is happening here? If this condition is true, then one will be displayed, otherwise, zero will be displayed. Right? So after termination of inner loop, then we have backslash n. Right? So it will be showing different results. So in case of equal value, one will be there. In case of unequal value, zero will be there. But both the loops are executing five times. So a kind of matrix will be displayed because in this inner loop, you can see printf is not having backslash n. So these one, zero will display five times in same line. And when this inner loop gets completed, inner loop gets completed its execution. So after that printf backslash n will change the line. So when inner loop will be displaying all the values, then only your cursor will be shifted to the new line. Okay? So now I'm going to implement this solution. So basically, I'm going to modify this code so that we can understand the result of this code. So if it is true, I just need to display one. And if it is false, then I need to display zero. Right? So this way, this code is implemented. So outer loop is iterating five times. Inner loop is also iterating five times. Then we have a condition. If this condition is true, then one will display if condition is false, then zero will display. Now, once this inner loop is completed, so here I'm going to display backslash n. Right? So what is what is happening? Once inner loop gets completed, so this backslash n will change the cursor position. And in the new line, next row will get displayed. Right? So let me just show you the results so that you can visualize how the result will be available. So this, this will be the output. So you will have five by five matrix. And whenever I is equals to J, so at that position, one will display. And wherever I is not equals to J, so at that position zero will be displayed. Right? So this way in C programming, if you want to implement nested loop, so you can apply and inside loop, we can apply any conditional statements as well. So here in this example, I used if else as conditional statement. And whatever logic you want to apply, so inside loops, you will be able to do that. Right? So I hope with this explanation, you are able to understand how in C programming, we can implement nested loop. Right? Now, let's implement some patterns as well through this. So basically, here you can see we have a triangle. And in this triangle, we need to display asterisk. Right? So in this, in this example, what is happening in the first row, one star in the second row, two stars in third row, three star in fourth row, four star and in fifth row, five stars are available. So basically, in in previous example, what we did, we started both the loops with one and we we are having termination condition as less than equals to five for both the loop. If we go ahead and see this example. So here you can see total number of rows are five. So that's why outer loop will be repeating five times. But inner loop will depend on outer loop like in first row, one as one asterisk in second row, two asterisk or you can say star in third row, three in fourth row, four star in fifth row, five stars. So whatever number of row you are printing that much stars you need to print. So if I is one, so J loop will execute one time. If I is two, J loop will execute two times. So here you can see carefully J loop termination condition is J less than equals to I. So J is totally dependent on I. If value of I is one, so J loop will execute one time. If value of I sorry, if value of I is one, so J loop will execute one time. If value of I is two, so J loop will execute two times. Right. So totally J loop is dependent on I. And with the J loop, we are printing asterisk. Once J loop is completed, then this backslash and will execute and cursor will shift to the new line. Right. So now I'm going to implement this solution so that you can understand. So basically here instead of five, I'm using I and here I'm going to use printf and then asterisk. Start. So we just need to print start. Right. So outer loop is iterating five times when I is one. So this J loop will be executing one time because here you can see condition is J less than equals to I. So I is initially one. So this loop will execute one time and one star will display then inner loop is completed. Then printf will display this backslash and then I will be incremented. So I will become two. Now in this case, this J loop will be executing two times. So J loop will start from one and it will go till two, like I is two. So two times two asterisk or two stars will be displayed. Once this inner loop is completed, then cursor will shift to new line. And then I will be incremented to three. So next time this inner loop will be executing three times. So three stars will display on output screen. So if I execute this code, so here you can see the result. So in first row one star in second row two star, then three, then four, and then five. So this way, if you want to implement nested loop, so you can apply these logical things. So I hope you are able to understand how I changed these conditions. So outer loop is executing five times, but inner loop is totally dependent on value of i. So whatever value of i is, that many times your inner loop will be executed. Okay, so this was the triangle where we are starting one, two, three, four, five, and so on. Now if you want to print its reverse, like in first row, you want to display five stars and four, three, two, one. So basically, if you see this code, so here only one line is modified. First outer loop, or you can say outer loop, right? So outer loop is modified. So what we need to do, we just need to start this i with five, then i greater than equals to one, and then i minus minus. So if you modify this outer loop, if you modify this outer loop and you start this outer loop from five and decrease it to one, then your reverse asterisk pattern will be displayed. So if I run this code, so you will see the result, five, four, three, two, one. Now what is happening here? So initially i is five, five is greater than greater than equals to one. So condition is true. Then control will shift to this inner loop, which is j. So j is starting with one and it will go till i. i is basically five. So initially this for loop will execute, inner for loop will execute five times because i is five. Once five stars are printed, then new line cursor will move to new line, then i minus minus. So i will become four. So next time again, this j loop will start with one and it will go till four. So total four times this loop will execute. So asterisk will be displayed four times. Right. So this way, if you want to implement nested loop, so you just need to implement outer loop and decremented order and rest of the things will remain same as the previous example. Right. So this is the easiest way to understand this. Like if you want to print reverse triangle for any triangle that you have implemented. So try to modify only outer loop and you will be able to see the results. Right. So this way I hope you understood the concept like whenever you want to implement any loop. So it depends like whatever you are doing increment or decrement operation. So there is no foundation. You can do anything and there can be more than one logic available to implement solution of a particular problem. Right. So this way, basically we implement nested loop and C programming. So I just explained you two examples. Right. So this this was the first example in which stars are increasing. This is the second example where stars are decreasing. Now I have one more example where we have triangle but before triangle we just need to print some spaces as well. So if you see at the bottom there is no space for second last row we have one space for third last row we have two then of here three and then for first row we have four blank spaces and then a stress. Right. So here what we need to do initially we need to print some spaces and then we need to print star. So here basically you will be using three loops. So first loop is I which is counting row quantity like which row you want to display then J loop is basically for space and K loop is basically for asterisk. So here you can see J loop is basically starting with one and it will be terminating with five minus I so initially I is one initially I is one so five minus one is four. So it means what will happen this J loop will be executing four times it will start with one and it will terminate till four. So four times it will execute and four spaces will be displayed once four spaces are displayed and this inner loop is terminated then we have one more loop which is K. So once execution cycle of J is completed then only K will start its execution and it is having termination condition as J less than equals to I. So I is one so initially first time K loop will be executing one time. So what will happen four spaces will be displayed and then one asterisk. Once K loop is terminated so printf will display backslash and then control will shift to I plus plus so I will become two then you can see again this J loop will execute. So this time condition is five minus I and incremented value of I is two. So the result will be three. So it means J loop will be executing three times. So three spaces will be there and value of I is two. So this time K loop will execute two times. So after three spaces two stars will be displayed. So in the second row we want three spaces and then two stars. Right. So this way this code is working. So what we need to do here I'm going to add one more for loop. So it is J equals to one J less than equals to five minus I and J plus plus and inside this loop we just need to display a space and I'm creating one more variable which is K and here instead of J we are going to use K. Right. Rest of the logic will remain same. So initially I loop will start its execution. So it is starting from one condition will be less than equals to five and then I plus plus. So I is one so this then this loop will start its execution. So five minus one is four. So in first go this loop will execute four times and this K loop will execute one time because I is one. Right. Once it is terminated then cursor will shift to new line. So in first rotation four space and one start will display then I will be incremented to two. So here we have follow where five minus two means three. So three spaces and then I is two. So two stars. So in second rotation three spaces and two starts will be displayed. And remember these two for loops are not nested. These are independent but these two loops are nested for the first one outer loop. So here in this case we are having two inner loops. So first inner loop is J and second inner loop is for K. Right.  Now if I click on run so you will be able to see the result and you can see this is the result which we were expecting. So we need to display this and so there is some issues with this compiler. Okay. So I executed it again. So here you can see the result. So this time it is showing the correct results. Yep. So here you can see the output is shown correctly in decreasing order. So in first row we have five star then in second row we have one star. Sorry one space and four star then two space three star four space two star and sorry three space two star and four space and one star. So this way if you want to display your results of pattern of a stress in reverse order. So you just need to modify this first loop and accordingly your result will be displayed. Right. So I hope with this with these four examples you are able to understand the complexity of nested loop. So in C++ in Java in apex programming also sometimes we need to implement nested loops. So for that purpose you should understand how basically nested loop works in C programming. Right. So I hope with this explanation you are able to understand how nested loops are implemented in C programming. And if you have any question, so you have different platforms to ask. So we have telegram group. We have this YouTube where you can write your questions in the comment section and do practice whatever I demonstrated in this session so that you can become export in implementing nested loops. And like after the session I will be modifying the exercise sheet and session tracker.  So you can just go through that as well if you want to understand things in detail. Right. So this was about nested loop that I shared with you. So do practice whatever I discussed so that you can also understand the implementation of nested loop. And please share a review or feedback about the boot camp whatever efforts I'm doing for you. So it will give me some motivation and like right now three boot camps are running one is for Salesforce, one is for C and C++ programming and another one is for Appian. Right. From next week onwards, I'm going to start one more boot camp which will be on Omni Studio and it is related to Salesforce. Right. So in that boot camp you will be learning everything about Omni Studio that is basically used for industry clouds. So I think with these four different paths you are able to understand whoever is attending whatever boot camp which is giving benefit to you. So right now four and soon a few more will be available. So I'm in discussion with the experts because everything I don't know. So I'm discussing with the experts so that if someone is available and he or she can deliver some content. So let's see how things goes. And if I have some experts, so surely they will be live on this platform and will be sharing their knowledge. Okay. So with this note I take your leave. Thank you so much for joining this session and if you're watching the recording. So thank you for watching and do regular practice whatever I am explaining in these sessions and these sessions are very much important for folks who are not familiar with the programming and those who are starting their BTEC program. So for BTEC students these all C and C++ boot camps will be helpful. So if you are anywhere connected with anyone who is starting their BTEC journey, so you can just share this YouTube channel link and I'm sure like they will be benefited with this. With this note, thank you so much for joining this session. See you in the next session.