Bushfires have been a part of the Australian landscape for millions of years and the state of Victoria is one of the most bushfire-prone places on the planet. Before European settlement fire played a central role in the lives of Indigenous Australians. Recent history has shown us how devastating bushfires can be. January 1939. It has been a long hot summer. The state is suffering under years of drought. The bush is tender dry. Tall eucalypt forests are ready to burn. Friday the 13th of January 1939. Temperatures soar above 40 degrees. Dry northerly winds sweep fires across Victoria. The many small bushfires burning across the state converge and intensify. The speed of the fires was appalling. They leapt from mountain peak to mountain peak blown by a wind of great force. Townships were obliterated in a few minutes. Mills, houses, bridges, tramways, machinery were burned to the ground. Finally, on Sunday the 15th of January, rain falls. The losses are horrific. Thousands of square miles of blackened ruin. 71 lives were lost. 69 sawmills destroyed. Travelers on the highway were trapped and perished. When a bushfire grows to this size, it becomes incredibly powerful. As wind pushes the fire front forward, it gains speed and intensity, consuming the fuel and its path. The huge convection column rises high into the atmosphere above the inferno. The 1939 fires remind a new generation of the terrible devastation bushfires can cause. February 1983. Victorians swelter through another hot summer. A short but intense drought grips the state. Strong northwesterly winds on the 8th of February carry topsoil from the Malley and Wimmera. A 300 meter thick wall of dust sweeps over Melbourne. It is an ominous sign of things to come. Last night, Melbourne dwellers tossed through the hottest night this summer and continued to swelter as the city temperature rose to 41 degrees at about one o'clock this afternoon. Wednesday the 16th of February is another scorching day. Fierce winds buffet the state. By that afternoon, there are eight major bushfires. Wind gusts up to 100 kilometers an hour spur the fire front forward. Then, just before nightfall, the south westerly wind change turns the long flanks of the fires into a dangerous new front. The wind change direction and that was it, you didn't have a hope. You just had to get out because you could. This is one of the many fires being fought throughout the night. It's three o'clock in the morning and we're at Kerry, just a few kilometers west of Riddles Creek. Firemen here are trying to save the local school. About a few minutes ago the wind blew up and now they've got a real battle on their hands. What are you able to save? My children, that's it. 47 Victorians died. Thousands of buildings were destroyed and more than 300,000 farm animals perished. This disaster will forever be remembered as the Ash Wednesday bushfires.  Embers are carried ahead of the front, creating spot fires. These spot fires are drawn into the main front, while distant others grow in isolation, burning away from the main fire. For anyone inside the impacted area, the surrounding fires can appear chaotic. After only a few weeks, there's new growth in the forests. But for the towns damaged by the bushfires, it will take much longer to recover. February, 2009. After 12 years of drought, Melbourne's water reserves are at an all-time low. Water restrictions have been in place for years. The weather is oppressive and there appears to be no relief in sight. It is just as bad a day as you can imagine and on top of that, the state is just tender dry. The forecast for Saturday, the 7th of February is the most extreme on record. Saturday morning, the strong northwesterly winds push hot, dry air in from the desert. The temperature continues to climb. Firefighters battle more than 300 fires. At half past 12, the winds surged. Within a minute, what had been light smoke began billowing into the sky. The fire was out of control. The shape of the land or topography can influence the way a fire behaves. Bushfires can spread rapidly uphill because there's a shorter distance for the heat to travel to reach the next piece of fuel. On an exposed hill is often more wind and hotter sun to dry out the trees and grasses. Difficult terrain have made conditions so dangerous that no one has been allowed near this town on the ground. On the 7th of February, 2009, 173 people lost their lives. Over 400 more were injured. The fires destroyed over 2,000 homes. It is estimated that more than one million animals were killed. As the main fire approaches spot fires, they are drawn into and feed a growing front. The convection column formed by this enlarged fire can create a localized cyclonic winds and extreme fire behavior. The forests are devastated, but soon show signs of regeneration. The rebuilding of towns and the recovery of survivors continues. Drought, extreme weather and topography combine to produce catastrophic bushfire conditions. Black Friday, Ash Wednesday and Black Saturday are reminders of the huge impact bushfires can have on lives and property. Bushfire is a natural part of the environment in which we live.


