Tutor profile: Sumedha P.
Subject: Python Programming
What is the difference between Compiled Language (C, C++) and Interpreted Language (Python) ?
In a compiled implementation, the original program is translated into native machine instructions, which are executed directly by the hardware making it faster to execute but occupies more space. In an interpreted implementation, the original program is translated into something else. Another program, called "the interpreter", then examines "something else" and performs whatever actions are called for. Since the instructions are executed on-the-fly, it is a bit slow.
Subject: C Programming
Are Strings mutable ?
A value is immutable if it cannot change. Constants are immutable in the sense that they cannot change. For example, the number 3 is immutable. However, if I say that your rank is 3, this rank could change. That’s because your rank is a variable, and variables may change their values even if these values are immutable. So integer values are always immutable, not only in real life but also in software. There is no programming language where you can redefine the value “3” to be equal to “5”. Most programming languages in widespread use have mutable arrays. That is, once you have created an array of values, you can always change any one of the entries. Arguably, the most important non-numeric type in software is the string. A string can be viewed as an array of characters so it would not be unreasonable to make it mutable, but strings are also viewed as primitive values (e.g., we don’t think of “Daniel” as an array of 6 characters). Consequently, some languages have immutable strings, others have mutable strings. C strings are mutable whereas Java strings are immutable.
How can your Car shield you from a lightning ?
In 1836, Michael Faraday observed that the excess charge on a charged conductor resided only on its exterior and had no influence on anything enclosed within it. This charged conductor is called as Faraday's cage. Applying this principle, your car is the conductor and the lightning has charged electrons. When, lightning strikes your car, the charge is evenly distributed over the surface of the car and has no influence on anybody sitting in the car. Your car, therefore behaves like a Faraday's cage.
needs and Sumedha will reply soon.