Good day fellow investors. We have already discussed ZTO Express as a Chinese investment company and YY as a Chinese interesting social platform. Now I want to discuss a third Chinese opportunity in the peer-to-peer lending environment. Peer-to-peer lending has been booming around the world. It's a very interesting sector growing, developing. A lot of people want to get away from banks and I want to dig into the sector in China. I have one stock that I found here and I limited, which I found very interesting to see how the environment evolves and to describe an interesting Chinese investment. And I assure you, perhaps you will invest in it, but you will learn a lot about the investment environment in China. Let's start with Virendai and its stock price because it's very interesting. It IPL'd in 2015 at $10 per share. It fell immediately to $3.56 only to increase to $40 in less than six months and then it has been trading sideways between $40, $20, $30 and now it's at $28, $29. So many don't like to invest in stocks that have performed this well in the past. It's almost a 10-bar beggar. However, as investors, we must never look at what happened in the past. We must look at what is now related to the stock price and what will happen in the future. Peter Lynch preferred to buy stocks that have already had a nice run up because then the fundamentals have been confirmed and are confirmed. So it's a different investing perspective than an actual value investing catching a fallen knife, but it's always interesting to look at. Let's look at the company and at the sector where it operates. Virendai was recently founded by Credit Ease, which is a company that analyzes personal individual credit in China. So logical that they offer peer-to-peer company. Loan volume growth has been exploding in the last four years. So it's practically a new sector in China. What does Virendai do? They are a platform that allows the connection between individual borrowers and investors. Typical peer-to-peer lending. Everything is automated. They use the data from Credit Ease, the parent company, for credit assessment and then put interest rate on the loans and connect the two parties. Very simple business, very profitable, very easy business. However, that easy business made a very complicated situation. More than 2000 peer-to-peer lending platforms have been founded in the last few years in China. Of them, a few were real Ponzi schemes and one, as Ubao, was a Ponzi scheme that was blocked by the government and it cost investors about 8 billion dollars. So it's really really delicate sector to investigate. However, the government went in, is checking it and from August we have new regulation and according to Uirendai management, this new regulation should benefit the company because it will eliminate a lot of the Ponzi scheme competitors. So, re-increase the integrity of the business itself and when you're the biggest player, regulation usually helps. Now, what's the negative side of regulation? Regulation lowers interest rates because when it's regulated, more safety for investors, more safety for borrowers and interest rates get lower. Lower interest rates, less commissions. However, if the market gets stabilized, the better for Uirendai. Nevertheless, the value of the Chinese peer-to-peer lending environment is about to continue exploding for the next few years. There is a lot of liquidity in China and people want higher yields, especially with the relatively healthy inflation going on there. It is expected that the market will grow by 30% and Uirendai is also introducing a wealth management app that's going to increase the potential revenue for Uirendai and the company. On top of everything, perhaps I'll make a special video about China rising in GDP in China, more consumption, more financial consumption, so China has still a long way to go to reach the level in the United States. It's their objective, so we can be assured that China will grow for the next 10, 20, 30 years. And accordingly, with sound regulation also the peer-to-peer market. So, very interesting environment, very interesting new technology platform. It's a disruptive financial technology requested by the Chinese customer because the environment is booming. Uirendai is leading online consumer finance marketplace ranked number one by the online meeting platform development index. China reputation ranking number one is extremely important in such online platforms and apps. The new regulation will lower the number of Chinese peer-to-peer lending providers and lower the growth of it, because it won't be as crazy as it is. But don't get confused by this second chart, because the growth will still be around 50% in 2017 and then 30-20% in the future years, which is still huge. Okay, so the sector is okay, the growth is great. Let's look at the fundamentals, which are even more, even better. Annual revenue has been exploding quarterly. We have seen how already the impact of regulation has streamed growth. Okay, so if there is no growth or growth will be table, you want a low price earnings ratio. However, net earnings have been also very growing very fast, so that is a good sign. A look at valuations will show a lot. Price earnings ratio is just eight. So, if the company grows at 30%, the price earnings ratio should be around 20%. Plus the growth, there is potential for the stock to explode. What's very important are the delinquency rates, which are very, very low, according to company reports. Look, 0.3 is all under 1%. So, everything looks well. The company is well set. A lot of data from credit is, which is assessing credit risk in China, peer-to-peer lending, a lot of interesting, a booming environment, regulatory coming in, stabilizing the sector. So, with a low price earnings ratio of eight, it's a very tempting investment. Now, this would be a different video than most other videos, because I'm now going to show you something that puts me off from investing in such a company. It's simply not an investment that I want to be attached to, because the risk that, in a snap of fingers, you lose everything, is pretty high. And here is the risk explained. The loan facilitation breakdown, you have the credit ratings ABCD. 83% of the loan volume is to the consumers. And the average transaction fee rates are 27.6%. That's robbery. So, in short, Urenda is a company focused on subprime borrowers. When you go into subprime, when the government sees the level of fees that those companies are charging, the subprime borrowers and investors, there is the possibility that the Chinese government, and they don't have any problems to do that, simply shuts down the business and, as to la vista, I don't know how to say it in Chinese. So, there is a huge risk in investing in such companies. There is the binary risk of losing everything in the next days, weeks, very, very abruptly. So, whatever happens to Urenda, I will not invest. If you have a different risk appetite, the company doesn't pay a dividend, so you cannot lean on something that's going on. So, it's a very, very risky investment. And I think the price on this ratio of eight is really fair in this case. And that's it. Very often, you make an analysis of the company, you look at the company, you look, see good, good, good things, good things piling up, interesting sector, interesting market dynamics, interesting fundamentals. Everything looks very well, interesting prospects, and then you find something that is simply too much risk to invest. I don't like those things, but the more companies I found that I say no, there will be one that I say, oh, this is very interesting. And I'm looking at just a few of those per year, and I'm happy. Thank you for watching. Please leave your comments on Urenda. I'm looking forward to hear what are your thoughts, what are your thoughts about the risk somebody using perhaps from China. So, let's see, let's learn together. Thank you for watching, and I'll see you in the next video.


About 100 years ago, a curious blood disease was discovered that was characterized by the presence of peculiarly shaped red blood cells, which had a crescent or sickle shape, instead of the normal disc-shaped cells. This disease was coined sickle cell disease, or SCD. As the disease progresses, SCD patients experience increasingly debilitating pain and damage to the brain, liver, heart, lung, and other organs. Today, SCD affects 100,000 people in the U.S. alone. Over 40 years ago, it was discovered that SCD was an inherited disease passed on from parent to child if both parents carried a copy of the sickling gene, a mutated version of the beta-globin gene. Beta-globin is one of the four core units of hemoglobin, which is essential to carry oxygen to tissues throughout the body. Normal disc-shaped red blood cells are flexible and can easily move through large and small blood vessels to deliver oxygen to tissues. In sickle cell disease, mutations in beta-globin turn hemoglobin into stiff rods, changing the normal disc-shaped red blood cells into a sickle form. These inflexible sickle-shaped red blood cells can stick to vessel walls, causing a blockage that slows or stops blood flow, preventing oxygen from reaching all tissues and causing pain and organ damage. In 1973, the life expectancy for sickle cell disease was 14 years. Since then, much progress has been made. SCD patients in the U.S. can expect to live 40 to 60 years, although with recurring chronic pain. Sickle cell disease can be cured by blood stem cell transplantation, where a patient's diseased bone marrow, where the red blood cells are produced, is eliminated and blood-forming cells, including stem cells from the bone marrow of a healthy donor, are introduced. Over time, they will produce healthy disc-shaped red blood cells to replace the sickle ones, curing SCD. However, access to bone marrow from someone who is a perfect immune system match is extremely rare. Only 10 to 15% of sickle cell patients find that perfect bone marrow to cure their disease. But for the 85 to 90% of those who don't, stem cell therapy offers the best immediate hope. To overcome this, a group of scientists led by Don Cohn at the Bird Stem Cell Research Center at UCLA are using a combination of stem cell research and gene therapy to make patients their own red blood cell donors, using the patient's own stem cells. Using funding from California's Proposition 71, the UCLA team is enriching blood stem cells from the bone marrow of SCD patients and introducing a modified version of the beta-globin gene. The engineered stem cells make red blood cells with the modified beta-globin, which blocks sickling of red blood cells, which makes the red blood cells disc-shaped in a laboratory petri dish. The engineered stem cells are then returned to the patient, where they should start producing new disc-shaped red blood cells, containing the modified beta-globin gene, eventually replacing all of the sickled red blood cells. The scientists have tested this technique in a mouse model sickle cell, where the modified stem cells created disc-shaped red blood cells and cured SCD. A human clinical trial is currently underway at UCLA to test this approach in SCD patients. Although early attempts to use gene therapy to cure disease were not successful, new techniques to introduce genes into stem cells have made this process much safer and effective. In fact, with the support of donors, the NIH and California's Proposition 71 funds, a fatal disease called SCD, or the bubble baby disease, has been cured by a similar approach to replace a missing gene in stem cells. This approach was proven to be safe by Dr. Don Cohn and his team in a clinical trial at UCLA last year. All 23 babies who were born without working immune systems were cured of this life-threatening disease after receiving their own modified stem cells. The implications of this work are significant. With an efficient way to engineer stem cells, we can replace abnormal cells in many diseases, including neurodegenerative, metabolic, or autoimmune diseases. But only with support for biomedical research can we make this possible. As scientists and patient advocates build on the progress that Proposition 71 funding has enabled, we must keep the momentum going, understanding that there is still much work to be done. We must remember that human trials will celebrate successes, but barriers will surface along with complications and challenges, so patients and understanding of the scientific discovery process are essential.


Okay, this short video is to explain why individual behavior alone is not enough and why when you're focusing on population changes, you have to go beyond changing individual behavior directly. The health disparities that exists in the African American community and in other communities. It is based more on what is called the social determinants of health. The health of African Americans is based more on the social determinants of health because the choices that people make are guided by the circumstances under which they live. Saying that people can make different choices such as they can move ignores the difficulty if not impossibility of changing your geographic area because of jobs because of family and because of a sense of wanting to stay where you are. And other individual and social factors. So let's go into this for a second. So we've already, I just want to briefly review the statistics just so that people will understand that there is a health gap. And depending on which year you calculated it, the excess deaths are anywhere between 87,000 to 100,000 per year.  This is this statistic is based on this is a 2008 statistic that's based on the World Health Organization and the Health United States that is put out by the federal government. So we also see that life expectancy is very different that black Americans, both male and female have significantly shorter lives than white Americans who, by the way, are not all that healthy, given the amount of money, giving the richness of our society. Perhaps one of the most significant areas is maternal death. maternal deaths are considered preventable deaths. And so the quality of health of health that a person of society has is can is based can be looked at in terms of the number maternal deaths. Let me go back to the life expectancy for a minute. A recent quote by the CIA on their website says that the quality of life of a citizenship of a citizenry can be measured by the life expectancy. The proxy for the quality of life is the life expectancy. So what this says is that despite all our money, we don't have the best quality of life in the in the world and I mean white Americans don't have the best quality of life in the world. Furthermore, black Americans quality of life is worse than many poor predominantly black countries. I want to move on quickly because I really want this to be about the stress that undergoes. Now, people continuously make the mistake of confusing race with the class. And I sometimes I wonder if it's because people want to deny the existence of race and so focusing on class is the way to do that. First of all, race is a social construction that has biological consequences. That is being black in America affects your health. But being black isn't the reason why that isn't the biological reason why you're unhealthy. If we want to discover whether race is an issue or class is an issue, you have to control for other factors. So the other competing factors, you can never control for all factors, but you control for other competing factors. So if you believe that class is the factor, then you have to control for race by comparing people the same race, but different class. If you believe that race is the dominant factor, then you have to control for class by comparing people of the same class, but different race. Study after study after study. So this is not. I know that we live in a fact free world where people believe that they get to interpret the facts the way they want to interpret the facts. But it's not true.  And that even when you look at low birth weight, what you see is yes, that there is a difference based on if you use education as a proxy for class. Then people with less than 12 years of education have more low birth weight than people with 13 years or more education.  So there's clearly a class difference.  I mean, sorry, less than 12 years of education have more low birth weight than whites with the same amount of education and the same is true for 13 years of education. What's striking here is that whites with less than 12 years of education. So let's say poor whites have fewer low birth weight babies than blacks, let's say middle class blacks with 12.4 education.  Now that's not always that particular comparison is not true on every statistic, but it is true that middle class whites on every statistic is doing better than middle class. So the question becomes why and to understand that you have to begin to understand why focusing on individual behavior and choices alone is not enough. So what we have here with this chart and this is a chart that I developed to try to show the inner in this middle, we have a person who has health that is based on both their genetics and their biochemistry. They have both mental and physical health and so their health is being impacted by the choices they make. No doubt, no doubt, no one can argue that and the choices they make our impact impacts the choices they can make. But what we fail to understand is that those choice it's it's those choices are influenced by structures outside of their control. Wealth and income, education, criminal justice environment, health care housing, the targeting by a tobacco guns, alcohol and drugs, employment availability, food and water and the stress of racism. And those social determinants are impacted by embedded social racial inequalities that are embedded in the society that causes discrimination and inequalities in all of these areas, regardless of the individual choice. So when you talk about people ought to eat right, then you have to talk about food deserts and how people live in food deserts and don't have fresh food, fresh vegetables and fresh meat of readily available to them. I live in a food desert. I live in a food desert. The town that I live in has over 100,000 people inside the city limits and inside the city limits. There are only two grocery stores. What we have in replace of grocery store is fast foods and dollar general. Dollar general stores are now becoming de facto grocery stores. Only problem is that they don't carry fresh products. So there's a dollar general store almost every half a mile to every mile. You can find a dollar general store within walking distance of your home. You can find a dollar general store. But if you go in there, there you can find all kinds of cans and processed foods. Another problem, even the grocery stores are making choices that makes it difficult for a person who is trying to eat healthy to do that. For instance, I have hypertension and I'm supposed to eat a low sodium diet and I'm very good about this diet. So I do all the things that I don't cook with salt. I don't eat it. I don't eat out often. And when I do, I control my sodium intake. And one of the things I do is I read labels and I avoid high sodium food. Recently in the last year, all of the few grocery stores that we have in town have stopped carrying fresh meat that is unsalted in salt solution. All the pork, which I have to eat because I have gout, I can't eat beef. So all the pork is soaked in a 14% salt solution. They call it tender and juicy. They don't put this readily on the label and they don't tell you, even when you read that 14%, what they don't tell you is that it triples the amount of sodium in a serving. So that you go from a 75 milligrams of sodium in a serving size to 350 milligrams of sodium in a serving size. So people who are, and it's expensive, so people who are trying to eat healthy can't. These are the kinds of structural issues that the law can do something about. No one is denying that individual choice in behavior is important. What we're saying is that we have to assure that as we talk about individual behavior and choices, that we also assure that the structures in which people live will allow them to make that individual choice. One of the things I want to talk about, because I think that stress is the difference between why black Americans and other groups, I think chronic stress is the reason. Whether or not you recognize it or want to admit to it that people undergo stress for a lot of reasons, chronic stress. So my view is that what is the difference between a poor white and a poor black person? Not the poverty, not the lack of resources, not the lack of food, the lack of grocery stores, not the lack of sidewalks and parks. Not all of these things that could make their lives, their living situations are similar and their behaviors are similar. What is the difference? It's the added stress of racism. It's the cultural racism. When you watch television and you have to constantly, you cannot watch a television show that doesn't make racial innuendos based on stereotypes. I grew up waiting for the day when the only black person in the film would not be the first black person killed. And similar kinds of stereotypes are broadcast throughout all our system on a daily basis. Recently I had an incident happen to me where I went into Bob Evans and the young lady called me girl, which I don't like. I'm over 65 and so I usually tell people, you know, I prefer not to be called girl and she got an attitude and decided not to serve us. Who knows why she got that attitude? But the reality is, is I have to think, is it because of my race? And then I have to do, I have to say, I have to, when I complain, I have to be careful how I complain because people will get upset and think that I'm charging racism. I can't make a complaint against a white person about being treated differently without being, well, without people becoming defensive about racism. So that's a stress, that's a stress. And these kinds of stresses, they're called micro inequities. If you, if you, if you're interested in looking at doing some research on them, these kind of micro inequities occur throughout the day, throughout your life. So what happens, your blood pressure goes up, all of these, excuse me, all of these biological reactions happen and your body is in a constant state. You don't come down from it. You, when you come home, you don't come out down from it because generally you spend a lot of your time at home rehashing the kind of racialized behavior that has occurred to you. That day are dealing with the racialized behavior that has occurred to your significant other, are your children, are your family. So that chronic stress of living in a racialized society, I think is the difference between, between poor blacks and poor whites, middle class blacks and middle class whites. And I think this is worn out by studies that look at recent immigrants. What they find is that recent immigrants usually have better health for at least the first group has better health. Then the, then, then, then the similar groups. So after Africans have better health than African Americans, Mexican immigrants have better health than Mexican Americans. Japanese immigrants have better health than Japanese immigrants. I mean, Japanese, yes, Japanese immigrants have better health. Japanese America, so forth. Okay, but that, that, that, that, that cushion that better health is gone within the next generation, that second generation people look just like the group that they are identified with in terms of health. And so infant mortality rate is one way to, to look at this in turn, another way. Okay, so, so one thing is stressor. Another thing is a generational impact for health and infant mortality and low birth weight is that is, is a way to understand that. And that the reason is, is because in health, it's common to say that the health of the mother is impact. I mean, excuse me, it is common in health to note that the health of the child is impacted by the health of the mother. So this is kind of my family history. So what this says, I have twin grandsons, this is kind of old now, but I have twin shocker Randall, who's a law professor now has twin grandsons, has twin sons. So his health was impacted by my health. My health was impacted by my mother's health. My mother's health was impacted by her mother's health. Her mother's health was impacted by her grandmother's health so forth and on. So, so what you have is this generational impact. But be more than that is there's beginning to be studies and this goes back to the issue of stress. There's they're beginning not not studies related to African Americans, but studies related to Vietnam era veteran children. What they're finding is that genes is like a switchboard that while everyone has the same genes, there are a number of switches that have to be turned on and off within the genes. And that stress can turn a gene all for one and that that then impacts your health. So that is at a certain level, it's not about being genetically different in terms of being human.  That's called transgenic mutation and they've known about it for years and studied it in plants, but they've never actually studied it in humans. And they have began to study it because they were finding children of Vietnam era veteran to be sicker than children of children that didn't have children who did not go to Vietnam. And when they looked at it, what they found is that there was no sort of a cultural reason for this difference. But what they began, they then began to look at the genes and what they found is that genes had been switched on and off and had not turned back on and off in the next generation. In fact, what they're finding is that when those genes get switched inappropriately by stress, that it can take up to two to three generations for the gene to revert back to its normal setting. Now think about that what that means for African Americans because we have never been not under the stress of racism. So if, and this is hypothesis because no one is studying it, if slavery, which would be a stress cuts turns gene switches off and on, then you're talking about a couple of generations, which would be Cora. So manless was a slave. Narcissus was a slave. And a couple of generations would actually be my dad. Okay, so you would bet expect to switch to be on with earnest to be turned on off with earnest turned back to its normal setting with earnest. Problem is that Tom and Cora grew up doing Jim Crow, which was stress. And so that would go out to my generation. Problem is, I grew up doing Jim Crow. So that would probably means the stress of Jim Crow. That would mean that any gene genes that are got cut off are switched because of the stress of Jim Crow would be passed on to my grandsons. My view is that we have to deal with institutional and systemic racism. If we want to improve the health of African Americans, because that's the only way to get rid of these factors, including the stress of racism. And that is what I believe is at the core of health disparities. If you have any questions, post them on Moodle.


Secretary of the Navy Ray Mabus honored Department of the Navy commands that have implemented innovative energy and water efficiency improvements. We're on a path to create a new energy future which will increase the security of this country because that's what the United States Navy and the United States Marine Corps have always done. One winning command, the USS Macon Island, is the first Navy ship to deploy using a hybrid electric propulsion system. You would burn approximately 42 barrels an hour when the electric drive was enabled at five knots. Our sister ships were using significant larger as in 300 barrels. The SecNAV Energy and Water Management Awards are held yearly to recognize commands striving to meet the Navy's energy goals. From Washington, I'm Petty Officer Alex Snyder.


So, what we will do is we will quickly go through the next two lectures in the series. And as usual if you have doubts please raise your hands and ask questions. And then we will have the usual video recap quiz and then practice questions. So, this lecture is going to be about pointers and addresses of memory locations. And the difference from what we have been seeing so far is that we have been accessing memory locations through names. So, accessing memory locations through names is what we have seen so far when we use variables we are basically providing a name of a variable and that refers to a particular memory location. And what we are going to see in this lecture is that how can we access memory locations through their addresses. So, I am sure all of you have gone through this video lecture. So, basically memory can be thought of as a sequence of locations and each location has some contents. So, these are the contents each location stores one byte that is 8 bits and each location also has an address. So, here the addresses are shown in hexadecimal. And when a program is running basically the operating system allocates a certain part of the memory for use by the program and that memory is divided into three parts the code segment, data segment and stack segment. So, this we have stack segment we have already seen this is where the call stack is this is where activation records get pushed when you when a function gets called. But the data segment we have actually not seen it so far we will get to see it in a couple of more lectures use of the data segment. And the code segment is where the executable instructions are stored. So, this is the memory allocated for a process. And here is a simple program and what we are going to try to do is to try to understand you know how do these different variables what do they correspond to in memory and when we store some value in them what exactly happens. So, you know in the Dumbo model of computing these are like the named drawers of Dumbo and because these are local variables of main they will be allocated in the activation record for main which will be in the stack segment in the call stack in the stack segment. So, when we talk about the variable a we are actually referring to a location in the activation record of main in the call stack in the stack segment. So, the space for a is really in the stack segment and since these are memory locations and we just saw that every location memory has an address. So, can we ask what their addresses are and one could sort of visualize it this way that if in the main program I am declaring a variable a which is of type integer how much storage would be needed to store the value of a 32 bits and integer is 32 bits each memory location contains 1 byte that is 8 bits. So, 4 memory locations would be needed and all of these are local variables. So, they should be allocated in the stack segment. So, 4 bytes for a in the stack segment and which basically means that each memory location storing 1 byte. So, we will have 4 locations in the stack segment reserved for a and similarly for b float again requires 32 bits. So, of course, the representation of a number in float is very different from the representation of a number as an integer. So, the same 32 bits might be reserved for both a float and an integer, but the way numbers are represented very different float is the mantissa exponent representation and integer would be 2's complement and similarly for c which is a character we need just 1 byte. So, you see that you know what we had taught several classes back about how many bits are needed for each of these different data types is actually important when you try to understand what is happening in memory as you know as you try to run this program. And then one could think of addresses for these different memory locations. So, this is 1 byte this is 1 byte allocated for the character it could have this memory address the addresses are written in hexadecimal and then there are 4 bytes here for float and the corresponding addresses could be x200 to x203 and finally, for the integer these 4 bytes. So, note that it is not necessary that because a is declared in the program before b before c it is not necessary that I mean we should not make any assumptions that the memory address of a would be less than the memory address for b would be less than the memory address for c this is not at all necessary. So, and when we write some code like this we are basically accessing the memory locations by their names when we say read something from the input and store it in a we are saying access these memory locations by their name the name of that was a. So, now the question is that can we access memory locations by their addresses and the answer to that is a yes and this is how we can try to find out addresses and then access locations to their addresses. So, c plus plus has this unary ampersand operator that is that and sign it is the ampersand symbol and what it does is if a is a program variable then ampersand a will give the address of a in memory. So, as we have seen here that a program variable actually corresponds to program variable corresponds to some locations are reserved for it in memory. So, when I put the ampersand operator I can actually get the address of those locations. So, this is really coming close to what the physical memory is about there are addresses and now you can see the addresses using the ampersand operator and this ampersand operator is a unary operator it takes a single argument and you can write ampersand a or ampersand space a whatever and you know just like when operators are applied on operands you get expressions like a plus b is an expression. So, ampersand a is a c plus plus expression and whenever you are applying operators to operands to form expressions you need to worry about operator precedence I mean for example what would happen if I write ampersand a plus plus is the plus plus to be applied to a first and then ampersand to be taken or is the ampersand to be applied to a first and then plus plus to be taken. So, you need to worry about the precedence and associativity, but we will just simplify our lives and say that we will use parenthesis to make it very clear which one we want to do first ok. So, we just saw that if a is an integer variable ampersand a is an expression now every expression in c plus plus has a type. So, what is the type of ampersand a? So, that type is called pointer to an integer and in c plus plus it is written as int star. Similarly b is a float variable ampersand b is an expression whose type is float star pointed to float. So, if you have a variable of type t, if x is a variable of type t then ampersand x will denote the address of x and it will have type which is a pointer to t or t star. Now, so far what we have also seen is that whenever we have some type like character float integer whatever bold we can also declare variables of those types. So, if int star is going to be a type pointed to an integer is going to be a type then we should also be able to have variables of this type and indeed we can. So, I can declare a variable of type int star ok. So, note that this is. So, pointer a is still ptr a is still a local variable of main. So, there should be space allocated for ptr a in the activation record for main in the stack segment but ptr a is type is int star. So, it will basically contain the address of an integer variable. So, how much space should we need to store the address of an integer variable that depends on you know in your memory how many bits do you need to address a location. So, let us assume that all memory addresses are 32 bits right. So, how many addressable locations in memory does this give us using 32 bits we can have a total of 2 raise to 32 addresses each of the 32 bits could be 0 or 1 2 raise to 32 is actually a fairly large number. So, but however you could think of a computer which has even larger memory and you need 64 bits to address memory in that case every such pointer variable will also require 64 bits. So, the space required to store a pointer variable will depend on the actual number of bits used to represent an address in memory and for you know for our purposes we will just simplify life and say that there is just 32 bits 4 bytes. So, for this variable there must be space allocated in the stack segment because that is a local variable of main and that must be 32 bits of 4 bytes and of course, those memory locations will have their own addresses and so on just like any other variable is that clear. And now when I have an assignment like this pointer a is assigned ampersand a what am I saying I am saying look at the variable a find out its address. So, this was the variable a there were 4 locations for it. So, when I say find out its address which of those 4 addresses am I talking about there are 4 addresses. So, the convention will be that we will store the address of the first byte among the 4 bytes allocated for a. So, therefore, I will store hex 402 in the space allocated for pointer a. So, pointer a is space allocated are these green things or whatever whitish things and in that I will store the address of the first byte allocated for a. So, that is what pointer a is assigned ampersand a does right looks at the variable a find out its address of the first byte allocated for that variable and stores that in the space allocated for pointer a. So, now can we have pointers to pointers. So, it turns out that you know if you logically think about it it should be possible to do it. So, if pointer a is a variable of type int star what would ampersand pointer a be. So, it would be the pointer to a pointer to an integer right and so, basically the same thing if x is a variable of type t ampersand x is of type t star. So, ampersand pointer a would be of type int star star. So, this is how we represent a pointer to a pointer to an integer and how far can we take this as far as we want. So, for example, int with 4 stars is also a legitimate pointer type this is a pointer to a pointer to a pointer to an integer pointer. And this is note about declarations. So, often when we write programs we write things like int x, y, z instead of writing int x int y int z and that means all of x, y, z have the type int. But when I write something like this int star a, b star star c it is really you know. So, a is an integer pointer b is an integer and c is a pointer to a pointer to an integer right. So, it is not that both b and a are int star a is an int star I mean basically this star does not associate with the subsequent variables that you are declaring. So, it is int a is int star b is int and c is int star star. And then here is a simple program which has three variables of type int float and character and it has three pointer variables of type int star float star and cast star. And then you find out the addresses of these variables store them in the corresponding pointer variables and just print them out. So, has anybody tried to run this program? So, did you see the addresses coming out? So, that probably is the first time where you actually get a feel of what is happening inside the computer. I mean this is you are actually seeing the addresses of the memory locations that are being used for storing your. So, that is what this lecture was about. Are there any doubts? So, there was some discussion about the star operator we will just see that right now. So, once again this is the picture of memory, this is the picture of how memory is allocated. And now here is another program which has an integer variable which has some space allocated for it. There is an integer pointer variable space allocated for it and then some value is stored in the integer variable. So, what is going to happen that in the space allocated for that integer variable that value will be copied and then the address of that variable is stored in pointer a. So, the address of that variable is the address of the first location allocated for that variable. So, that is 6402 will be copied there. And now the question is that now that we know the address of the variable a can we access what is stored inside variable a just knowing its address without knowing its name. And that is what C plus plus allows using the star operator. So, if pointer a is a program variable of type int star then star of pointer a will give you the content of the memory location whose address is given by pointer a. So, pointer a is a variable of type int star. So, pointer a is storing the address of an integer variable. So, star pointer a will give you what is stored in that address. So, and then if I try to say something like you know I want to read out what is there in star pointer a. So, what this means is so, whenever you have this star you can think of it as saying the content of the memory location whose address is given by pointer a. So, pointer a is containing this address. So, the content of the memory location whose address is given by x 402. And now this comes to the question that somebody just asked from there that if I just ask you to find out the content of the memory location whose address is x 402 how do I know how many bytes to read starting from that location. For example, here this is an integer a is an integer and the starting location for that integer has the address 402. So, when I say star pointer a because I know that pointer a is an integer pointer. Therefore, I know when I talk about star pointer I have to go to that address and read 4 bytes. But if pointer a was a character pointer I would have to go to that location and read 1 byte. If pointer a was a double pointer I would have to go to that location and read 8 bytes. So, if you just give an address then you will also have to specify that address is an address of what is it an address of an integer is an address of a character it is an address of a double what and then you can put a star around it. So, if you just give a constant as an address then you have to specify that is that constant should be treated as the address of what type. So, this is usually what is called typecasting. So, you can take a constant address and you can say that this address should be treated as a double pointer and then you can do a star because then the computer can go to that address and now it knows how many bytes to read from there because that address was to be interpreted as a double pointer. So, but at least for this course we will I mean that is an interesting experiment for you to try out, but in this course we will not try to apply star on constant addresses we will try to apply star on legitimately formed addresses. So, this is what we just saw. So, when I say star pointer a I am saying find out the value of pointer a treat that as an address go to the memory location with that address and because pointer a is a pointer to an integer how do I know that that I know from this declaration over here pointer a is a pointer to an integer right. So, therefore, when I am trying to find the content of the memory location whose address is given by pointer a I know that I am trying to find out the content as an integer because pointer a is a pointer to an integer right. So, therefore, I will just go and read the 4 bytes and I will get x 0 to a dc. So, the unary star operator just like the unary ampersand operator it basically forms a C plus plus expression.  If pointer a is int star basically pointer a is the address of an integer variable. So, star of pointer a will be the contents of that address that will be an integer and once again we will avoid worrying about operator precedence and associativity for star by just using parenthesis. So, this operation of applying star something which has the address of a memory location is also called dereferencing an address and you know now that we know how to dereference an address can we have dereferences of dereferences and you know I mean logically it should be possible to do this. So, basically here is a character variable here is a variable which is a character pointer here is a variable which is a pointer to a character pointer right and here I am. So, here is how the memory layout might look like. So, character variable requires just one byte to store a pointer to a character must store the address of a character variable. Now, addresses if once again we say require 32 bits then pointer C must store the address of a character variable. So, it will require 32 bits. So, it will require 4 bytes and pointer pointer C is the address of a character pointer variable right, but once again an address in memory is again going to require 32 bits if we assume that our memory has 32 bits of addresses and so that will also require 4 bytes right and then when I say pointer C is ampersand C the address of C will be stored in the space allocated for pointer C. So, x 302 will come there and then when I say pointer pointer C is ampersand of pointer C. So, the address of pointer C which is x 402 will be stored in the memory location allocated for pointer pointer C and finally, if I execute this statement saying read something and store it in C. So, it will actually get stored in the memory allocated for C right. So, let us say I have read some character whose ASCII code is x 30. I think this is capital A or something 48. And now if I say please print out star of star of pointer C. So, what am I asking I am saying look at the value of pointer pointer C that is x 402 applies star on it which means go to that memory address and read the contents of memory starting from that address, but how many bytes should we read pointer pointer C is a pointer to a character pointer right. So, when I go to that address x 402 and try to read off the contents from there I will be trying to read off the value of a character pointer. So, character pointer will require again 4 bytes any address requires 4 bytes. So, I have to read off 4 bytes and that will give me x 302 and then I have to apply the last star on it which is saying go to the memory address x 302 find out what is stored there and once again how many bytes should I read starting from that that depends on what star pointer pointer C is about. So, pointer pointer C is pointer to a character pointer. So, star pointer pointer C is a character pointer and therefore, when I go to x 302 I know that I am at a I am at I am basically at the address of a character and so I should just read off 1 byte. So, this will just explain in great detail there. So, you will finally read off this value right. So, what you see is that here I started off from this address from there I went to this memory location got the other address went to that memory location and I finally read that value. So, that is what the nested stars do go to an address read something again treat that as an address go to another address read something and continue like this. And we can certainly nest dereferences for example, if I have an integer if I have a variable x which is pointer to pointer to pointer to integer pointer all of these expressions are legitimate star x star x up to 4 star 6. But if you put 5 star 6 here that is not legitimate because when you dereference x 4 times in a nested way you actually get an integer. And so when you try to apply star on it you know it will say that you are trying to dereference an integer and it does not know it is a pointer to what right. And there are certain caveats that you should be careful about when using dereferencing. So, as I said you know right at the beginning that when a process is running when a program is running there is a certain part of the memory that is allocated to the program. This program is running there is a certain part of the memory allocated to this program. Now if you try to dereference an address which is outside this and of course it should not allow you to do that right because that is that is part of the memory that you should not be accessing. So, therefore you need to be careful that when you are dereferencing something you are actually dereferencing an address that is within the part of memory that you are allowed to access. Otherwise I am sure several of you have encountered error messages like segmentation fault or segmentation violation. So, that is basically a case where maybe you have an array of size 100 declared and you are trying to access the 200th element in the array. So, you have basically gone outside location that is allocated for you and that is not allowed. I mean you cannot access a location that is which does not have a legitimate address. And in particular the address 0 x 0 which means all 0 this address is also called the null address. So, this address is outside the memory space of every program of every program that is run. So, you should never try to dereference the address 0 this will certainly need to you know your program crashing same segmentation violation. So, you need to be careful that you are dereferencing addresses that are legitimate. So, that was that part any doubts? So, there were so you know so there was a question who asked the question about operator associativities yeah you asked the question. So, now if I say star of a plus 1 right. So, am I taking star of a. So, let us say a is an integer pointer. So, star of a will be an integer and should I add 1 to the integer values stored at the address given by a or should I take a as an address add 1 to it and then try to dereference that address right. So, depending on which operator has higher precedence you will have to right. So, but what we will do is and you know what is highly recommended is not to get into these you know tricky situations at all. So, just use parenthesis.  If you wanted to dereference a and then add 1 write star a within parenthesis and put the plus 1 outside. So, as operators you need to worry about these things, but I think it is best to just use parenthesis to not get into tricky situations ok. So, let us start the quiz. Let me move on to the second question. Hello everybody. So, this is a practice a question. So, you will be given around 2 to 3 minutes to find the answer to this. So, there are 3 things that you have to do. I think you are doing it every day that is a you are thinking for some time. So, maybe for 3 minutes or 4 minutes and then you are pairing with somebody. So, you are neighbors right. So, you are exchanging then discussing and then the third phase which is the sharing the when somebody is called to the board maybe writing you know or explaining the solution to that problem. So, all these 3 phases are important and it is not the only solution that you you get is important because you will get to learn more from your fellow students right. And also when somebody comes here explains right and it is also not important that you get an answer to the question, but if you understand the problem I think if you do not get the answer to the problem now maybe later on you will try to think about it, but if you do not understand the problem it will be difficult. So, you have to understand the problem. So, can you spend some 3 minutes on this. Now, you should be exchanging with your neighbors. Some people have understood that PTR is pointing to the first element of the array is it correct can anybody answer please. In this question first PTR equal to ampersand a of 0 it stores the address of the first element of array and then we enter the infinite follow the first statement sum equal to sum plus star PTR it will add the value of content of the address of the first element to sum that is 1 sum equal to sum plus 1. Now sum has the value 1 after this if star of PTR less than 10 which is true because star of PTR has the value 1 at present. So, now again we have pointer equal to ampersand a of star pointer PTR equal to ampersand a of star of pointer star pointer has the value 1 at present. So, now PTR gets modified to ampersand a of 1 now it stores the value of the second element of the array and so we progress again to the for loop again iteration takes place now sum equal to sum plus 2. So, sum equal to 1 plus 2 equal to 3 again if star PTR less than 10 is true because star PTR now has the value 2 and again it will continue so on until we reach 9. When we reach 9 sum equal to sum plus star PTR will be sum equal to sum plus 10 star PTR less than 10 is false hence it will break out of the loop in the process. So, we will add all the elements of the array 1 by 1 plus 2 plus 3 plus 4 and store it in sum. When PTR stores the address of the A9 that time it will break out. Thanks. So, we agree that whatever he has said I mean is correct right. So, I think many of you must have got the essence of this problem there we used parenthesis you know to explicitly state you know the address so that you do not have you know confusion. So, use parenthesis wherever required rather than not using it. So, let us go to the next practice problem which is almost same as the previous one, but I would like you to write it down the whole code because see this you can do it in your free time. Okay. So, the answer that I got I think is 10 and so first we know that sum is equal to 0 and we initialized PTR to have the address of A is with index 0.  So, yeah that is why I thought it was 10. According to me it's some star PTR plus plus so it's a post increment so the value of star PTR will change after this statement like for this statement it will be 9 only but after that the value of star PTR will be 10. Okay. So, what you are saying is that the star PTR is not directly star PTR equal to star PTR plus 1 hold on I will be finished. So, you are saying it's not equal to star PTR plus 1 but we got two sets of brackets. So, first do you agree with me that first star PTR is 9 that you agree with me. Okay. And then you are saying that 9 plus plus won't occur is that what you are saying? I am saying that star PTR plus plus that part would be 9 at that particular instant after that at that instant it would be 9 only the values stored there would be 9 but after that all values of star PTR would be 10. Okay. But then there is the second pair of brackets right. So, 9 will get incremented to 10 before the brackets open the second pair of brackets open don't you think so? I think the second pair of brackets won't make that bigger difference I feel the only star PTR like the first bracket has a greater significance to separate the star and the plus plus but the second bracket won't change the value to from 9 to 10. So, firstly you are saying that some will be 9 is that what you are saying? And then when do you think the for loop breaks? No, after this the value of star PTR would become 10 after this some step operation. So, when you go to if operator so, the condition is not satisfied. So, it will break. Okay. So, it will break immediately and I agree. See in that line now first PTR the value will be put 9 then in the memory location PTR the value will change to 10. Okay. Then I will in this statement I will use PTR as 9 only and fine. Yeah, he is right. I agree. Yeah, I got it. Thanks. So, does everybody agree to that? Yeah, you can look it I mean you can try and work out for yourself how it's going to work it's not that difficult if there is a problem I think you should type a program and see for yourself what output you get but that's not the only way to do. So, don't keep on typing the program if somebody gives you a program type C type C that's not the only way. But now in the beginning you can do that because you may want to understand something when you are typing when you are actually coding this try to change remove parentheses or something like that you know and see a different variation and see what really happens inside. So, then the thinking will happen right let's go to the third problem. So, you are not supposed to use a two-dimensional array. Okay. So, you are supposed to use a single-dimensional array and so as in as you would write say care care a of you know of size something right that's a declaration that you would have in your program. But while accessing you would like to access it as a 2d array. Okay. The problem I not get it. Oh, you are not getting still. So, the problem is you are not allowed to use a two-dimensional array directly by declaring it. When you say declare a two-dimensional array in your program you will say care a the first size and the second size which is a 10 10 you are not allowed to do that. So, you are allowed only one dimension which is a of 10 and then somewhere inside the program you want to access i and j that is a in a two-dimensional form a i and j. So, you start declaring as a single-dimensional array and then later on in your program you need to consider that as a two-dimensional array you access it in that fashion. So, is there a problem in understanding now? No, does anybody have a different problem than what we have stated or has a everybody understood? Would you please write the code for five minutes now or the intuition behind the code would be enough if you do not want to write the code the intuition behind how you would structure your code would be more than enough. Is that okay?